/* Industrial neutral design system */
:root {
    --bg-base: #ececec;
    --bg-surface: #f7f7f7;
    --bg-card: #ffffff;
    --bg-header: #1f1f1f;
    --bg-header-alt: #2b2b2b;
    --bg-muted: #efefef;
    --bg-hover: #e4e4e4;
    --bg-active: #3a3a3a;

    --text-primary: #171717;
    --text-secondary: #525252;
    --text-muted: #737373;
    --text-inverse: #f5f5f5;
    --text-inverse-muted: #a3a3a3;

    --border-light: #e0e0e0;
    --border-default: #c8c8c8;
    --border-strong: #9a9a9a;

    --accent: #404040;
    --accent-hover: #2e2e2e;
    --accent-subtle: #d9d9d9;

    --success-bg: #ebebeb;
    --success-text: #262626;
    --success-border: #b0b0b0;

    --error: #6b6b6b;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.1);

    --radius-sm: 4px;
    --radius-md: 6px;
    --radius-lg: 8px;

    --font-sans: 'Vazirmatn', Tahoma, Arial, sans-serif;
    --transition: 0.18s ease;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    font-family: var(--font-sans);
    background: var(--bg-base);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    background-image:
        linear-gradient(rgba(0, 0, 0, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 0, 0, 0.02) 1px, transparent 1px);
    background-size: 24px 24px;
}

/* Header */
.header {
    background: var(--bg-header);
    border-bottom: 3px solid var(--border-strong);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-md);
    overflow-x: hidden;
}

.header-inner {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 1.5rem;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.header-menu-toggle {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-sm);
    background: var(--bg-header-alt);
    cursor: pointer;
    flex-shrink: 0;
    order: 4;
    transition: background var(--transition), border-color var(--transition);
}

.header-menu-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.25);
}

.header-menu-toggle:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.35);
}

.header-menu-bar {
    display: block;
    width: 18px;
    height: 2px;
    background: var(--text-inverse-muted);
    border-radius: 1px;
    transition: transform var(--transition), opacity var(--transition);
}

.header-menu-toggle[aria-expanded="true"] .header-menu-bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.header-menu-toggle[aria-expanded="true"] .header-menu-bar:nth-child(2) {
    opacity: 0;
}

.header-menu-toggle[aria-expanded="true"] .header-menu-bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
    min-width: 0;
    order: 1;
    text-decoration: none;
    color: inherit;
}

.header-brand:hover .header-title {
    color: var(--text-inverse);
}

.header-brand:hover .header-logo {
    border-color: rgba(255, 255, 255, 0.35);
}

.header-logo {
    width: 32px;
    height: 32px;
    background: var(--bg-header-alt);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-inverse-muted);
    letter-spacing: 0.05em;
}

.header-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-inverse);
    letter-spacing: 0.02em;
}

.header-subtitle {
    font-size: 0.7rem;
    color: var(--text-inverse-muted);
    font-weight: 400;
    display: block;
    margin-top: -2px;
}

.header-nav {
    display: flex;
    gap: 0.25rem;
    background: var(--bg-header-alt);
    padding: 0.25rem;
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.08);
    flex: 1;
    justify-content: center;
    min-width: 0;
    order: 2;
}

.header-nav a {
    color: var(--text-inverse-muted);
    text-decoration: none;
    padding: 0.45rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
    transition: all var(--transition);
    white-space: nowrap;
}

.header-nav a:hover {
    color: var(--text-inverse);
    background: rgba(255, 255, 255, 0.06);
}

.header-nav a.active {
    background: var(--bg-active);
    color: var(--text-inverse);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.header-user {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    flex-shrink: 0;
    order: 3;
}

.header-username {
    font-size: 0.8125rem;
    color: var(--text-inverse-muted);
    white-space: nowrap;
}

.header-logout-form {
    margin: 0;
}

.header-logout-btn {
    padding: 0.4rem 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-inverse-muted);
    font-family: inherit;
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
}

.header-logout-btn:hover {
    color: var(--text-inverse);
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.25);
}

/* Login page */
.login-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
    background: linear-gradient(145deg, #e8e8e8 0%, #f5f5f5 40%, #ececec 100%);
}

.login-bg {
    position: fixed;
    inset: 0;
    pointer-events: none;
    color: var(--accent);
    z-index: 0;
}

.login-bg-shape {
    position: absolute;
    color: var(--text-muted);
}

.login-bg-shape--1 {
    width: 520px;
    height: 520px;
    top: -120px;
    left: -100px;
    animation: login-float 18s ease-in-out infinite;
}

