body {
    font-family: 'Inter', sans-serif;
}

/* --- Reset browser defaults for headings and paragraphs --- */
h1,
h2,
h3,
h4,
h5,
h6,
p {
    margin: 0;
    font-size: inherit;
    font-weight: inherit;
}

/* --- Tracker App Container --- */
.tracker-app {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    width: 100%;
}

.tracker-app #trackerPage {
    flex: 1;
    display: flex;
    justify-content: center;
    padding: 1rem;
}

/* --- Tracker Controls Row --- */
/* REMOVED: Duplicate styles - now using universal module-controls-row.css and components.css */

/* --- Global State Classes --- */

body.picking-date-mode .hour-cell,
body.creating-vector-mode .hour-cell {
    cursor: pointer !important;
}

body.is-dragging-vector {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* --- Global Text Selection --- */

.profile-details-text,
.svg-overlay text {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* === TRACKER THEME CLASSES === */

/* Main card container */
.tracker-card {
    background-color: var(--bg-secondary);
}

/* Modal containers */
.tracker-modal {
    background-color: var(--bg-secondary);
}

/* Form inputs */
.tracker-input {
    width: 100%;
    height: 38px;
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-primary);
    border-radius: 0.5rem;
    padding: 0.5rem;
    color: var(--text-primary);
    box-sizing: border-box;
}

.tracker-input::placeholder {
    color: var(--text-tertiary);
}

.tracker-input:focus {
    outline: none;
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 2px var(--focus-ring);
}

/* Form labels */
.tracker-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

/* Secondary text */
.tracker-text-secondary {
    color: var(--text-secondary);
}

.tracker-text-muted {
    color: var(--text-tertiary);
}

/* Modal title */
.tracker-modal-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* List containers */
.tracker-list {
    background-color: var(--bg-primary);
    border-radius: 0.5rem;
    padding: 0.5rem;
}

/* Close button for modals */
.tracker-close-btn {
    padding: 0.25rem;
    border-radius: 9999px;
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--text-tertiary);
    transition: background-color 0.2s;
}

.tracker-close-btn:hover {
    background-color: var(--bg-hover);
}

.tracker-close-btn svg {
    width: 1.5rem;
    height: 1.5rem;
}

/* Checkbox styling */
.tracker-checkbox {
    width: 1rem;
    height: 1rem;
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-secondary);
    border-radius: 0.25rem;
    accent-color: var(--brand-primary);
}

/* Avatar placeholder */
.tracker-avatar {
    background-color: var(--bg-tertiary);
    border-radius: 9999px;
    object-fit: cover;
}

/* Icon buttons in forms */
.tracker-icon-btn {
    padding: 0.75rem;
    background-color: var(--bg-tertiary);
    border-radius: 9999px;
    color: var(--text-primary);
    border: none;
    cursor: pointer;
    transition: background-color 0.2s;
}

.tracker-icon-btn:hover {
    background-color: var(--bg-hover);
}

/* Transparent icon button (no background) */
.btn-icon-ghost {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    color: var(--text-tertiary);
    transition: color 0.2s;
}

.btn-icon-ghost:hover {
    color: var(--text-primary);
}

/* Sticky container */
.tracker-sticky-container {
    position: sticky;
    bottom: 0;
    z-index: 30;
    background-color: var(--bg-secondary);
    padding: 1rem 0;
}

/* ==============================
   CSS UTILITY CLASSES
   (Replaces Tailwind utilities)
   ============================== */

/* --- Display & Flex --- */
.u-flex {
    display: flex;
}
.u-flex-col {
    flex-direction: column;
}
.u-flex-grow {
    flex-grow: 1;
}
.u-flex-shrink-0 {
    flex-shrink: 0;
}
.u-items-center {
    align-items: center;
}
.u-items-end {
    align-items: flex-end;
}
.u-justify-center {
    justify-content: center;
}
.u-justify-end {
    justify-content: flex-end;
}
.u-justify-between {
    justify-content: space-between;
}

