@import url('https://fonts.googleapis.com/css2?family=Lato:wght@300;400;700&display=swap');

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --color-primary: #E76C61;
    --color-primary-hover: #d45a50;
    --color-bg: #fcf7f5;
    --color-white: #ffffff;
    --color-heading: #302726;
    --color-text: #3d3130;
    --color-taupe: #9F806C;
    --color-border: #E4CAB4;
    --color-danger: #dc3545;
    --color-success: #28a745;
    --shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --radius: 12px;
}

body {
    font-family: 'Lato', sans-serif;
    font-size: 16px;
    font-weight: 400;
    color: var(--color-text);
    background-color: var(--color-bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--color-heading);
    font-weight: 700;
}

a {
    color: var(--color-taupe);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--color-primary);
}

/* ── Header / Navbar ── */
.navbar {
    background: var(--color-white);
    box-shadow: var(--shadow-sm);
    padding: 0 2rem;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar-logo img {
    height: 50px;
    width: auto;
}

.navbar-nav {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    list-style: none;
}

.navbar-nav a {
    color: var(--color-heading);
    font-weight: 400;
    font-size: 0.95rem;
    padding: 0.4rem 0;
    border-bottom: 2px solid transparent;
    transition: color 0.2s, border-color 0.2s;
}

.navbar-nav a:hover,
.navbar-nav a.active {
    color: var(--color-primary);
    border-bottom-color: var(--color-primary);
}

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

.navbar-user span {
    color: var(--color-taupe);
    font-size: 0.9rem;
}

.btn-logout {
    background: none;
    border: 1px solid var(--color-border);
    color: var(--color-text);
    padding: 0.4rem 1rem;
    border-radius: var(--radius);
    cursor: pointer;
    font-family: inherit;
    font-size: 0.85rem;
    transition: all 0.2s;
}

.btn-logout:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

/* ── Mobile Menu ── */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--color-heading);
    margin: 5px 0;
    transition: all 0.3s;
}

/* ── Main Content ── */
.main-content {
    flex: 1;
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

/* ── Login Page ── */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-bg);
    padding: 2rem;
}

.login-card {
    background: var(--color-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 3rem 2.5rem;
    width: 100%;
    max-width: 420px;
    text-align: center;
}

.login-card .logo {
    margin-bottom: 1.5rem;
}

.login-card .logo img {
    height: 60px;
    width: auto;
}

.login-card h1 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--color-heading);
}

.login-card .subtitle {
    color: var(--color-taupe);
    font-size: 0.95rem;
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.25rem;
    text-align: left;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--color-heading);
    margin-bottom: 0.4rem;
}

.form-group input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--color-text);
    background: var(--color-white);
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}

.form-group input:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(231, 108, 97, 0.15);
}

.btn-primary {
    display: block;
    width: 100%;
    padding: 0.8rem;
    background: var(--color-primary);
    color: var(--color-white);
    border: none;
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    margin-top: 0.5rem;
}

.btn-primary:hover {
    background: var(--color-primary-hover);
}

.btn-primary:active {
    transform: scale(0.98);
}

/* ── Messages / Alerts ── */
.messages {
    list-style: none;
    margin-bottom: 1.5rem;
}

.messages li {
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.messages .error {
    background: #fde8e8;
    color: var(--color-danger);
    border: 1px solid #f5c6cb;
}

.messages .success {
    background: #e8f5e9;
    color: var(--color-success);
    border: 1px solid #c3e6cb;
}

.messages .info {
    background: #fff3e0;
    color: #856404;
    border: 1px solid #ffeeba;
}

.alert-error {
    background: #fde8e8;
    color: var(--color-danger);
    border: 1px solid #f5c6cb;
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

/* ── Dashboard Cards ── */
.welcome-section {
    margin-bottom: 2rem;
}

.welcome-section h1 {
    font-size: 1.75rem;
    margin-bottom: 0.25rem;
}

.welcome-section p {
    color: var(--color-taupe);
    font-size: 1rem;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.card {
    background: var(--color-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 1.75rem;
    transition: box-shadow 0.2s, transform 0.2s;
}

.card:hover {
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

.card-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    font-size: 1.4rem;
}

.card-icon.coral { background: rgba(231, 108, 97, 0.12); color: var(--color-primary); }
.card-icon.taupe { background: rgba(159, 128, 108, 0.12); color: var(--color-taupe); }
.card-icon.brown { background: rgba(48, 39, 38, 0.1); color: var(--color-heading); }

.card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.4rem;
}

.card p {
    color: var(--color-taupe);
    font-size: 0.9rem;
    line-height: 1.5;
}

.card-link {
    display: inline-block;
    margin-top: 1rem;
    color: var(--color-primary);
    font-weight: 700;
    font-size: 0.9rem;
}

.card-link:hover {
    color: var(--color-primary-hover);
}

/* ── Stats Row ── */
.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--color-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 1.25rem 1.5rem;
    text-align: center;
}

.stat-card .stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-primary);
}