.login-bg-shape--2 {
    width: 280px;
    height: 280px;
    bottom: -60px;
    right: -40px;
    animation: login-float 22s ease-in-out infinite reverse;
}

.login-bg-shape--3 {
    width: 160px;
    height: 160px;
    top: 40%;
    right: 8%;
    animation: login-float 14s ease-in-out infinite;
}

@keyframes login-float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-16px) rotate(4deg); }
}

.login-shell {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 920px;
}

.login-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: calc(var(--radius-lg) + 4px);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    min-height: 520px;
}

.login-visual {
    background: linear-gradient(160deg, #2b2b2b 0%, #1f1f1f 50%, #2a2a2a 100%);
    color: var(--text-inverse);
    padding: 2.5rem 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.login-visual::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 28px 28px;
    pointer-events: none;
}

.login-visual-inner {
    position: relative;
    z-index: 1;
    text-align: center;
    width: 100%;
}

.login-visual-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--text-inverse-muted);
    letter-spacing: 0.05em;
    margin-bottom: 1.25rem;
}

.login-illustration {
    width: 100%;
    max-width: 280px;
    height: auto;
    margin: 0 auto 1.25rem;
    display: block;
}

.login-gear {
    transform-origin: center;
    animation: login-spin 12s linear infinite;
}

@keyframes login-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.login-smoke--1 {
    animation: login-smoke 4s ease-in-out infinite;
}

.login-smoke--2 {
    animation: login-smoke 5s ease-in-out infinite 0.8s;
}

@keyframes login-smoke {
    0%, 100% { opacity: 0.3; transform: translateY(0); }
    50% { opacity: 0.7; transform: translateY(-6px); }
}

.login-visual-title {
    font-size: 1.375rem;
    font-weight: 700;
    margin-bottom: 0.375rem;
    letter-spacing: -0.01em;
}

.login-visual-text {
    font-size: 0.875rem;
    color: var(--text-inverse-muted);
    margin-bottom: 1.5rem;
}

.login-features {
    list-style: none;
    text-align: right;
    display: inline-flex;
    flex-direction: column;
    gap: 0.625rem;
    padding: 0;
    margin: 0;
}

.login-features li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.75);
}

.login-features svg {
    flex-shrink: 0;
    color: rgba(255, 255, 255, 0.45);
}

.login-panel {
    padding: 2.5rem 2.25rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.login-panel-header {
    margin-bottom: 1.75rem;
}

.login-panel-logo {
    display: none;
}

.login-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.375rem;
    letter-spacing: -0.02em;
}

.login-subtitle {
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.login-error {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.75rem 1rem;
    margin-bottom: 1.25rem;
    background: #fafafa;
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.login-error svg {
    flex-shrink: 0;
    color: var(--text-muted);
}

.login-form .form-group {
    margin-bottom: 1.125rem;
}

.login-field label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    margin-bottom: 0.375rem;
    color: var(--text-secondary);
}

.login-input-group {
    display: flex;
    flex-direction: row;
    direction: ltr;
    align-items: center;
    width: 100%;
    min-height: 46px;
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    background: var(--bg-card);
    transition: border-color var(--transition), box-shadow var(--transition);
}

.login-input-group:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(64, 64, 64, 0.1);
}

.login-input-icon-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 44px;
    color: var(--text-muted);
}

.login-input-field {
    flex: 1;
    min-width: 0;
    border: none;
    outline: none;
    background: transparent;
    padding: 0.625rem 0.5rem;
    font-size: 0.9375rem;
    font-family: inherit;
    color: var(--text-primary);
    text-align: left;
}

.login-input-field::placeholder {
    color: #b0b0b0;
    font-size: 0.875rem;
}

.login-password-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    margin-right: 0.25rem;
    padding: 0;
    border: none;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    transition: color var(--transition), background var(--transition);
}

.login-password-toggle:hover {
    color: var(--text-primary);
    background: var(--bg-muted);
}

.login-password-toggle:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px rgba(64, 64, 64, 0.2);
}

.login-submit {
    width: 100%;
    margin-top: 0.5rem;
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: var(--accent);
    color: var(--text-inverse);
    border: 1px solid var(--accent-hover);
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    letter-spacing: 0.01em;
}

.login-submit:hover {
    background: var(--accent-hover);
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.login-submit:active {
    transform: translateY(0);
}

.login-submit svg {
    transform: scaleX(-1);
}

.login-footer-note {
    margin-top: 1.75rem;
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-muted);
}