/* --- Grid --- */
.u-grid {
    display: grid;
}
.u-grid-cols-1 {
    grid-template-columns: repeat(1, minmax(0, 1fr));
}
.u-grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
.u-grid-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}
.u-grid-cols-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}
.u-col-span-2 {
    grid-column: span 2 / span 2;
}

@media (min-width: 768px) {
    .u-md-grid-cols-sidebar {
        grid-template-columns: 280px 1fr;
    }
}

/* --- Gap & Spacing --- */
.u-gap-2 {
    gap: 0.5rem;
}
.u-gap-4 {
    gap: 1rem;
}
.u-gap-x-4 {
    column-gap: 1rem;
}
.u-gap-x-6 {
    column-gap: 1.5rem;
}
.u-gap-y-2 {
    row-gap: 0.5rem;
}
.u-space-x-2 > * + * {
    margin-left: 0.5rem;
}
.u-space-x-4 > * + * {
    margin-left: 1rem;
}
.u-space-y-1 > * + * {
    margin-top: 0.25rem;
}
.u-space-y-4 > * + * {
    margin-top: 1rem;
}
.u-space-y-8 > * + * {
    margin-top: 2rem;
}

/* --- Sizing --- */
.u-w-full {
    width: 100%;
}
.u-w-5 {
    width: 1.25rem;
}
.u-w-6 {
    width: 1.5rem;
}
.u-w-8 {
    width: 2rem;
}
.u-w-24 {
    width: 6rem;
}
.u-h-5 {
    height: 1.25rem;
}
.u-h-6 {
    height: 1.5rem;
}
.u-h-10 {
    height: 2.5rem;
}
.u-h-24 {
    height: 6rem;
}
.u-h-64 {
    height: 16rem;
}
.u-h-full {
    height: 100%;
}
.u-min-w-date-range {
    min-width: 12rem;
}
.u-max-w-sm {
    max-width: 24rem;
}
.u-max-w-md {
    max-width: 28rem;
}
.u-max-w-2xl {
    max-width: 42rem;
}
.u-max-w-7xl {
    max-width: 80rem;
}

/* --- Padding --- */
.u-p-4 {
    padding: 1rem;
}
.u-p-6 {
    padding: 1.5rem;
}
.u-p-16 {
    padding: 4rem;
}
.u-pt-8 {
    padding-top: 2rem;
}
.u-pb-4 {
    padding-bottom: 1rem;
}
.u-pr-6 {
    padding-right: 1.5rem;
}
.u-px-6 {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}
.u-py-4 {
    padding-top: 1rem;
    padding-bottom: 1rem;
}

/* --- Margin --- */
.u-mb-2 {
    margin-bottom: 0.5rem;
}
.u-mb-4 {
    margin-bottom: 1rem;
}
.u-mb-6 {
    margin-bottom: 1.5rem;
}
.u-mt-2 {
    margin-top: 0.5rem;
}
.u-mt-4 {
    margin-top: 1rem;
}
.u-mt-6 {
    margin-top: 1.5rem;
}
.u-ml-2 {
    margin-left: 0.5rem;
}
.u-mr-3 {
    margin-right: 0.75rem;
}
.u-mx-auto {
    margin-left: auto;
    margin-right: auto;
}
.u-mx-n6 {
    margin-left: -1.5rem;
    margin-right: -1.5rem;
}
.u-my-2 {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}
.u-my-4 {
    margin-top: 1rem;
    margin-bottom: 1rem;
}

/* --- Typography --- */
.u-text-xs {
    font-size: 0.75rem;
    line-height: 1rem;
}
.u-text-sm {
    font-size: 0.875rem;
    line-height: 1.25rem;
}
.u-text-base {
    font-size: 1rem;
    line-height: 1.5rem;
}
.u-text-lg {
    font-size: 1.125rem;
    line-height: 1.75rem;
}
.u-text-xl {
    font-size: 1.25rem;
    line-height: 1.75rem;
}
.u-text-center {
    text-align: center;
}
.u-font-bold {
    font-weight: 700;
}
.u-font-semibold {
    font-weight: 600;
}
.u-font-medium {
    font-weight: 500;
}
.u-whitespace-nowrap {
    white-space: nowrap;
}

