/* ===========================================================================
    Service App - Professional Stylesheet
    ========================================================================== */

/* Constant Navy Theme Variables */
:root {
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #3b82f6;
    --accent-color: var(--primary-color);
    --secondary-color: #64748b;
    --success-color: #059669;
    --danger-color: #dc2626;
    --warning-color: #d97706;
    --background: #0b1a2e;
    /* dark navy */
    --surface: #0e223d;
    /* card/nav surface navy */
    --surface-alt: #102643;
    /* sub-surface navy */
    --card-bg: var(--surface);
    --text-primary: #ffffff;
    --text-secondary: #ffffff;
    --text-color: #ffffff;
    --text-strong: #ffffff;
    --border-color: #2f3a44;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 8px 16px -4px rgba(0, 0, 0, 0.12);
    --button-bg: #16335a;
    /* slightly brighter than surface-alt for buttons */
}

.auth-card {
    background: var(--surface);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 440px;
    padding: 2rem 2rem;
    position: relative;
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    color: #ffffff;
}

.auth-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px -8px rgba(0, 0, 0, 0.15);
}

body.dark-mode .auth-card {
    border-color: rgba(255, 255, 255, 0.08);
}

body.dark-mode .auth-card:hover {
    box-shadow: 0 12px 32px -8px rgba(0, 0, 0, 0.8);
}

.auth-header {
    text-align: center;
    margin-bottom: 1.5rem;
    position: relative;
    color: #ffffff;
}

.auth-header::before {
    content: '';
    position: absolute;
    top: -1.5rem;
    left: 50%;
    --primary-color: #2563eb;
    /* Global constant dark navy backgrounds (no light theme) */
    --background: #0b1a2e;
    /* dark navy */
    --surface: #0e223d;
    /* card/nav surface navy */
    --surface-alt: #102643;
    /* sub-surface navy */
    border-radius: 2px;
    opacity: 0.8;
}

.auth-header h1 {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.auth-header p {
    background: var(--surface);
    font-size: 0.95rem;
    font-weight: 400;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    cursor: default;
}

input,
textarea,
select {
    cursor: default;
}

button,
a,
.btn {
    cursor: pointer !important;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.5;
    color: #ffffff;
    background-color: var(--background);
    min-height: 100vh;
    padding-top: 56px;
}

.container {
    width: 100%;
    max-width: 1200px;
    padding: 0 1rem;
}

/* Authentication Layout */
.auth-container {
    display: flex;
    align-items: center;
    color: #ffffff;
    min-height: calc(100vh - 56px);
    padding: 1.5rem 1rem;
    position: relative;
    color: #ffffff;
}

/* Decorative background gradient */
.auth-container::before {
    color: #ffffff;
    position: absolute;
    top: -50%;
    color: #ffffff;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    color: #ffffff;
}

.auth-container::after {
    content: '';
    color: #ffffff;
    bottom: -50%;
    left: -20%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.06) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    animation: float 15s ease-in-out infinite reverse;
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    50% {
        transform: translate(30px, -30px) scale(1.1);
    }
}

/* Auth card and header */
.auth-card {
    background: var(--surface);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 440px;
    padding: 2rem 2rem;
    position: relative;
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    color: #ffffff;
}

.auth-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px -8px rgba(0, 0, 0, 0.15);
}

body.dark-mode .auth-card {
    border-color: rgba(255, 255, 255, 0.08);
}

body.dark-mode .auth-card:hover {
    box-shadow: 0 12px 32px -8px rgba(0, 0, 0, 0.8);
}

.auth-header {
    text-align: center;
    margin-bottom: 1.5rem;
    position: relative;
    color: #ffffff;
}

.auth-header::before {
    content: '';
    position: absolute;
    top: -1.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-light));
    border-radius: 2px;
    opacity: 0.8;
}

.auth-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

body.dark-mode .auth-header h1 {
    background: linear-gradient(135deg, var(--primary-light), #60a5fa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-header p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 400;
}

/* Tables */
.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-color);
}

.table thead th {
    font-weight: 600;
    color: var(--text-strong);
}

/* Improve dark-mode readability for tables */
[data-theme="dark"] .table th,
[data-theme="dark"] .table td {
    color: var(--text-color);
}

[data-theme="dark"] .table thead th {
    color: var(--text-strong);
}

[data-theme="dark"] .table tbody tr:hover {
    background-color: var(--surface-hover, rgba(255, 255, 255, 0.06));
}