@media (max-width: 768px) {
    .login-body {
        padding: 0.75rem;
        padding-top: max(0.75rem, env(safe-area-inset-top, 0px));
        padding-bottom: max(0.75rem, env(safe-area-inset-bottom, 0px));
        align-items: stretch;
        justify-content: flex-start;
        min-height: 100dvh;
        min-height: 100vh;
        overflow-x: hidden;
        overflow-y: auto;
    }

    .login-shell {
        max-width: 100%;
        width: 100%;
        margin: auto 0;
    }

    .login-card {
        display: flex;
        flex-direction: column;
        grid-template-columns: none;
        min-height: auto;
        border-radius: var(--radius-lg);
    }

    .login-visual {
        flex-shrink: 0;
        padding: 1.25rem 1rem 1rem;
    }

    .login-visual-logo,
    .login-illustration,
    .login-features {
        display: none;
    }

    .login-visual-inner {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0.25rem;
    }

    .login-visual-title {
        font-size: 1.0625rem;
        margin-bottom: 0;
    }

    .login-visual-text {
        font-size: 0.75rem;
        margin-bottom: 0;
        line-height: 1.4;
    }

    .login-panel {
        flex: 1;
        padding: 1.5rem 1.25rem 1.75rem;
    }

    .login-panel-header {
        margin-bottom: 1.5rem;
    }

    .login-panel-logo {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        background: var(--bg-muted);
        border: 1px solid var(--border-light);
        border-radius: var(--radius-md);
        font-size: 0.75rem;
        font-weight: 700;
        color: var(--text-muted);
        letter-spacing: 0.05em;
        margin-bottom: 1rem;
    }

    .login-title {
        font-size: 1.25rem;
    }

    .login-subtitle {
        font-size: 0.8125rem;
    }

    .login-error {
        font-size: 0.8125rem;
        align-items: flex-start;
        line-height: 1.5;
    }

    .login-input-group {
        min-height: 48px;
    }

    .login-input-field {
        font-size: 1rem;
        padding: 0.75rem 0.5rem;
    }

    .login-input-field::placeholder {
        font-size: 0.9375rem;
    }

    .login-password-toggle {
        width: 44px;
        height: 44px;
    }

    .login-submit {
        min-height: 50px;
        font-size: 1rem;
        margin-top: 0.75rem;
    }

    .login-footer-note {
        margin-top: 1.25rem;
        line-height: 1.5;
    }

    .login-bg-shape--1 {
        width: 240px;
        height: 240px;
        top: -80px;
        left: -60px;
    }

    .login-bg-shape--2 {
        width: 160px;
        height: 160px;
        bottom: -40px;
        right: -30px;
    }

    .login-bg-shape--3 {
        display: none;
    }
}

@media (max-width: 480px) {
    .login-body {
        padding: 0.5rem;
        padding-top: max(0.5rem, env(safe-area-inset-top, 0px));
        padding-bottom: max(0.5rem, env(safe-area-inset-bottom, 0px));
    }

    .login-card {
        border-radius: var(--radius-md);
        box-shadow: var(--shadow-md);
    }

    .login-visual {
        padding: 1rem 0.875rem 0.875rem;
    }

    .login-visual-title {
        font-size: 1rem;
    }

    .login-panel {
        padding: 1.25rem 1rem 1.5rem;
    }

    .login-panel-header {
        margin-bottom: 1.25rem;
    }

    .login-panel-logo {
        width: 36px;
        height: 36px;
        margin-bottom: 0.875rem;
    }

    .login-title {
        font-size: 1.125rem;
    }

    .login-form .form-group {
        margin-bottom: 1rem;
    }
}

@media (max-width: 380px) {
    .login-body {
        padding: 0.375rem;
        padding-top: max(0.375rem, env(safe-area-inset-top, 0px));
        padding-bottom: max(0.375rem, env(safe-area-inset-bottom, 0px));
    }

    .login-panel {
        padding: 1rem 0.875rem 1.25rem;
    }

    .login-submit span {
        font-size: 0.9375rem;
    }
}

/* Main layout */
.main {
    padding: 2rem 1.5rem 3rem;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
}

.container-wide {
    max-width: 880px;
    margin: 0 auto;
}

/* Page header */
.page-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-default);
}

.page-header h1 {
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.01em;
    margin-bottom: 0.25rem;
}

.page-header p {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.page-header-with-action {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn-report-link,
.btn-secondary-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.625rem 1rem;
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    background: var(--bg-card);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 600;
    white-space: nowrap;
    transition: all var(--transition);
    min-height: 42px;
}

.btn-report-link:hover,
.btn-secondary-link:hover {
    color: var(--text-primary);
    border-color: var(--border-strong);
    background: var(--bg-muted);
    box-shadow: var(--shadow-sm);
}

/* Cards */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    margin-bottom: 1.25rem;
    overflow: hidden;
}