/* --- Colors --- */
.u-text-warning {
    color: var(--color-warning);
}

/* --- Borders & Radius --- */
.u-rounded-lg {
    border-radius: 0.5rem;
}
.u-rounded-2xl {
    border-radius: 1rem;
}
.u-rounded-full {
    border-radius: 9999px;
}
.u-border-t {
    border-top: 1px solid var(--border-primary);
}
.u-border-r {
    border-right: 1px solid var(--border-primary);
}
.u-border-b {
    border-bottom: 1px solid var(--border-primary);
}

/* --- Shadows (theme-aware) --- */
.u-shadow-lg {
    box-shadow: var(--shadow-lg);
}
.u-shadow-xl {
    box-shadow: var(--shadow-xl);
}

/* --- Visibility & State --- */
.u-hidden {
    display: none;
}

/* Visually hidden but still interactive (for file inputs with labels) */
.u-visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
.u-cursor-pointer {
    cursor: pointer;
}
.u-overflow-y-auto {
    overflow-y: auto;
}
.u-opacity-0 {
    opacity: 0;
}
.u-opacity-25 {
    opacity: 0.25;
}
.u-opacity-75 {
    opacity: 0.75;
}
.u-transition-opacity {
    transition: opacity 0.15s ease-in-out;
}

/* --- Positioning --- */
.u-fixed {
    position: fixed;
}
.u-absolute {
    position: absolute;
}
.u-relative {
    position: relative;
}
.u-inset-0 {
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
}

/* --- Modal Overlay (theme-aware) --- */
.modal-overlay {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background-color: var(--bg-overlay);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

/* Hidden modals must not intercept pointer events */
.modal-overlay.u-hidden,
.modal-overlay.hidden {
    display: none;
    pointer-events: none;
}

/* --- Loading Spinner --- */
.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem;
}