[data-theme="dark"] .card .card-header h2,
[data-theme="dark"] .card .card-header h3 {
    color: var(--text-strong);
}

/* Explicit rack table emphasis */
.rack-table .timestamp-date {
    font-weight: 600;
}

.rack-table .timestamp-time {
    opacity: 0.9;
}

[data-theme="dark"] .rack-table .timestamp-date,
[data-theme="dark"] .rack-table .timestamp-time {
    color: var(--text-color);
}

/* Align numeric totals consistently to the right */
.rack-table th:nth-last-child(1),
.rack-table td:nth-last-child(1) {
    text-align: right;
}

/* Forms */
.form-group {
    margin-bottom: 1.25rem;
    position: relative;
}

.form-label {
    display: block;
    font-weight: 500;
    font-size: 0.875rem;
    color: var(--text-primary);
    margin-bottom: 0.4rem;
    transition: color 0.2s ease;
}

.form-input {
    width: 100%;
    padding: 0.625rem 0.875rem;
    font-size: 0.9rem;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    background-color: var(--surface);
    color: var(--text-primary);
    transition: all 0.25s ease;
    font-family: inherit;
}

.form-input:hover {
    border-color: rgba(37, 99, 235, 0.3);
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12), 0 1px 3px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}

.form-input::placeholder {
    color: #94a3b8;
    opacity: 0.7;
}

/* Dark mode inputs: ensure white text and visible contrast */
body.dark-mode .form-input {
    color: #ffffff;
    background-color: rgba(30, 36, 44, 0.6);
    border-color: #3b4a61;
}

body.dark-mode .form-input:hover {
    border-color: rgba(59, 130, 246, 0.4);
    background-color: rgba(30, 36, 44, 0.8);
}

body.dark-mode .form-input::placeholder {
    color: #cbd5e1;
    opacity: 0.6;
}

body.dark-mode .form-label {
    color: #f1f5f9;
}

body.dark-mode .form-input:focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.2), 0 1px 3px rgba(0, 0, 0, 0.3);
    background-color: rgba(30, 36, 44, 0.9);
}

/* Buttons (Accessible variants) */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.05rem 0.65rem;
    font-size: 0.875rem;
    font-weight: 500;
    text-align: center;
    border: 1px solid transparent;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    font-family: inherit;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn:active {
    transform: scale(0.97);
}