.card-header {
    padding: 1rem 1.5rem;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    gap: 0.625rem;
}

.card-header-icon {
    width: 28px;
    height: 28px;
    background: var(--bg-muted);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    color: var(--text-secondary);
    flex-shrink: 0;
}

.card-header h2 {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.card-body {
    padding: 1.5rem;
}

/* Forms */
.form-group {
    margin-bottom: 1.25rem;
}

.form-group:last-of-type {
    margin-bottom: 0;
}

label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    margin-bottom: 0.375rem;
    color: var(--text-secondary);
    text-transform: none;
    letter-spacing: 0.01em;
}

.form-select,
.form-input {
    width: 100%;
    padding: 0.625rem 0.875rem;
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    font-size: 0.9375rem;
    font-family: inherit;
    background: var(--bg-card);
    color: var(--text-primary);
    transition: border-color var(--transition), box-shadow var(--transition);
    appearance: none;
}

.form-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23737373' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 0.875rem center;
    padding-left: 2rem;
}

.form-select:hover,
.form-input:hover {
    border-color: var(--border-strong);
}

.form-select:focus,
.form-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(64, 64, 64, 0.12);
}

.form-input::placeholder {
    color: var(--text-muted);
}

/* Buttons */
.btn-primary,
.btn-save,
.btn-add {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.6875rem 1.25rem;
    background: var(--accent);
    color: var(--text-inverse);
    border: 1px solid var(--accent-hover);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all var(--transition);
    letter-spacing: 0.02em;
}

.btn-save {
    width: 100%;
    margin-top: 1.5rem;
    padding: 0.75rem;
}

.btn-primary:hover,
.btn-save:hover,
.btn-add:hover {
    background: var(--accent-hover);
    box-shadow: var(--shadow-sm);
}

.btn-primary:active,
.btn-save:active,
.btn-add:active {
    transform: translateY(1px);
}

.btn-add {
    flex-shrink: 0;
    align-self: flex-end;
    min-height: 42px;
}

/* Messages */
.messages {
    margin-bottom: 1.25rem;
}

.message {
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    background: var(--success-bg);
    color: var(--success-text);
    border: 1px solid var(--success-border);
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.message::before {
    content: '✓';
    font-weight: 700;
    color: var(--text-secondary);
}

.errorlist {
    list-style: none;
    color: var(--text-secondary);
    font-size: 0.8125rem;
    margin-top: 0.375rem;
    padding-right: 0.25rem;
}

.errorlist li::before {
    content: '— ';
    color: var(--border-strong);
}

/* Table */
.table-wrap {
    overflow-x: auto;
    margin: -0.25rem;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

thead {
    border-bottom: 2px solid var(--border-default);
}

th {
    padding: 0.75rem 1rem;
    text-align: right;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    background: var(--bg-surface);
}

td {
    padding: 0.75rem 1rem;
    text-align: right;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-light);
}

tbody tr:hover td {
    background: var(--bg-surface);
}

tbody tr:last-child td {
    border-bottom: none;
}

td.quantity-cell {
    font-weight: 600;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
}

.container .table-wrap {
    overflow-x: visible;
    margin: 0;
}

.container .responsive-table th,
.container .responsive-table td {
    padding: 0.625rem 0.75rem;
}

.container .responsive-table .table-action-select {
    min-width: 6.5rem;
    max-width: 8rem;
}

@media (max-width: 768px) {
    .container .responsive-table thead {
        display: none;
    }

    .container .responsive-table tbody tr {
        display: block;
        background: var(--bg-surface);
        border: 1px solid var(--border-light);
        border-radius: var(--radius-md);
        margin-bottom: 0.625rem;
        padding: 0.25rem 0;
    }

    .container .responsive-table tbody tr:last-child {
        margin-bottom: 0;
    }

    .container .responsive-table tbody tr:hover td {
        background: transparent;
    }

    .container .responsive-table td {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 1rem;
        padding: 0.625rem 0.875rem;
        border-bottom: 1px solid var(--border-light);
        text-align: left;
    }

    .container .responsive-table td:last-child {
        border-bottom: none;
    }

    .container .responsive-table td::before {
        content: attr(data-label);
        font-size: 0.75rem;
        font-weight: 700;
        color: var(--text-muted);
        text-transform: uppercase;
        letter-spacing: 0.04em;
        flex-shrink: 0;
    }

    .container .responsive-table td.quantity-cell {
        font-size: 0.9375rem;
    }
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 2.5rem 1.5rem;
    color: var(--text-muted);
}

.empty-state-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 0.75rem;
    background: var(--bg-muted);
    border: 1px dashed var(--border-default);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: var(--text-muted);
}