.loading-spinner svg {
    width: 2.5rem;
    height: 2.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.loading-spinner p {
    color: var(--text-primary);
    font-size: 1.125rem;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.u-animate-spin {
    animation: spin 1s linear infinite;
}

/* --- Group Hover Pattern --- */
.u-group {
    position: relative;
}
.u-group .u-group-hover-target {
    opacity: 0;
    transition: opacity 0.15s ease-in-out;
}
.u-group:hover .u-group-hover-target {
    opacity: 1;
}

/* --- Responsive Spacing --- */
@media (min-width: 640px) {
    .u-sm-space-x-4 > * + * {
        margin-left: 1rem;
    }
}

/* --- Avatar Overlay (theme-aware) --- */
.avatar-overlay {
    background-color: var(--bg-overlay);
    z-index: 10; /* Ensure overlay is above img for click handling */
}

/* Avatar preview in modal - allow clicks to pass through to label */
#profileAvatarPreview {
    pointer-events: none;
}

.avatar-overlay svg {
    color: var(--text-primary);
}

/* --- Additional Utilities --- */
.u-w-8 {
    width: 2rem;
}
.u-h-8 {
    height: 2rem;
}

/* ==============================
   TAILWIND-COMPATIBLE CLASSES
   (Used by JS renderers)
   ============================== */

/* --- Flex --- */
.flex {
    display: flex;
}
.flex-col {
    flex-direction: column;
}
.flex-col-reverse {
    flex-direction: column-reverse;
}
.flex-grow {
    flex-grow: 1;
}
.flex-shrink-0 {
    flex-shrink: 0;
}
.items-center {
    align-items: center;
}
.items-end {
    align-items: flex-end;
}
.justify-center {
    justify-content: center;
}
.justify-end {
    justify-content: flex-end;
}
.justify-between {
    justify-content: space-between;
}

/* --- Grid --- */
.grid {
    display: grid;
}
.grid-cols-7 {
    grid-template-columns: repeat(7, minmax(0, 1fr));
}
.grid-cols-\[auto\2c 1fr\] {
    grid-template-columns: auto 1fr;
}
.grid-cols-\[280px\2c 1fr\] {
    grid-template-columns: 280px 1fr;
}

@media (min-width: 1024px) {
    .lg\:grid-cols-\[280px\2c 1fr\] {
        grid-template-columns: 280px 1fr;
    }
    .lg\:mb-0 {
        margin-bottom: 0;
    }
}

/* --- Gap --- */
.gap-x-2 {
    column-gap: 0.5rem;
}
.gap-x-4 {
    column-gap: 1rem;
}
.gap-x-8 {
    column-gap: 2rem;
}

/* --- Spacing --- */
.space-x-2 > * + * {
    margin-left: 0.5rem;
}
.space-x-4 > * + * {
    margin-left: 1rem;
}
.space-y-0 > * + * {
    margin-top: 0;
}

/* --- Sizing --- */
.w-9 {
    width: 2.25rem;
}
.w-12 {
    width: 3rem;
}
.w-20 {
    width: 5rem;
}
.h-9 {
    height: 2.25rem;
}
.h-20 {
    height: 5rem;
}
.h-24 {
    height: 6rem;
}

/* --- Margin --- */
.mb-8 {
    margin-bottom: 2rem;
}
.mt-2 {
    margin-top: 0.5rem;
}
.pr-2 {
    padding-right: 0.5rem;
}

/* --- Typography --- */
.text-sm {
    font-size: 0.875rem;
    line-height: 1.25rem;
}
.text-center {
    text-align: center;
}
.text-right {
    text-align: right;
}

/* --- Colors (theme-aware) --- */
.text-gray-400 {
    color: var(--text-tertiary);
}
.bg-gray-700 {
    background-color: var(--bg-tertiary);
}
.bg-gray-700\/50 {
    background-color: var(--bg-tertiary-transparent);
}
.hover\:bg-gray-600:hover {
    background-color: var(--bg-hover);
}

/* --- Borders & Radius --- */
.border-b-2 {
    border-bottom-width: 2px;
}
.border-transparent {
    border-color: transparent;
}
.rounded-full {
    border-radius: 9999px;
}
.rounded-lg {
    border-radius: 0.5rem;
}
.rounded-md {
    border-radius: 0.375rem;
}

/* --- Positioning --- */
.relative {
    position: relative;
}
.z-10 {
    z-index: 10;
}

/* --- Overflow --- */
.overflow-hidden {
    overflow: hidden;
}

/* --- Background --- */
.bg-cover {
    background-size: cover;
}
.bg-center {
    background-position: center;
}

/* --- Transitions --- */
.transition-colors {
    transition:
        color 0.15s ease-in-out,
        background-color 0.15s ease-in-out,
        border-color 0.15s ease-in-out;
}

/* --- Animation --- */
.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.animate-spin {
    animation: spin 1s linear infinite;
}

@keyframes pulse {
    0%,
    100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* --- Visibility (CRITICAL for JS) --- */
.hidden {
    display: none;
}
.block {
    display: block;
}
.inline-block {
    display: inline-block;
}

/* --- Misc --- */
.p-4 {
    padding: 1rem;
}
.p-2 {
    padding: 0.5rem;
}
.p-3 {
    padding: 0.75rem;
}
.p-6 {
    padding: 1.5rem;
}
.px-4 {
    padding-left: 1rem;
    padding-right: 1rem;
}
.py-2 {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}
.py-3 {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}
.pb-4 {
    padding-bottom: 1rem;
}
.pt-1 {
    padding-top: 0.25rem;
}

/* --- More Sizing --- */
.w-4 {
    width: 1rem;
}
.w-5 {
    width: 1.25rem;
}
.w-6 {
    width: 1.5rem;
}
.w-8 {
    width: 2rem;
}
.w-full {
    width: 100%;
}
.h-4 {
    height: 1rem;
}
.h-5 {
    height: 1.25rem;
}
.h-6 {
    height: 1.5rem;
}
.h-8 {
    height: 2rem;
}
.h-12 {
    height: 3rem;
}
.h-full {
    height: 100%;
}
.min-h-0 {
    min-height: 0;
}
.min-w-0 {
    min-width: 0;
}
.max-w-md {
    max-width: 28rem;
}
.max-w-lg {
    max-width: 32rem;
}
.max-h-96 {
    max-height: 24rem;
}

/* --- More Margin --- */
.mb-2 {
    margin-bottom: 0.5rem;
}
.mb-4 {
    margin-bottom: 1rem;
}
.mb-6 {
    margin-bottom: 1.5rem;
}
.mt-4 {
    margin-top: 1rem;
}
.mt-6 {
    margin-top: 1.5rem;
}
.ml-2 {
    margin-left: 0.5rem;
}
.ml-4 {
    margin-left: 1rem;
}
.mr-2 {
    margin-right: 0.5rem;
}
.mr-3 {
    margin-right: 0.75rem;
}
.mr-4 {
    margin-right: 1rem;
}
.-ml-px {
    margin-left: -1px;
}
.-ml-1 {
    margin-left: -0.25rem;
}

/* --- Gap --- */
.gap-1 {
    gap: 0.25rem;
}
.gap-2 {
    gap: 0.5rem;
}
.gap-3 {
    gap: 0.75rem;
}
.gap-4 {
    gap: 1rem;
}

/* --- More Colors (theme-aware) --- */
.text-gray-300 {
    color: var(--text-secondary);
}
.text-gray-500 {
    color: var(--text-tertiary);
}
.text-white {
    color: var(--text-inverse);
}
.text-red-400 {
    color: var(--color-error);
}
.text-green-400 {
    color: var(--color-success);
}
.text-yellow-400 {
    color: var(--color-warning);
}
.text-blue-400 {
    color: var(--brand-primary);
}
.bg-gray-600 {
    background-color: var(--bg-hover);
}
.bg-gray-800 {
    background-color: var(--bg-secondary);
}
.bg-gray-900 {
    background-color: var(--bg-primary);
}
.bg-blue-500 {
    background-color: var(--brand-primary);
}
.bg-blue-600 {
    background-color: var(--brand-secondary);
}
.bg-red-500 {
    background-color: var(--color-error);
}
.bg-green-500 {
    background-color: var(--color-success);
}

/* --- Hover States (theme-aware) --- */
.hover\:bg-gray-500:hover {
    background-color: var(--border-secondary);
}
.hover\:bg-gray-700:hover {
    background-color: var(--bg-tertiary);
}
.hover\:bg-blue-600:hover {
    background-color: var(--brand-secondary);
}
.hover\:text-white:hover {
    color: var(--text-inverse);
}

/* --- Font Weight --- */
.font-medium {
    font-weight: 500;
}
.font-semibold {
    font-weight: 600;
}
.font-bold {
    font-weight: 700;
}

/* --- Font Size --- */
.text-xs {
    font-size: 0.75rem;
    line-height: 1rem;
}
.text-base {
    font-size: 1rem;
    line-height: 1.5rem;
}
.text-lg {
    font-size: 1.125rem;
    line-height: 1.75rem;
}
.text-xl {
    font-size: 1.25rem;
    line-height: 1.75rem;
}
.text-2xl {
    font-size: 1.5rem;
    line-height: 2rem;
}

/* --- Borders --- */
.border {
    border-width: 1px;
    border-style: solid;
    border-color: var(--border-primary);
}
.border-2 {
    border-width: 2px;
    border-style: solid;
    border-color: var(--border-primary);
}
.border-gray-600 {
    border-color: var(--border-secondary);
}
.border-gray-700 {
    border-color: var(--border-primary);
}
.border-blue-500 {
    border-color: var(--brand-primary);
}

/* --- Positioning --- */
.absolute {
    position: absolute;
}
.fixed {
    position: fixed;
}
.sticky {
    position: sticky;
}
.inset-0 {
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
}
.top-0 {
    top: 0;
}
.right-0 {
    right: 0;
}
.bottom-0 {
    bottom: 0;
}
.left-0 {
    left: 0;
}
.z-20 {
    z-index: 20;
}
.z-30 {
    z-index: 30;
}
.z-40 {
    z-index: 40;
}
.z-50 {
    z-index: 50;
}

/* --- Overflow --- */
.overflow-auto {
    overflow: auto;
}
.overflow-y-auto {
    overflow-y: auto;
}
.overflow-x-hidden {
    overflow-x: hidden;
}

/* --- Cursor --- */
.cursor-pointer {
    cursor: pointer;
}
.cursor-move {
    cursor: move;
}
.cursor-not-allowed {
    cursor: not-allowed;
}

/* --- Opacity --- */
.opacity-0 {
    opacity: 0;
}
.opacity-50 {
    opacity: 0.5;
}
.opacity-75 {
    opacity: 0.75;
}
.opacity-100 {
    opacity: 1;
}

/* --- Pointer Events --- */
.pointer-events-none {
    pointer-events: none;
}
.pointer-events-auto {
    pointer-events: auto;
}

/* --- Whitespace & Text --- */
.whitespace-nowrap {
    white-space: nowrap;
}
.truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.leading-none {
    line-height: 1;
}
.leading-tight {
    line-height: 1.25;
}

/* --- Flex Additional --- */
.flex-1 {
    flex: 1 1 0%;
}
.flex-wrap {
    flex-wrap: wrap;
}
.flex-nowrap {
    flex-wrap: nowrap;
}
.items-start {
    align-items: flex-start;
}
.justify-start {
    justify-content: flex-start;
}
.self-center {
    align-self: center;
}

/* --- Outline & Ring --- */
.outline-none {
    outline: none;
}
.focus\:outline-none:focus {
    outline: none;
}
/* Ring system: ring-{size} sets width, ring-{color} sets color via variable */
.ring-2 {
    --tw-ring-color: var(--border-primary);
    box-shadow: 0 0 0 2px var(--tw-ring-color);
}
.ring-gray-800 {
    --tw-ring-color: var(--bg-secondary);
}
.ring-blue-500 {
    --tw-ring-color: var(--brand-primary);
}
.focus\:ring-2:focus {
    --tw-ring-color: var(--focus-ring);
    box-shadow: 0 0 0 2px var(--tw-ring-color);
}

/* --- Transitions --- */
.transition {
    transition: all 0.15s ease-in-out;
}
.transition-opacity {
    transition: opacity 0.15s ease-in-out;
}
.duration-150 {
    transition-duration: 150ms;
}
.duration-200 {
    transition-duration: 200ms;
}
.ease-in-out {
    transition-timing-function: ease-in-out;
}

/* --- Transform --- */
.transform {
    transform: translateZ(0);
}
.scale-100 {
    transform: scale(1);
}
.scale-95 {
    transform: scale(0.95);
}

/* --- Group Hover (JS pattern) --- */
.group:hover .group-hover\:opacity-100 {
    opacity: 1;
}
.group:hover .group-hover\:visible {
    visibility: visible;
}

/* --- Object Fit --- */
.object-cover {
    object-fit: cover;
}

/* --- Select --- */
.select-none {
    user-select: none;
}

/* ==============================
   SEMANTIC COMPONENT CLASSES
   (Replace Tailwind in JS renderers)
   ============================== */

/* --- Notification Buttons --- */
.notification-btn-wrapper {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.notification-btn {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    border: none;
    cursor: pointer;
    transition: background-color 0.15s ease-in-out;
}

.notification-btn-approve {
    background-color: var(--color-success-dark, #15803d);
    color: white;
}

.notification-btn-approve:hover {
    background-color: var(--color-success, #22c55e);
}

.notification-btn-deny {
    background-color: var(--color-error-dark, #b91c1c);
    color: white;
}

.notification-btn-deny:hover {
    background-color: var(--color-error, #ef4444);
}

/* --- Schedule Modal Checkbox --- */
.schedule-checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.schedule-checkbox {
    width: 1rem;
    height: 1rem;
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-secondary);
    border-radius: 0.25rem;
    accent-color: var(--brand-primary);
}

.schedule-checkbox:focus {
    outline: none;
    box-shadow: 0 0 0 2px var(--focus-ring);
}

.schedule-list-item-text {
    color: var(--text-secondary);
}

/* --- Skeleton Loading States --- */
.skeleton-container {
    overflow: hidden;
}

.skeleton-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.skeleton-avatar {
    width: 5rem;
    height: 5rem;
    background-color: var(--bg-tertiary);
    border-radius: 9999px;
    flex-shrink: 0;
}

.skeleton-text-group {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.skeleton-text {
    height: 0.75rem;
    background-color: var(--bg-tertiary);
    border-radius: 0.25rem;
}

.skeleton-text-lg {
    height: 1.25rem;
}

.skeleton-text-w-75 {
    width: 75%;
}

.skeleton-text-w-50 {
    width: 50%;
}

.skeleton-text-w-83 {
    width: 83.33%;
}

.skeleton-yaxis {
    width: 3rem;
    background-color: var(--bg-tertiary-transparent);
    border-radius: 0.375rem;
    height: 340px;
}

.skeleton-calendar {
    height: 340px;
    background-color: var(--bg-tertiary-transparent);
    border-radius: 0.375rem;
}

/* --- SVG Icon Sizing --- */
.svg-icon-sm {
    width: 1rem;
    height: 1rem;
}

.svg-icon-md {
    width: 1.25rem;
    height: 1.25rem;
}

/* --- Member Profile Block --- */
.profile-avatar-container {
    position: relative;
    flex-shrink: 0;
}

.profile-avatar {
    width: 5rem;
    height: 5rem;
    background-color: var(--bg-tertiary);
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background-size: cover;
    background-position: center;
}

.profile-avatar-icon {
    width: 3rem;
    height: 3rem;
    color: var(--text-tertiary);
}

.profile-notification-indicator {
    position: absolute;
    top: 0;
    right: 0;
    display: block;
    width: 1rem;
    height: 1rem;
    border-radius: 9999px;
    background-color: var(--color-error);
    box-shadow: 0 0 0 2px var(--bg-secondary);
}

.profile-info {
    margin-left: 1rem;
    width: 100%;
    overflow: hidden;
}

.profile-name-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.profile-name {
    font-size: 1.125rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
    color: var(--text-primary);
}

/* --- Collapse Toggle Button --- */
.collapse-toggle-btn {
    position: relative;
    z-index: 10;
    width: 2.25rem;
    height: 2.25rem;
    background-color: var(--bg-tertiary);
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-tertiary);
    border: none;
    cursor: pointer;
    transition: background-color 0.15s ease-in-out;
}

.collapse-toggle-btn:hover {
    background-color: var(--bg-hover);
}

.collapse-toggle-btn svg {
    width: 1.25rem;
    height: 1.25rem;
}

/* --- Main Grid Layout --- */
.main-grid {
    display: grid;
    column-gap: 2rem;
    align-items: flex-end;
}

@media (min-width: 1024px) {
    .main-grid {
        grid-template-columns: 280px 1fr;
    }
}

/* --- Profile Block --- */
.profile-block {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    margin-bottom: 2rem;
}

@media (min-width: 1024px) {
    .profile-block {
        margin-bottom: 0;
    }
}

.calendar-axis-grid {
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: 1rem;
}

.axis-column {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: space-between;
}

/* --- Y-Axis --- */
.y-axis {
    display: flex;
    flex-direction: column-reverse;
    text-align: right;
    font-size: 0.875rem;
    color: var(--text-tertiary);
    padding-right: 0.5rem;
    height: 340px;
}

.y-axis-label {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

/* --- Spinner Button State --- */
.btn-spinner {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-spinner svg {
    width: 1.25rem;
    height: 1.25rem;
    margin-right: 0.75rem;
    animation: spin 1s linear infinite;
}

.btn-spinner svg circle {
    opacity: 0.25;
}

.btn-spinner svg path {
    opacity: 0.75;
}