.stat-card .stat-label {
    font-size: 0.85rem;
    color: var(--color-taupe);
    margin-top: 0.25rem;
}

/* ── Page Header ── */
.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.page-header h1 {
    font-size: 1.75rem;
    margin: 0;
}

.page-header-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.back-link {
    font-size: 0.9rem;
    color: var(--color-taupe);
    margin-right: 0.5rem;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 2rem 0 1rem;
}

.section-header h2 {
    font-size: 1.25rem;
}

.section-block {
    margin-top: 2rem;
}

.section-block h2 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

/* ── Filter Bar ── */
.filter-bar {
    margin-bottom: 1.5rem;
}

.filter-form {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    align-items: center;
}

.filter-input {
    padding: 0.6rem 1rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 0.9rem;
    color: var(--color-text);
    background: var(--color-white);
    min-width: 220px;
    outline: none;
    transition: border-color 0.2s;
}

.filter-input:focus {
    border-color: var(--color-primary);
}

.filter-input-wide {
    min-width: 300px;
}

.filter-select {
    padding: 0.6rem 1rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 0.9rem;
    color: var(--color-text);
    background: var(--color-white);
    outline: none;
    cursor: pointer;
}

.btn-filter {
    padding: 0.6rem 1.25rem;
    background: var(--color-primary);
    color: var(--color-white);
    border: none;
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-filter:hover {
    background: var(--color-primary-hover);
}

.btn-clear {
    padding: 0.6rem 1.25rem;
    background: none;
    color: var(--color-taupe);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-block;
}

.btn-clear:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

/* ── Data Table ── */
.table-wrapper {
    overflow-x: auto;
    background: var(--color-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.data-table thead th {
    text-align: left;
    padding: 0.85rem 1rem;
    font-weight: 700;
    color: var(--color-heading);
    border-bottom: 2px solid var(--color-border);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    white-space: nowrap;
}

.data-table tbody td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(228, 202, 180, 0.3);
    vertical-align: middle;
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

.clickable-row {
    cursor: pointer;
    transition: background 0.15s;
}

.clickable-row:hover {
    background: var(--color-bg);
}

.empty-state {
    text-align: center;
    padding: 2rem 1rem !important;
    color: var(--color-taupe);
}

.empty-state-block {
    text-align: center;
    padding: 2rem;
    color: var(--color-taupe);
    background: var(--color-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    margin-top: 1.5rem;
}

/* ── Badges ── */
.badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 700;
    white-space: nowrap;
}

.badge-coral {
    background: rgba(231, 108, 97, 0.12);
    color: var(--color-primary);
}

.badge-taupe {
    background: rgba(159, 128, 108, 0.12);
    color: var(--color-taupe);
}

.badge-green {
    background: rgba(40, 167, 69, 0.12);
    color: var(--color-success);
}

.badge-red {
    background: rgba(220, 53, 69, 0.12);
    color: var(--color-danger);
}

.badge-neutral {
    background: rgba(48, 39, 38, 0.08);
    color: var(--color-heading);
}

/* ── Status Pills ── */
.status-pill {
    display: inline-block;
    padding: 0.25rem 0.7rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    white-space: nowrap;
}

.status-pill-lg {
    font-size: 0.85rem;
    padding: 0.35rem 1rem;
}

/* Status colors */
.status-received, .status-scan_created { background: #e3f2fd; color: #1565c0; }
.status-files_complete { background: #e8f5e9; color: #2e7d32; }
.status-invoice_created, .status-invoice_sent { background: #fff3e0; color: #e65100; }
.status-email_failed { background: #fde8e8; color: #c62828; font-weight: 700; }
.status-payment_pending { background: #fce4ec; color: #c62828; }
.status-paid { background: #e8f5e9; color: #2e7d32; }
.status-sent_to_manufacturer, .status-draft_in_progress { background: #ede7f6; color: #4527a0; }
.status-draft_sent, .status-feedback_pending { background: #fff8e1; color: #f57f17; }
.status-feedback_reminder_1, .status-feedback_reminder_2 { background: #fff3e0; color: #e65100; }
.status-feedback_received { background: #e0f7fa; color: #00695c; }
.status-revision_pending, .status-revised { background: #fce4ec; color: #880e4f; }
.status-approved { background: #e8f5e9; color: #1b5e20; }
.status-in_production { background: #ede7f6; color: #4527a0; }
.status-ready_to_ship, .status-label_created { background: #e0f2f1; color: #00695c; }
.status-shipped { background: #e3f2fd; color: #0d47a1; }
.status-delivered { background: #e8f5e9; color: #1b5e20; }
.status-review_mail_sent { background: #f3e5f5; color: #6a1b9a; }
.status-completed { background: rgba(48, 39, 38, 0.08); color: var(--color-heading); }

/* Invoice status */
.status-invoice-draft { background: #f5f5f5; color: #616161; }
.status-invoice-created { background: #e3f2fd; color: #1565c0; }
.status-invoice-sent { background: #fff3e0; color: #e65100; }
.status-invoice-pending { background: #fce4ec; color: #c62828; }
.status-invoice-paid { background: #e8f5e9; color: #2e7d32; }
.status-invoice-cancelled { background: #f5f5f5; color: #9e9e9e; }

/* Draft status */
.status-draft-uploaded { background: #e3f2fd; color: #1565c0; }
.status-draft-sent { background: #fff3e0; color: #e65100; }
.status-draft-feedback_pending { background: #fff8e1; color: #f57f17; }
.status-draft-approved { background: #e8f5e9; color: #1b5e20; }
.status-draft-revision { background: #fce4ec; color: #880e4f; }

/* ── Detail Grid ── */
.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.detail-card {
    background: var(--color-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 1.5rem;
}

.detail-card h3 {
    font-size: 1rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--color-border);
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 0.4rem 0;
    font-size: 0.9rem;
    gap: 1rem;
}

.detail-row + .detail-row {
    border-top: 1px solid rgba(228, 202, 180, 0.2);
}

.detail-label {
    color: var(--color-taupe);
    font-size: 0.85rem;
    flex-shrink: 0;
    min-width: 100px;
}

.detail-total {
    margin-top: 0.5rem;
    padding-top: 0.75rem;
    border-top: 2px solid var(--color-border) !important;
}

.detail-divider {
    border: none;
    border-top: 1px solid var(--color-border);
    margin: 0.75rem 0;
}

.note-text {
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--color-text);
    white-space: pre-wrap;
}

/* ── Status Timeline ── */
.timeline-wrapper {
    overflow-x: auto;
    margin-bottom: 1.5rem;
    padding: 0.5rem 0;
}

.timeline {
    display: flex;
    align-items: flex-start;
    gap: 0;
    min-width: min-content;
}

.timeline-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    min-width: 80px;
    flex-shrink: 0;
}

.timeline-step::after {
    content: '';
    position: absolute;
    top: 10px;
    left: 50%;
    width: 100%;
    height: 2px;
    background: var(--color-border);
}

.timeline-step:last-child::after {
    display: none;
}

.timeline-step.done::after {
    background: var(--color-success);
}

.timeline-step.current::after {
    background: var(--color-border);
}

.timeline-dot {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--color-border);
    border: 3px solid var(--color-white);
    position: relative;
    z-index: 1;
    flex-shrink: 0;
}

.timeline-step.done .timeline-dot {
    background: var(--color-success);
}

.timeline-step.current .timeline-dot {
    background: var(--color-primary);
    box-shadow: 0 0 0 4px rgba(231, 108, 97, 0.2);
}

.timeline-label {
    font-size: 0.7rem;
    color: var(--color-taupe);
    text-align: center;
    margin-top: 0.4rem;
    max-width: 80px;
    line-height: 1.2;
}

.timeline-step.current .timeline-label {
    color: var(--color-primary);
    font-weight: 700;
}

.timeline-step.done .timeline-label {
    color: var(--color-success);
}

.timeline-step.upcoming .timeline-dot {
    background: var(--color-border);
}

.timeline-step.upcoming .timeline-label {
    color: var(--color-border);
}

/* ── Status Update Bar ── */
.status-update-bar {
    background: var(--color-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
}

.action-bar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.action-bar-form {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1.25rem;
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    border: 2px solid;
}

.toggle-btn.toggle-off {
    background: var(--color-white);
    color: var(--color-taupe);
    border-color: var(--color-border);
}

.toggle-btn.toggle-off:hover {
    border-color: var(--color-success);
    color: var(--color-success);
    background: rgba(40, 167, 69, 0.05);
}

.toggle-btn.toggle-on {
    background: var(--color-success);
    color: var(--color-white);
    border-color: var(--color-success);
    cursor: pointer;
}

.toggle-btn.toggle-on:hover {
    background: #218838;
    border-color: #218838;
}

.toggle-btn.toggle-disabled {
    background: var(--color-bg);
    color: var(--color-border);
    border-color: var(--color-border);
    cursor: not-allowed;
    opacity: 0.5;
}

.toggle-btn.toggle-release {
    background: var(--color-primary);
    color: var(--color-white);
    border-color: var(--color-primary);
}

.toggle-btn.toggle-release:hover {
    background: var(--color-primary-hover);
    border-color: var(--color-primary-hover);
}

.status-form {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.status-form label {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--color-heading);
}

.btn-primary.btn-sm {
    width: auto;
    padding: 0.5rem 1.25rem;
    font-size: 0.85rem;
    margin-top: 0;
}

/* ── File Grid ── */
.file-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1rem;
}

.file-card {
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.file-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.file-info strong {
    display: block;
    font-size: 0.85rem;
    color: var(--color-heading);
}

.file-info small {
    color: var(--color-taupe);
    font-size: 0.75rem;
    word-break: break-all;
}

/* ── Thumbnails ── */
.thumb-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
}

.thumb-card {
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
    transition: box-shadow 0.2s, transform 0.15s;
}

.thumb-card:hover {
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

.thumb-img {
    width: 100%;
    aspect-ratio: 4/5;
    object-fit: cover;
    display: block;
}

.thumb-label {
    padding: 0.25rem 0.4rem;
    font-size: 0.65rem;
    color: var(--color-taupe);
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ── Lightbox ── */
.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(48, 39, 38, 0.85);
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.lightbox.open {
    display: flex;
}

.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
}

.lightbox-content img {
    max-width: 90vw;
    max-height: 85vh;
    display: block;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.lightbox-close {
    position: absolute;
    top: -12px;
    right: -12px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--color-primary);
    color: var(--color-white);
    border: none;
    font-size: 1.3rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
}

.lightbox-close:hover {
    background: var(--color-primary-hover);
}

.lightbox-caption {
    text-align: center;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    margin-top: 0.75rem;
}

.feedback-preview {
    font-size: 0.85rem;
    color: var(--color-text);
    font-style: italic;
}

/* ── History / Logs ── */
.history-list {
    background: var(--color-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 1.25rem;
}

.history-item {
    display: flex;
    gap: 1rem;
    padding: 0.75rem 0;
    position: relative;
}

.history-item + .history-item {
    border-top: 1px solid rgba(228, 202, 180, 0.2);
}

.history-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--color-border);
    flex-shrink: 0;
    margin-top: 0.3rem;
}

.history-time {
    font-size: 0.78rem;
    color: var(--color-taupe);
}

.history-change {
    font-size: 0.9rem;
    margin-top: 0.15rem;
}

.history-note {
    font-size: 0.85rem;
    color: var(--color-taupe);
    margin-top: 0.2rem;
    font-style: italic;
}

/* ── Footer ── */
.footer {
    background: var(--color-heading);
    color: rgba(255, 255, 255, 0.6);
    text-align: center;
    padding: 1.25rem 2rem;
    font-size: 0.85rem;
    margin-top: auto;
}

.footer a {
    color: var(--color-primary);
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .navbar {
        padding: 0 1rem;
    }

    .menu-toggle {
        display: block;
    }

    .navbar-center {
        display: none;
        position: absolute;
        top: 80px;
        left: 0;
        right: 0;
        background: var(--color-white);
        box-shadow: var(--shadow);
        padding: 1rem;
    }

    .navbar-center.open {
        display: block;
    }

    .navbar-nav {
        flex-direction: column;
        gap: 0.5rem;
    }

    .navbar-nav a {
        padding: 0.75rem 1rem;
        border-bottom: none;
        border-radius: 8px;
    }

    .navbar-nav a:hover,
    .navbar-nav a.active {
        background: var(--color-bg);
    }

    .main-content {
        padding: 1.25rem;
    }

    .login-card {
        padding: 2rem 1.5rem;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .stats-row {
        grid-template-columns: 1fr 1fr;
    }

    .detail-grid {
        grid-template-columns: 1fr;
    }

    .filter-form {
        flex-direction: column;
    }

    .filter-input, .filter-input-wide, .filter-select {
        min-width: 100%;
        width: 100%;
    }

    .page-header {
        flex-direction: column;
    }

    .status-form {
        flex-direction: column;
        align-items: stretch;
    }

    .status-form .btn-primary.btn-sm {
        width: 100%;
    }

    .file-grid {
        grid-template-columns: 1fr;
    }

    .navbar-user span {
        display: none;
    }
}