.empty-state p {
    font-size: 0.875rem;
}

/* Settings */
.settings-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
    padding: 0.375rem;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
}

.settings-tab {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 600;
    transition: background var(--transition), color var(--transition);
}

.settings-tab:hover {
    background: var(--bg-surface);
    color: var(--text-primary);
}

.settings-tab.is-active {
    background: var(--bg-header);
    color: var(--text-inverse);
}

.settings-tab.is-active .item-count {
    background: rgba(255, 255, 255, 0.15);
    color: var(--text-inverse-muted);
}

.settings-tab-panels {
    max-width: 720px;
}

.settings-panel {
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--bg-card);
}

.settings-panel-single {
    width: 100%;
}

.settings-panel-header {
    padding: 0.875rem 1.125rem;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-light);
}

.settings-panel-header h2 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.settings-panel-body {
    padding: 1.125rem;
}

.threshold-summary {
    margin-top: 1.25rem;
    padding: 1rem;
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.threshold-summary p {
    margin: 0 0 0.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.threshold-summary ul {
    margin: 0;
    padding-right: 1.25rem;
}

.threshold-summary li {
    margin-bottom: 0.35rem;
}

.item-threshold-meta {
    display: block;
    margin-top: 0.2rem;
    font-size: 0.8rem;
    color: var(--text-muted, var(--text-secondary));
    font-weight: 400;
}

.legend-hint {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.item-list-tall {
    max-height: 420px;
}

.inline-form-row {
    flex-wrap: wrap;
}

.inline-form-row .form-group {
    flex: 1 1 180px;
}


.inline-form-row {
    flex-wrap: wrap;
}

.inline-form-row .form-group {
    flex: 1 1 180px;
}

.inline-form {
    display: flex;
    gap: 0.625rem;
    align-items: flex-end;
}

.inline-form .form-group {
    flex: 1;
    margin-bottom: 0;
}

.item-list {
    list-style: none;
    margin-top: 1rem;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    max-height: 240px;
    overflow-y: auto;
}

.item-list li {
    padding: 0.625rem 0.875rem;
    border-bottom: 1px solid var(--border-light);
    color: var(--text-secondary);
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    transition: background var(--transition);
}

.item-list li:hover {
    background: var(--bg-surface);
}

.item-list li::before {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--border-strong);
    border-radius: 50%;
    flex-shrink: 0;
}

.item-list li > span {
    flex: 1;
    min-width: 0;
}

.item-list li:not(.empty-note) {
    display: grid;
    grid-template-columns: 6px 1fr auto;
    align-items: center;
}

.item-edit-link {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-decoration: none;
    white-space: nowrap;
}

.item-edit-link:hover {
    color: var(--text-primary);
    text-decoration: underline;
}

.item-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.item-delete-form {
    display: inline;
    margin: 0;
}

.item-delete-link {
    font-size: 0.75rem;
    font-family: inherit;
    color: #b91c1c;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    white-space: nowrap;
}

.item-delete-link:hover {
    text-decoration: underline;
}

.inline-form-stacked {
    flex-direction: column;
    align-items: stretch;
}

.inline-form-stacked .btn-add {
    width: 100%;
}

.item-list li:last-child {
    border-bottom: none;
}

.item-list .empty-note {
    padding: 1.25rem;
    display: flex;
    justify-content: center;
    color: var(--text-muted);
    font-size: 0.8125rem;
}

.item-list .empty-note::before {
    display: none;
}

.item-list .empty-note::before {
    display: none;
}

.item-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.375rem;
    height: 1.375rem;
    padding: 0 0.375rem;
    background: var(--bg-muted);
    border: 1px solid var(--border-default);
    border-radius: 999px;
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-right: auto;
}

/* Report / dashboard */
.date-range-form {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr auto;
    gap: 1rem;
    align-items: end;
}

.date-range-form-wide {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.date-range-form-wide .dashboard-form-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
}

.date-range-form .form-group {
    margin-bottom: 0;
}

.btn-filter {
    min-height: 42px;
    white-space: nowrap;
}

.form-hint {
    margin-top: 0.875rem;
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.jalali-date-input {
    cursor: pointer;
    background-color: var(--bg-card);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23737373' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2' ry='2'/%3E%3Cline x1='16' y1='2' x2='16' y2='6'/%3E%3Cline x1='8' y1='2' x2='8' y2='6'/%3E%3Cline x1='3' y1='10' x2='21' y2='10'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 0.875rem center;
    padding-left: 2.5rem;
}

.jalali-date-input:focus {
    cursor: pointer;
}

/* Timepicker (user-friendly-time-picker) */
.timepicker-wrap {
    position: relative;
}

.timepicker-group {
    overflow: visible;
}

.card:has(.overtime-form),
.card:has(.leave-form) {
    overflow: visible;
}

.bs-timepicker {
    cursor: pointer;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 1.125rem 1.25rem;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.stat-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
}

.stat-value-sm {
    font-size: 0.9375rem;
    font-weight: 600;
    line-height: 1.5;
}

/* Employee dashboard */
.dashboard-filter-form {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.875rem;
    align-items: flex-end;
}

.dashboard-filter-form .form-group {
    margin-bottom: 0;
    min-width: 0;
    flex: 1 1 140px;
}

.dashboard-filter-form .btn-filter,
.dashboard-filter-form .dashboard-form-actions {
    flex: 0 0 auto;
    margin-top: 0;
}

.dashboard-form-actions {
    display: flex;
    gap: 0.625rem;
    flex: 0 0 auto;
    align-items: flex-end;
}

.btn-export {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.6875rem 1.25rem;
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all var(--transition);
    min-height: 42px;
    white-space: nowrap;
}

.btn-export:hover {
    background: var(--bg-surface);
    border-color: var(--border-strong);
}

/* Record work form — horizontal on desktop/laptop, vertical on tablet/mobile */
.record-form {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 0.75rem;
    align-items: flex-end;
}

.record-form .form-group {
    margin-bottom: 0;
    min-width: 0;
    flex: 1 1 0;
}

.record-form .form-group-quantity {
    flex: 0 0 5.5rem;
}

.record-form .btn-save {
    flex: 0 0 auto;
    width: auto;
    margin-top: 0;
    min-height: 42px;
    white-space: nowrap;
}

.record-form .form-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 0 0 auto;
}

.edit-mode-hint {
    margin: 0 0 1rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.table-action-select {
    width: auto;
    min-width: 7rem;
    max-width: 9rem;
    padding: 0.4rem 0.625rem;
    padding-left: 1.75rem;
    font-size: 0.8125rem;
}

.overtime-form {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 0.875rem;
    align-items: flex-end;
}

.overtime-form .form-group {
    margin-bottom: 0;
    min-width: 0;
    flex: 1 1 140px;
}

.overtime-form .form-group:nth-child(3),
.overtime-form .form-group:nth-child(4) {
    flex: 0 1 170px;
}

.overtime-form .btn-save {
    flex: 0 0 auto;
    width: auto;
    margin-top: 0;
    min-height: 42px;
    white-space: nowrap;
}

.overtime-form .form-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 0 0 auto;
}

.leave-form {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.875rem;
    align-items: flex-end;
}

.leave-form > .form-group {
    margin-bottom: 0;
    min-width: 0;
    flex: 1 1 140px;
}

.leave-form .form-group-checkbox {
    flex: 0 0 auto;
    min-width: 130px;
}

.checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    min-height: 42px;
    user-select: none;
}