.btn-primary {
    background: linear-gradient(to bottom, #6b7280, #1f2937);
    color: #fff;
    border-color: #374151;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

.btn-primary:hover {
    background: linear-gradient(to bottom, #4b5563, #111827);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
    transform: translateY(-1px);
}

body.dark-mode .btn-primary {
    background: linear-gradient(to bottom, #6b7280, #1f2937);
    border-color: #374151;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    color: #ffffff;
}

body.dark-mode .btn-primary:hover {
    background: linear-gradient(to bottom, #4b5563, #111827);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}


.btn-secondary {
    background: linear-gradient(to bottom, #9ca3af, #374151);
    color: #ffffff;
    border-color: #4b5563;
}

.btn-secondary:hover {
    background: linear-gradient(to bottom, #6b7280, #1f2937);
    color: #fff;
}

.btn-danger {
    background: var(--danger-color);
    color: #ffffff;
    border-color: var(--danger-color);
}

.btn-danger:hover {
    background: #b91c1c;
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
}

body.dark-mode .btn-outline {
    color: var(--text-primary);
}

.btn-outline:hover {
    background: var(--surface-alt);
}

/* Toggle buttons: ensure white text regardless of mode */
#received-log-toggle,
.group-toggle {
    color: #ffffff !important;
}

#received-log-toggle:hover,
.group-toggle:hover {
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.15) inset;
}

/* Uniform heights for header controls (buttons, inputs, badge) */
.card-header .btn,
.card-header .form-input,
.card-header .header-badge {
    height: 38px;
    line-height: 38px;
}

/* Buttons use flex centering; avoid forcing line-height */
.card-header .btn {
    line-height: normal;
}

/* Adjust inputs to vertically center text without breaking padding */
.card-header .form-input {
    padding-top: 0;
    padding-bottom: 0;
}

/* Alerts */
.alert {
    [data-theme="dark"] {
        --background: #121417;
        --surface: #1e242c;
        --surface-alt: #262e37;
        --card-bg: var(--surface);
        --text-primary: #ffffff;
        --text-secondary: #ffffff;
        --text-color: #ffffff;
        --text-strong: #ffffff;
        --border-color: #2f3a44;
        --shadow: 0 1px 3px rgba(0, 0, 0, 0.6), 0 1px 2px rgba(0, 0, 0, 0.5);
        --shadow-lg: 0 10px 18px -5px rgba(0, 0, 0, 0.65);
    }

    padding: 0.75rem 1rem;
    border-radius: 6px;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    border: 1px solid transparent;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.alert-success {
    background-color: #d1fae5;
    color: #065f46;
    border-color: #6ee7b7;
}

body.dark-mode .alert-success {
    background-color: rgba(5, 150, 105, 0.15);
    color: #6ee7b7;
    border-color: rgba(5, 150, 105, 0.3);
}

.alert-error {
    background-color: #fee2e2;
    color: #991b1b;
    border-color: #fca5a5;
}

body.dark-mode .alert-error {
    background-color: rgba(220, 38, 38, 0.15);
    color: #fca5a5;
    border-color: rgba(220, 38, 38, 0.3);
}

.alert-info {
    background-color: #dbeafe;
    color: #1e40af;
    border: 1px solid #93c5fd;
}

/* Navigation */
.navbar {
    background-color: var(--surface);
    box-shadow: var(--shadow);
    padding: 0.5rem 0;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    backdrop-filter: saturate(180%) blur(8px);
}

.navbar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
}

.navbar-logo {
    width: 40px;
    height: 40px;
    max-width: 40px;
    max-height: 40px;
    border-radius: 4px;
    transition: transform 0.3s ease;
}

.navbar-brand:hover .navbar-logo {
    transform: scale(1.1) rotate(5deg);
}

.navbar-menu {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

/* Push clock to far right with toggle immediately to its left */
.navbar-menu .clock-display {
    margin-left: auto;
}

/* Theme Toggle */
.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--surface);
    border: 1px solid var(--border-color);
    cursor: pointer;
    font-size: 1.2rem;
    transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
    color: var(--primary-color);
}

.theme-toggle:hover {
    background: var(--primary-light);
    color: #ffffff;
}

.theme-toggle:active {
    transform: scale(0.94);
}

.clock-display {
    font-family: 'Segoe UI', Consolas, monospace;
    font-size: 0.9rem;
    padding: 0.3rem 1.0rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--surface);
    color: var(--text-primary);
    min-width: 118px;
    text-align: center;
}

body.dark-mode .theme-toggle:hover {
    background: var(--primary-dark);
}

body.dark-mode .clock-display {
    background: #24344d;
    border-color: #334155;
}

/* Accent Utility */
.accent {
    color: var(--accent-color);
}

/* Smooth theme transition */
body,
.card,
.navbar,
.auth-card {
    transition: background-color 0.35s ease, color 0.35s ease, border-color 0.35s ease;
}

.navbar-user {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-name {
    font-weight: 500;
    color: var(--text-primary);
}

/* Dashboard */
.dashboard-header {
    padding: 1.25rem 0;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 1.5rem;
}

.dashboard-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.dashboard-header p {
    color: var(--text-secondary);
}

.dashboard-content {
    padding: 1rem 0;
}

.card {
    background: var(--surface);
    border-radius: 8px;
    box-shadow: var(--shadow);
    padding: 1rem;
    margin-bottom: 1rem;
}

.card.dragging {
    opacity: 0.7;
    box-shadow: 0 0 0 3px rgba(93, 169, 255, 0.35);
}

.card.drag-over {
    outline: 2px dashed var(--accent-color);
}

.card-header {
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

.card-header h2 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.card-body {
    color: var(--text-secondary);
}

/* (Removed: Shipping Trailers compact card overrides) */

/* Contrast enforcement: light mode surfaces use dark text */
body:not(.dark-mode) .card,
body:not(.dark-mode) .status-sidebar,
body:not(.dark-mode) .auth-card {
    background: #ffffff;
    color: var(--text-primary);
}

body:not(.dark-mode) .card-header h2,
body:not(.dark-mode) .card-body,
body:not(.dark-mode) label {
    color: var(--text-primary);
}

/* Dark mode global white text (badges handled inline separately) */
body.dark-mode .card,
body.dark-mode .status-sidebar,
body.dark-mode .auth-card,
body.dark-mode .card-header h2,
body.dark-mode .card-body,
body.dark-mode label {
    color: #ffffff;
}

/* Buttons adjust automatically via variables; ensure hover keeps contrast */
/* Subtle hover effect base */
.btn:not(.btn-secondary):not(.btn-primary):not(.btn-danger):hover {
    filter: brightness(1.05);
}

/* Grid System */
.grid {
    display: grid;
    gap: 1rem;
}

.grid.grid-cols-3 {
    grid-auto-flow: dense;
}

.grid.grid-cols-2 {
    grid-auto-flow: dense;
}

.grid.grid-cols-1 {
    grid-auto-flow: dense;
}

/* Status Sidebar */
.status-sidebar {
    position: fixed;
    top: 56px;
    left: 0;
    /* Responsive width: grows a bit on larger screens */
    width: clamp(280px, 50vw, 380px);
    min-width: 280px;
    height: calc(100vh - 56px);
    overflow-y: auto;
    /* Prevent horizontal scroll inside the sidebar */
    overflow-x: hidden;
    background: var(--surface-alt);
    border-right: 1px solid var(--border-color);
    padding: 1.75rem;
    z-index: 10;
    color: var(--text-primary);
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.status-sidebar h2 {
    font-size: 0.8rem;
    margin: 0 0 0.5rem 0;
}

.status-list {
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 0.7rem;
    /* slightly smaller */
}

.status-list li {
    display: flex;
    justify-content: space-between;
    align-items: left;
    gap: 0.5rem;
    padding: 0.2rem 0;
}

/* Rack tables (moved out of status list block for valid CSS) */
.rack-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

/* Compact calendar styling */
.racks-calendar,
.calendar {
    font-size: 0.8rem;
}

.racks-calendar .calendar-grid,
.calendar .calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 28px);
    gap: 4px;
}

.racks-calendar .day,
.calendar .day {
    width: 28px;
    height: 28px;
    line-height: 28px;
    text-align: center;
    border-radius: 4px;
}

.rack-table th,
.rack-table td {
    padding: 0.35rem 0.5rem;
    border-bottom: 1px solid var(--border-color);
    text-align: left;
}

.rack-table th {
    background: var(--surface);
    font-weight: 600;
}

.timestamp-date {
    font-weight: 600;
}

.timestamp-time {
    color: var(--text-secondary);
}

/* Inline count badge next to rack name */
.count-badge {
    display: inline-block;
    min-width: 32px;
    padding: 0.1rem 0.45rem;
    border-radius: 12px;
    background: var(--surface-alt);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    text-align: center;
    font-weight: 600;
}

/* Direction badges */
.dir-badge {
    display: inline-block;
    padding: 0.125rem 0.4rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.dir-move-from {
    background: rgba(220, 38, 38, 0.18);
    color: #fca5a5;
}

.dir-move-to {
    background: rgba(37, 99, 235, 0.18);
    color: #93c5fd;
}

.dir-received {
    background: rgba(16, 185, 129, 0.18);
    color: #6ee7b7;
}

/* Collapsible card body helper */
.collapsible {
    display: none;
}

.collapsible.show {
    display: block;
}

.container.with-sidebar {
    /* Match the sidebar width + gap. Using the same clamp to stay in sync. */
    margin-left: calc(clamp(280px, 22vw, 360px) + 16px);
    /* 16px visual gap between sidebar and content */
}

/* Free placement mode styles removed */

.grid-cols-1 {
    grid-template-columns: repeat(1, 1fr);
}

.grid-cols-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-cols-3 {
    grid-template-columns: repeat(3, 1fr);
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.mt-1 {
    margin-top: 0.5rem;
}

.mt-2 {
    margin-top: 1rem;
}

.mt-3 {
    margin-top: 1.5rem;
}

.mb-1 {
    margin-bottom: 0.5rem;
}

.mb-2 {
    margin-bottom: 1rem;
}

.mb-3 {
    margin-bottom: 1.5rem;
}

/* Animations */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Login form animations */
.login-form {
    animation: fadeIn 0.4s ease;
}

.login-form .form-group {
    animation: slideInUp 0.4s ease backwards;
}

.login-form .form-group:nth-child(1) {
    animation-delay: 0.1s;
}

.login-form .form-group:nth-child(2) {
    animation-delay: 0.2s;
}

.login-form .btn {
    animation: slideInUp 0.4s ease backwards;
    animation-delay: 0.3s;
}

.login-footer {
    animation: fadeIn 0.5s ease;
    animation-delay: 0.4s;
    animation-fill-mode: backwards;
}

.auth-card {
    animation: slideInUp 0.5s ease;
}

/* Input focus animations */
.form-input:focus+.input-icon,
.form-label:has(+ .form-input:focus) {
    color: var(--primary-color);
}

/* Responsive Design */
@media (max-width: 768px) {
    .auth-card {
        padding: 2rem 1.5rem;
        max-width: 100%;
    }

    .auth-header h1 {
        font-size: 1.75rem;
    }

    .auth-container::before,
    .auth-container::after {
        width: 400px;
        height: 400px;
    }

    .grid-cols-2,
    .grid-cols-3 {
        grid-template-columns: repeat(1, 1fr);
    }

    .navbar-menu {
        gap: 1rem;
    }

    .dashboard-header h1 {
        font-size: 1.5rem;
    }

    body {
        padding-top: 60px;
    }

    /* Notes responsive adjustments */
    .notes-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }

    .notes-header {
        padding: 1.5rem;
    }

    .notes-stats {
        gap: 0.75rem;
    }

    .stat-item {
        flex: 1;
        min-width: 100px;
    }

    .view-filters {
        flex-direction: column;
        gap: 0.5rem;
    }

    .filter-btn {
        width: 100%;
    }

    .note-form {
        padding: 1.5rem;
    }

    /* Hide sidebar on mobile, show main content full width */
    .status-sidebar {
        display: none;
    }

    .container.with-sidebar {
        margin-left: 0;
    }
}

/* Tablet breakpoint for sidebar */
@media (max-width: 1024px) and (min-width: 769px) {
    .status-sidebar {
        width: 240px;
        min-width: 240px;
    }

    .container.with-sidebar {
        margin-left: 256px;
    }
}

/* Notes - Additional global styles */
.notes-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 0.5rem;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-left: 0.5rem;
}

/* Smooth scrollbar for note content */
.note-content::-webkit-scrollbar {
    width: 6px;
}

.note-content::-webkit-scrollbar-track {
    background: var(--surface-alt);
    border-radius: 3px;
}

.note-content::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

.note-content::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* Note card hover effects */
.note-card {
    will-change: transform, box-shadow;
}

/* Tag click interaction */
.tag {
    cursor: pointer;
    transition: all 0.2s ease;
}

.tag:hover {
    background: var(--surface-color);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Timestamp styling */
.timestamp-compact {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Quick action tooltips */
.note-action-btn {
    position: relative;
}

.note-action-btn::after {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-4px);
    padding: 0.25rem 0.5rem;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    font-size: 0.75rem;
    border-radius: 4px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 1000;
}

.note-action-btn:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(-8px);
}

/* Loading state */
.notes-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    color: var(--text-secondary);
}

.notes-loading::after {
    content: '';
    width: 24px;
    height: 24px;
    border: 3px solid var(--border-color);
    border-top-color: var(--text-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Rack type tooltips */
.rack-type-tooltip {
    position: relative;
}

.rack-type-tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 0;
    transform: translateY(-8px);
    padding: 0.5rem 0.75rem;
    background: rgba(0, 0, 0, 0.95);
    color: white;
    font-size: 0.875rem;
    border-radius: 6px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.rack-type-tooltip::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 1rem;
    transform: translateY(0);
    border: 6px solid transparent;
    border-top-color: rgba(0, 0, 0, 0.95);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 1000;
}

.rack-type-tooltip:hover::after {
    opacity: 1;
    transform: translateY(-12px);
}

.rack-type-tooltip:hover::before {
    opacity: 1;
    transform: translateY(-6px);
}

/* Reminder Alerts */
.reminder-alert {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.875rem 1rem;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.08) 0%, rgba(16, 185, 129, 0.08) 100%);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-left: 3px solid #3b82f6;
    border-radius: 6px;
    margin-bottom: 0.75rem;
    animation: reminderPulse 2s ease-in-out infinite;
    transition: all 0.3s ease;
}

.reminder-alert:hover {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.12) 0%, rgba(16, 185, 129, 0.12) 100%);
    border-color: rgba(59, 130, 246, 0.5);
    transform: translateX(3px);
    animation: none;
}

@keyframes reminderPulse {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.4);
    }

    50% {
        box-shadow: 0 0 8px 2px rgba(59, 130, 246, 0.2);
    }
}

.reminder-alert[data-dismissed="true"] {
    animation: slideOut 0.3s ease forwards;
}

@keyframes slideOut {
    to {
        opacity: 0;
        transform: translateX(100%);
        margin-bottom: 0;
        padding-top: 0;
        padding-bottom: 0;
        max-height: 0;
    }
}