.form-checkbox {
    width: 1.125rem;
    height: 1.125rem;
    accent-color: var(--accent);
    cursor: pointer;
}

.leave-daily-fields,
.leave-hourly-fields {
    display: flex;
    flex-wrap: wrap;
    gap: 0.875rem;
    flex: 1 1 100%;
    align-items: flex-end;
}

.leave-form .leave-daily-fields .form-group,
.leave-form .leave-hourly-fields .form-group {
    flex: 1 1 140px;
    margin-bottom: 0;
}

.leave-form .leave-hourly-fields .timepicker-group {
    flex: 0 1 170px;
}

.leave-form .btn-save {
    flex: 0 0 auto;
    width: auto;
    margin-top: 0;
    min-height: 42px;
    white-space: nowrap;
}

.leave-form .form-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 0 0 auto;
}

.dashboard-title-bar {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
    padding-bottom: 0.875rem;
    border-bottom: 1px solid var(--border-default);
    flex-wrap: wrap;
}

.dashboard-title-bar h2 {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
}

.dashboard-title-bar span {
    font-size: 0.9375rem;
    color: var(--text-muted);
    font-weight: 600;
}

.stats-grid-6 {
    grid-template-columns: repeat(3, 1fr);
}

.dashboard-insights {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.charts-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    margin-bottom: 1.25rem;
}

.charts-grid .card {
    margin-bottom: 0;
}

.insight-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 1.125rem 1.25rem;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.insight-best {
    border-right: 4px solid var(--accent);
}

.insight-worst {
    border-right: 4px solid var(--border-strong);
}

.insight-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
}

.insight-value {
    font-size: 1.0625rem;
    font-weight: 700;
    color: var(--text-primary);
}

.insight-meta {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.chart-container {
    position: relative;
    height: 320px;
    width: 100%;
}

.chart-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

.legend-item {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
}

.legend-color {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 2px;
}

.legend-high { background: #404040; }
.legend-mid { background: #737373; }
.legend-low { background: #a3a3a3; }
.legend-none { background: #e5e5e5; }

.day-row-high td {
    background: rgba(64, 64, 64, 0.06);
}

.day-row-low td {
    background: rgba(163, 163, 163, 0.12);
}

.day-row-empty td {
    color: var(--text-muted);
}

/* Footer */
.footer {
    text-align: center;
    padding: 1rem;
    padding-bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
    font-size: 0.75rem;
    color: var(--text-muted);
    border-top: 1px solid var(--border-light);
    margin-top: 1rem;
}

@media (max-width: 1024px) {
    .container,
    .container-wide {
        max-width: 100%;
    }
}

/* Responsive — tablet & mobile header */
@media (max-width: 1024px) {
    .header-inner {
        display: grid;
        grid-template-columns: 1fr auto auto;
        grid-template-areas:
            "brand user toggle"
            "nav nav nav";
        align-items: center;
        height: auto;
        min-height: 56px;
        padding: 0.625rem 1rem;
        padding-top: calc(0.625rem + env(safe-area-inset-top, 0px));
        gap: 0.625rem;
        max-width: 100%;
    }

    .header-brand,
    .header-nav,
    .header-user,
    .header-menu-toggle {
        order: unset;
    }

    .header-brand {
        grid-area: brand;
        justify-content: flex-start;
    }

    .header-subtitle {
        display: none;
    }

    .header-menu-toggle {
        display: flex;
        grid-area: toggle;
    }

    .header-user {
        grid-area: user;
        width: auto;
        padding-top: 0;
    }

    .header-username {
        display: none;
    }

    .header-nav {
        grid-area: nav;
        display: none;
        flex-direction: column;
        width: 100%;
        padding: 0;
        background: transparent;
        border: none;
        gap: 0.25rem;
        flex: none;
        justify-content: flex-start;
    }

    .header-nav.is-open {
        display: flex;
        padding-top: 0.25rem;
        border-top: 1px solid rgba(255, 255, 255, 0.08);
    }

    .header-nav a {
        flex: none;
        width: 100%;
        justify-content: flex-start;
        text-align: right;
        padding: 0.75rem 1rem;
        min-height: 44px;
        white-space: normal;
        border-radius: var(--radius-sm);
        background: var(--bg-header-alt);
        border: 1px solid rgba(255, 255, 255, 0.06);
    }

    .header-nav a.active {
        border-color: rgba(255, 255, 255, 0.12);
    }

    .record-form {
        flex-direction: column;
        flex-wrap: wrap;
        align-items: stretch;
        gap: 0.875rem;
    }

    .record-form .form-group,
    .record-form .form-group-quantity {
        flex: 1 1 auto;
        width: 100%;
    }

    .record-form .form-actions {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
    }

    .record-form .btn-save {
        width: 100%;
    }

    .record-form .form-actions .btn-secondary-link {
        text-align: center;
        padding: 0.5rem;
    }
}


@media (max-width: 768px) {
    .settings-tabs {
        gap: 0.375rem;
        padding: 0.25rem;
    }

    .settings-tab {
        flex: 1 1 calc(50% - 0.375rem);
        justify-content: center;
        padding: 0.625rem 0.5rem;
        font-size: 0.8125rem;
    }

    .settings-tab-panels {
        max-width: 100%;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .date-range-form {
        grid-template-columns: 1fr;
    }

    .dashboard-insights {
        grid-template-columns: 1fr;
    }

    .charts-grid {
        grid-template-columns: 1fr;
    }

    .stats-grid-6 {
        grid-template-columns: 1fr 1fr;
    }

    .chart-container {
        height: 260px;
    }

    .btn-filter {
        width: 100%;
    }

    .dashboard-form-actions {
        width: 100%;
        flex-direction: column;
    }

    .dashboard-form-actions .btn-export {
        width: 100%;
    }

    .page-header h1 {
        font-size: 1.25rem;
    }

    .card-body {
        padding: 1.25rem;
    }

    .card-header {
        padding: 0.875rem 1.25rem;
    }
}

/* Responsive — mobile */
@media (max-width: 640px) {
    html {
        font-size: 15px;
    }

    body {
        overflow-x: hidden;
    }

    .main {
        padding: 1rem 0.875rem 1.5rem;
        padding-left: calc(0.875rem + env(safe-area-inset-left, 0px));
        padding-right: calc(0.875rem + env(safe-area-inset-right, 0px));
    }

    .page-header {
        margin-bottom: 1.25rem;
        padding-bottom: 0.875rem;
    }

    .page-header h1 {
        font-size: 1.125rem;
    }

    .page-header p {
        font-size: 0.8125rem;
    }

    .card {
        margin-bottom: 1rem;
        border-radius: var(--radius-md);
    }

    .card-body {
        padding: 1rem;
    }

    .card-header {
        padding: 0.75rem 1rem;
    }

    .card-header h2 {
        font-size: 0.875rem;
    }

    .form-select,
    .form-input {
        font-size: 16px;
        padding: 0.75rem 0.875rem;
        min-height: 44px;
    }

    .btn-save,
    .btn-add,
    .btn-primary {
        min-height: 44px;
        font-size: 0.9375rem;
    }

    .btn-save {
        margin-top: 1.25rem;
    }

    .dashboard-filter-form {
        flex-direction: column;
        align-items: stretch;
        overflow-x: visible;
    }

    .dashboard-filter-form .form-group {
        flex: 1 1 auto;
        width: 100%;
    }

    .record-form .btn-save {
        white-space: normal;
    }

    .table-action-select {
        max-width: 100%;
    }

    .overtime-form {
        flex-direction: column;
        align-items: stretch;
        flex-wrap: wrap;
        overflow-x: visible;
    }

    .overtime-form .form-group {
        flex: 1 1 auto;
        width: 100%;
    }

    .overtime-form .form-group:nth-child(3),
    .overtime-form .form-group:nth-child(4) {
        flex: 1 1 auto;
    }

    .overtime-form .btn-save {
        width: 100%;
        white-space: normal;
    }

    .leave-form {
        flex-direction: column;
        align-items: stretch;
    }

    .leave-form > .form-group,
    .leave-form .leave-daily-fields .form-group,
    .leave-form .leave-hourly-fields .form-group {
        flex: 1 1 auto;
        width: 100%;
    }

    .leave-form .leave-daily-fields,
    .leave-form .leave-hourly-fields {
        flex-direction: column;
        align-items: stretch;
    }

    .leave-form .btn-save {
        width: 100%;
        white-space: normal;
    }

    .inline-form {
        flex-direction: column;
        align-items: stretch;
    }

    .btn-add {
        width: 100%;
    }

    .settings-panel-body {
        padding: 1rem;
    }

    .settings-panel-header {
        padding: 0.75rem 1rem;
    }

    .settings-panel-header h2 {
        display: flex;
        align-items: center;
        flex-wrap: wrap;
        gap: 0.375rem;
    }

    .item-list {
        max-height: none;
    }

    /* Table → card layout on mobile */
    .table-wrap {
        overflow-x: visible;
        margin: 0;
    }

    .responsive-table thead {
        display: none;
    }

    .responsive-table tbody tr {
        display: block;
        background: var(--bg-surface);
        border: 1px solid var(--border-light);
        border-radius: var(--radius-md);
        margin-bottom: 0.625rem;
        padding: 0.25rem 0;
    }

    .responsive-table tbody tr:last-child {
        margin-bottom: 0;
    }

    .responsive-table tbody tr:hover td {
        background: transparent;
    }

    .responsive-table td {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 1rem;
        padding: 0.625rem 0.875rem;
        border-bottom: 1px solid var(--border-light);
        text-align: left;
    }

    .responsive-table td:last-child {
        border-bottom: none;
    }

    .responsive-table td::before {
        content: attr(data-label);
        font-size: 0.75rem;
        font-weight: 700;
        color: var(--text-muted);
        text-transform: uppercase;
        letter-spacing: 0.04em;
        flex-shrink: 0;
    }

    .responsive-table td.quantity-cell {
        font-size: 0.9375rem;
    }

    .empty-state {
        padding: 2rem 1rem;
    }

    .message {
        font-size: 0.8125rem;
        padding: 0.625rem 0.875rem;
    }
}

/* Responsive — small phones */
@media (max-width: 380px) {
    html {
        font-size: 14px;
    }

    .header-title {
        font-size: 0.875rem;
    }

    .header-logo {
        width: 28px;
        height: 28px;
        font-size: 0.65rem;
    }

    .responsive-table td {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
        text-align: right;
    }

    .responsive-table td::before {
        font-size: 0.6875rem;
    }
}
