:root {
    --green: #00740d;
    --yellow: #ff9000;
    --black: #0b0b0b;
    --white: #ffffff;
    --light: #f6f5f2;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Palatino Linotype", "Book Antiqua", Palatino, serif;
    background: radial-gradient(circle at top left, rgba(255, 144, 0, 0.18) 0%, #f6f5f2 45%, rgba(0, 116, 13, 0.14) 100%);
    color: var(--black);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    background: linear-gradient(90deg, #ffffff 0%, rgba(0, 116, 13, 0.08) 50%, rgba(255, 144, 0, 0.12) 100%);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 0;
    z-index: 10;
    gap: 20px;
}

.brand {
    font-weight: 700;
    font-size: 1.4rem;
    letter-spacing: 1px;
    color: var(--green);
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    position: relative;
}

.nav-group {
    position: relative;
    flex-shrink: 0;
}

.nav-group.is-collapsible {
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.nav-trigger {
    border: none;
    background: rgba(255, 255, 255, 0.7);
    color: var(--black);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.72rem;
    padding: 10px 16px;
    border-radius: 999px;
    cursor: pointer;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
    transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.nav-trigger::after {
    content: "▾";
    display: inline-block;
    margin-left: 8px;
    font-size: 0.75rem;
    transition: transform 0.2s ease;
}

.nav-group.is-open .nav-trigger {
    background: var(--green);
    color: var(--white);
    box-shadow: 0 10px 18px rgba(0, 116, 13, 0.24);
}

.nav-group.is-open .nav-trigger::after {
    transform: rotate(180deg);
}

.nav-items {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    display: none;
    flex-direction: column;
    gap: 6px;
    padding: 10px 12px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 18px 32px rgba(0, 0, 0, 0.12);
    min-width: 220px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    z-index: 15;
}

.nav-group.is-open .nav-items,
.nav-group:focus-within .nav-items {
    display: flex;
}

/* Force-collapse dropdowns unless the group is open */
.nav-group .nav-items {
    display: none !important;
}
.nav-group.is-open .nav-items,
.nav-group:focus-within .nav-items {
    display: flex !important;
}

.site-nav a {
    text-decoration: none;
    color: var(--black);
    font-weight: 600;
    padding: 8px 14px;
    border-radius: 999px;
    transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.site-nav a:hover {
    color: var(--green);
    background: rgba(0, 116, 13, 0.1);
}

.site-nav a.is-active {
    color: var(--white);
    background: var(--green);
    box-shadow: 0 10px 18px rgba(0, 116, 13, 0.24);
}

@media (max-width: 1024px) {
    .nav-items {
        position: static;
        display: none;
        box-shadow: none;
        padding: 8px 0 0;
        min-width: 0;
        border: none;
    }

    .nav-group.is-collapsible {
        width: 100%;
    }

    .nav-group.is-open .nav-items,
    .nav-group:focus-within .nav-items {
        display: flex;
    }
}

/* Laptop-friendly compact layout (1366x768 and similar) */
@media (max-width: 1400px) and (max-height: 820px) {
    .site-header {
        padding: 14px 16px;
        gap: 12px;
    }
    .nav-trigger {
        padding: 8px 12px;
        font-size: 0.68rem;
    }
    .site-nav a {
        padding: 6px 10px;
        font-size: 0.9rem;
    }
    .dashboard-header {
        padding: 12px 16px;
    }
    .dashboard-header-actions {
        gap: 6px;
    }
    .panel {
        padding: 14px 14px 12px;
    }
    .panel-header {
        flex-wrap: wrap;
        gap: 8px;
    }
    .table-toolbar {
        flex-wrap: wrap;
        gap: 6px;
    }
    .admin-table th,
    .admin-table td {
        padding: 8px 10px;
    }
    .table-wrap {
        max-height: calc(100vh - 280px);
        overflow: auto;
    }
    .stats-grid .stat {
        padding: 10px 12px;
    }
    .card,
    .modal.card,
    .modal-card {
        padding: 16px;
    }
}

.user-menu {
    position: relative;
}

.notif-menu {
    position: relative;
    margin-left: 12px;
}

.notif-button {
    border: none;
    background: linear-gradient(120deg, rgba(255, 255, 255, 0.95), rgba(0, 116, 13, 0.08));
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 700;
    color: var(--black);
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08), 0 8px 18px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.notif-button:focus {
    outline: 2px solid rgba(0, 116, 13, 0.35);
    outline-offset: 2px;
}

.notif-button:hover {
    transform: translateY(-1px);
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08), 0 12px 20px rgba(0, 0, 0, 0.12);
}

.notif-button--messages {
    background: linear-gradient(120deg, rgba(255, 255, 255, 0.95), rgba(255, 144, 0, 0.14));
}

.notif-button--messages .notif-icon svg {
    fill: #b55a00;
}

.notif-button--pulse .notif-badge--messages,
.notif-button--pulse-once .notif-badge--messages {
    animation: notif-badge-pulse 2.2s ease-in-out infinite;
}

.notif-button--pulse-once .notif-badge--messages {
    animation-iteration-count: 3;
}

.notif-icon svg {
    width: 18px;
    height: 18px;
    fill: var(--green);
    display: block;
}

.notif-label {
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.notif-badge {
    background: var(--yellow);
    color: var(--black);
    font-weight: 700;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 999px;
}

.notif-badge--messages {
    background: #0d1b2a;
    color: var(--white);
}

.notif-dropdown {
    position: absolute;
    right: 0;
    top: calc(100% + 10px);
    background: var(--white);
    border-radius: 16px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.12);
    min-width: 280px;
    max-width: 360px;
    padding: 12px;
    display: none;
    z-index: 25;
}

.notif-dropdown.is-open {
    display: block;
}

.notif-dropdown-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 700;
    margin-bottom: 10px;
    gap: 10px;
}

.notif-dropdown-header a {
    font-size: 0.8rem;
    color: var(--green);
    text-decoration: none;
}

.notif-actions {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.notif-hide {
    border: none;
    background: rgba(0, 0, 0, 0.06);
    color: var(--black);
    font-weight: 700;
    font-size: 0.75rem;
    padding: 6px 10px;
    border-radius: 999px;
    cursor: pointer;
}

.notif-items {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 280px;
    overflow-y: auto;
}

.notif-item {
    padding: 10px;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.notif-item--link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.notif-item.is-unread {
    background: rgba(0, 116, 13, 0.12);
    border-color: rgba(0, 116, 13, 0.2);
}

.notif-message {
    font-size: 0.9rem;
    font-weight: 600;
}

.notif-meta {
    font-size: 0.75rem;
    color: rgba(11, 11, 11, 0.6);
    margin-top: 4px;
}

.notif-empty {
    padding: 12px;
    color: rgba(11, 11, 11, 0.6);
}

.notif-dropdown-footer {
    margin-top: 10px;
}

.notif-dropdown-footer .btn {
    width: 100%;
    text-align: center;
}

.user-button {
    border: none;
    background: rgba(0, 116, 13, 0.08);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 600;
    color: var(--black);
}

.message-composer,
.message-feed {
    max-width: 1080px;
}

.message-help {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: rgba(11, 11, 11, 0.72);
}

.mention-chip {
    border: none;
    background: rgba(255, 144, 0, 0.14);
    color: #8c4d00;
    padding: 6px 10px;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 700;
}

.message-stage {
    display: grid;
    grid-template-columns: minmax(24px, 1fr) minmax(0, 940px) minmax(24px, 1fr);
    gap: 20px;
    align-items: stretch;
}

.message-stage-edge {
    border-radius: 28px;
    background:
        radial-gradient(circle at top, rgba(24, 119, 242, 0.12), transparent 45%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.7), rgba(229, 242, 255, 0.35));
    border: 1px solid rgba(24, 119, 242, 0.08);
    min-height: 100%;
}

.message-chat-card {
    padding: 18px;
    border-radius: 28px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(245, 249, 255, 0.98));
    box-shadow: 0 28px 60px rgba(15, 23, 42, 0.08);
}

.message-chat-header {
    margin-bottom: 14px;
}

.message-search-bar {
    margin-bottom: 14px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 170px;
    gap: 12px;
}

.message-search-bar input {
    width: 100%;
    min-height: 46px;
    padding: 0 16px;
    border-radius: 16px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.04);
}

.message-search-bar input:focus {
    outline: none;
    border-color: rgba(24, 119, 242, 0.45);
    box-shadow: 0 0 0 4px rgba(24, 119, 242, 0.12);
}

.message-chat-scroller {
    max-height: 62vh;
    overflow-y: auto;
    padding: 18px;
    border-radius: 24px;
    background:
        linear-gradient(180deg, rgba(239, 246, 255, 0.92), rgba(248, 250, 252, 0.98));
    border: 1px solid rgba(148, 163, 184, 0.14);
    scroll-behavior: smooth;
}

.message-empty {
    padding: 18px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.88);
    color: rgba(11, 11, 11, 0.7);
    text-align: center;
}

.message-timeline {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.chat-message {
    display: flex;
    align-items: flex-end;
    gap: 10px;
}

.chat-message--own {
    justify-content: flex-end;
}

.chat-message-avatar {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--chat-accent);
    color: #fff;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.14);
}

.chat-message-content {
    max-width: min(72%, 640px);
    display: grid;
    gap: 6px;
}

.chat-message--own .chat-message-content {
    justify-items: end;
}

.chat-message-meta {
    display: flex;
    gap: 10px;
    align-items: center;
    color: rgba(15, 23, 42, 0.58);
    font-size: 0.84rem;
    padding: 0 6px;
}

.chat-message-author {
    font-weight: 700;
    color: var(--chat-accent);
}

.chat-message-bubble {
    padding: 14px 16px;
    border-radius: 22px;
    background: var(--chat-bubble);
    color: #102033;
    line-height: 1.6;
    border: 1px solid rgba(255, 255, 255, 0.55);
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
    white-space: normal;
    word-break: break-word;
}

.chat-message--own .chat-message-bubble {
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.96), var(--chat-soft));
    color: #102033;
    border-color: rgba(15, 23, 42, 0.12);
}

.chat-message--own .chat-message-bubble,
.chat-message--own .chat-message-bubble * {
    color: #102033;
}

.message-is-new .chat-message-bubble {
    animation: message-highlight 8s ease forwards;
}

.message-composer--chat {
    margin-top: 16px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(148, 163, 184, 0.14);
    box-shadow: none;
}

.message-composer--chat .form-grid {
    gap: 12px;
}

.message-composer textarea {
    min-height: 96px;
    resize: vertical;
}

@media (max-width: 960px) {
    .message-stage {
        grid-template-columns: 1fr;
    }

    .message-stage-edge {
        display: none;
    }
}

@media (max-width: 720px) {
    .message-search-bar {
        grid-template-columns: minmax(0, 1fr);
    }

    .message-chat-card {
        padding: 14px;
        border-radius: 22px;
    }

    .message-chat-scroller {
        max-height: 60vh;
        padding: 12px;
    }

    .chat-message-content {
        max-width: 84%;
    }
}

@keyframes message-highlight {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 144, 0, 0.55);
        background: rgba(255, 144, 0, 0.18);
    }
    100% {
        box-shadow: none;
        background: inherit;
    }
}

@keyframes notif-badge-pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(13, 27, 42, 0.25);
    }
    50% {
        transform: scale(1.12);
        box-shadow: 0 0 0 8px rgba(13, 27, 42, 0);
    }
}

.user-button:focus {
    outline: 2px solid rgba(0, 116, 13, 0.35);
    outline-offset: 2px;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--green);
    color: var(--white);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.user-caret {
    font-size: 0.85rem;
}

.user-dropdown {
    position: absolute;
    right: 0;
    top: calc(100% + 10px);
    background: var(--white);
    border-radius: 16px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.12);
    min-width: 220px;
    padding: 10px;
    display: none;
    z-index: 20;
}

.user-menu:hover .user-dropdown,
.user-menu:focus-within .user-dropdown {
    display: block;
}

.user-dropdown-header {
    padding: 8px 10px 12px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    margin-bottom: 8px;
}

.user-dropdown-name {
    font-weight: 700;
}

.user-dropdown-email {
    font-size: 0.85rem;
    color: rgba(11, 11, 11, 0.65);
}

.user-dropdown-role {
    font-size: 0.8rem;
    font-weight: 700;
    color: rgba(11, 11, 11, 0.7);
    text-transform: uppercase;
    margin-top: 4px;
}

.user-dropdown a {
    display: block;
    padding: 10px;
    border-radius: 10px;
    text-decoration: none;
    color: var(--black);
    font-weight: 600;
}

.user-dropdown a:hover {
    background: rgba(0, 116, 13, 0.08);
}

.user-name {
    font-weight: 700;
}

.site-main {
    padding: 32px 24px 80px;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

body.layout-dashboard .site-main {
    display: block;
    align-items: stretch;
    justify-content: stretch;
}

.hero {
    background: linear-gradient(120deg, rgba(0, 116, 13, 0.1), rgba(255, 144, 0, 0.2));
    border-radius: 24px;
    padding: 48px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08);
}

.hero h1 {
    font-size: 2.6rem;
    margin: 0 0 12px;
}

.hero p {
    font-size: 1.1rem;
    margin: 0 0 24px;
    max-width: 520px;
}

.hero-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 22px;
    border-radius: 999px;
    font-weight: 700;
    border: 2px solid transparent;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.btn-secondary {
    background: transparent;
    color: var(--black);
    border-color: var(--black);
}

.btn-danger {
    background: #b42318;
    color: var(--white);
    border-color: transparent;
}

.btn-danger:hover {
    background: #8e1c13;
}

.btn-view {
    background: linear-gradient(135deg, #0f766e, #16a34a);
    color: var(--white);
    border-color: transparent;
    box-shadow: 0 12px 22px rgba(15, 118, 110, 0.35);
}

.btn-view:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 26px rgba(15, 118, 110, 0.45);
}

.btn-edit {
    background: linear-gradient(135deg, #4338ca, #6366f1);
    color: var(--white);
    border-color: transparent;
    box-shadow: 0 12px 22px rgba(67, 56, 202, 0.35);
}

.btn-edit:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 26px rgba(67, 56, 202, 0.45);
}

.btn-reset-password {
    background: linear-gradient(135deg, #d97706, #f97316);
    color: #fff9f2;
    border-color: transparent;
    box-shadow: 0 12px 22px rgba(217, 119, 6, 0.35);
}

.btn-reset-password:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 26px rgba(217, 119, 6, 0.45);
}

.btn-toggle {
    border-color: transparent;
    box-shadow: 0 12px 20px rgba(15, 15, 15, 0.08);
}

.btn-toggle--active {
    background: #34d399;
    color: #064e3b;
}

.btn-toggle--inactive {
    background: #ef4444;
    color: #7f1d1d;
}

.btn-toggle:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 28px rgba(15, 15, 15, 0.15);
}

.btn-approve {
    background: #2c9f4d;
    color: var(--white);
}

.btn-reject {
    background: #f6c342;
    color: #1a1a1a;
    border-color: #b89221;
}

.btn-sm {
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.85rem;
}

.highlights {
    margin-top: 32px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.card {
    padding: 24px;
    background: var(--white);
    border-radius: 18px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
}

.auth {
    max-width: 440px;
    width: 100%;
    background: var(--white);
    padding: 36px;
    border-radius: 24px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.12);
    position: relative;
    z-index: 2;
    animation: floatIn 0.7s ease both;
    border: 1px solid rgba(0, 0, 0, 0.04);
    align-self: center;
}

.auth::before,
.auth::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    z-index: -1;
    opacity: 0.55;
}

.auth::before {
    width: 140px;
    height: 140px;
    background: rgba(0, 116, 13, 0.18);
    top: -50px;
    left: -50px;
}

.auth::after {
    width: 120px;
    height: 120px;
    background: rgba(255, 144, 0, 0.2);
    bottom: -40px;
    right: -40px;
}

.auth-wrapper {
    width: 100%;
    max-width: 520px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 22px;
    z-index: 2;
}

.intro-title {
    text-align: center;
}

.intro-title h1 {
    margin: 0;
    font-size: 1.85rem;
    font-weight: 800;
    color: var(--black);
}

.auth-form {
    display: grid;
    gap: 12px;
}

.auth-form input {
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid #d8d8d8;
}

.password-field {
    display: flex;
    align-items: center;
    gap: 8px;
}

.password-field input {
    flex: 1;
}

.toggle-password {
    border: 1px solid rgba(0, 0, 0, 0.2);
    background: var(--white);
    padding: 9px 12px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
}

.toggle-password:hover {
    border-color: var(--green);
    color: var(--green);
}

.field-hint {
    font-size: 0.85rem;
    color: rgba(11, 11, 11, 0.6);
}

.auth-form input:focus {
    outline: none;
    border-color: var(--green);
    box-shadow: 0 0 0 3px rgba(0, 116, 13, 0.15);
}

.alert {
    padding: 12px 14px;
    border-radius: 12px;
    margin-bottom: 16px;
    font-weight: 600;
}

.alert-error {
    background: #ffe8e6;
    color: #8a1f11;
    border: 1px solid #f2b4aa;
}

.alert-success {
    background: #e6f7ec;
    color: #0f5a2d;
    border: 1px solid #b7e2c5;
}

.alert-warning {
    background: #fff6d9;
    color: #856400;
    border: 1px solid #f2e0a6;
}

.input-error {
    border-color: #c0392b;
    box-shadow: 0 0 0 2px rgba(192, 57, 43, 0.25);
}

.quantity-warning {
    font-size: 0.8rem;
    color: #c0392b;
    margin-top: 4px;
    display: block;
}

.alert-blink {
    animation: alertBlink 1.2s linear 4;
}

@keyframes alertBlink {
    0%,
    100% {
        opacity: 1;
    }
    50% {
        opacity: 0.25;
    }
}

.site-footer {
    padding: 18px 24px 28px;
    text-align: center;
    font-weight: 600;
    color: rgba(11, 11, 11, 0.7);
}

body.layout-auth .site-main::before,
body.layout-auth .site-main::after {
    content: "";
    position: absolute;
    width: 220px;
    height: 220px;
    border-radius: 28% 72% 58% 42%;
    background: rgba(255, 144, 0, 0.16);
    top: 10%;
    right: 6%;
    animation: drift 12s ease-in-out infinite;
}

body.layout-auth .site-main::after {
    width: 260px;
    height: 260px;
    background: rgba(0, 116, 13, 0.14);
    bottom: 8%;
    left: 4%;
    animation-delay: -3s;
}

@keyframes floatIn {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes drift {
    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-18px) rotate(4deg);
    }
}

.dashboard {
    display: grid;
    gap: 24px;
    width: 100%;
    max-width: 100%;
    margin: 0;
}

.dashboard-top {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(240px, 1fr);
    gap: 20px;
    align-items: start;
}

.dashboard-header {
    background: var(--white);
    padding: 28px;
    border-radius: 20px;
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.06);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    flex-wrap: wrap;
}

.dashboard-header-content {
    flex: 1 1 auto;
    min-width: 0;
}

.dashboard-header-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
    margin-left: auto;
}

.dashboard-header-actions .inline-form {
    display: inline-flex;
    margin: 0;
    align-items: center;
}

.dashboard-header-actions .inline-form .btn {
    white-space: nowrap;
}

.dashboard-alert {
    margin-top: 16px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
    border-radius: 16px;
    background: radial-gradient(circle at top left, rgba(255, 210, 170, 0.95), rgba(255, 255, 255, 0.92));
    border: 1px solid rgba(255, 144, 0, 0.8);
    box-shadow: 0 18px 35px rgba(255, 144, 0, 0.35);
    animation: dashboard-alert-pulse 1.1s ease-in-out infinite;
    justify-content: flex-start;
}

.dashboard-alert__icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #fff5e1;
    color: var(--black);
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(255, 144, 0, 0.6);
    font-size: 1.2rem;
}

.dashboard-alert__content {
    flex: 1;
    line-height: 1.4;
    max-width: 400px;
}

.dashboard-alert__content strong {
    display: block;
    font-size: 1.05rem;
    margin-bottom: 4px;
}

.dashboard-alert__link {
    color: #0b5024;
    font-weight: 600;
    text-decoration: underline;
}

@keyframes dashboard-alert-pulse {
    0% {
        transform: translateY(0);
        box-shadow: 0 18px 35px rgba(255, 144, 0, 0.25);
    }
    50% {
        transform: translateY(-2px);
        box-shadow: 0 24px 42px rgba(255, 144, 0, 0.45);
    }
    100% {
        transform: translateY(0);
        box-shadow: 0 18px 35px rgba(255, 144, 0, 0.25);
    }
}

@media (prefers-reduced-motion: reduce) {
    .dashboard-alert {
        animation: none;
    }
}

.dashboard-actions {
    display: flex;
    gap: 12px;
    margin-top: 18px;
    flex-wrap: wrap;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
}

.stat {
    padding: 18px;
    background: var(--white);
    border-radius: 16px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.05);
}

.stat span {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--green);
}

.dashboard-panels {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.dashboard-panels .panel-full {
    grid-column: 1 / -1;
}

.panel-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 18px;
    width: 100%;
    align-items: stretch;
}

.panel-grid--with-table {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.panel-grid--with-table .panel {
    min-height: 460px;
}

.panel-table {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.table-wrap--scrollable {
    max-height: 520px;
    overflow-y: auto;
}

.panel {
    padding: 22px;
    background: var(--white);
    border-radius: 18px;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.06);
}

.today-sales-panel .panel-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
}

.today-sales-header h2 {
    margin-bottom: 4px;
}

.today-sales-controls input {
    padding: 8px 12px;
    border-radius: 10px;
    border: 1px solid #d8d8d8;
    min-width: 220px;
    font-size: 0.95rem;
}

.today-sales-controls input:focus {
    outline: none;
    border-color: var(--green);
    box-shadow: 0 0 0 3px rgba(0, 116, 13, 0.12);
}

.today-sales-actions {
    display: flex;
    gap: 6px;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.panel-highlight-border {
    border: 1mm solid var(--green);
    box-shadow: none;
    padding: 22px;
    position: relative;
}

.activity-list {
    list-style: none;
    padding: 0;
    margin: 16px 0 0;
    display: grid;
    gap: 12px;
}

.activity-item {
    padding: 12px 14px;
    border-radius: 12px;
    background: var(--light);
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.activity-title {
    font-weight: 700;
    margin-bottom: 4px;
}

.activity-meta {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    font-size: 0.85rem;
    color: rgba(11, 11, 11, 0.6);
}

.chart-placeholder {
    margin-top: 14px;
    height: 160px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(0, 116, 13, 0.15), rgba(255, 144, 0, 0.2));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: #4a4a4a;
}

.profile-card p {
    margin: 10px 0 0;
}

.form-card {
    max-width: 520px;
    width: 100%;
    margin: 0 auto;
}

.form-grid {
    display: grid;
    gap: 12px;
}

.form-grid--filters {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    align-items: flex-start;
}

.form-grid--filters .form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-grid--filters .filters-actions {
    grid-column: 1 / -1;
    justify-content: flex-end;
    gap: 8px;
}

.expense-payment-form {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 0.9rem;
    align-items: center;
}

.expense-payment-form select {
    padding: 8px 10px;
    border-radius: 10px;
    border: 1px solid #d0d0d0;
    background: var(--white);
}

.expense-payment-form .form-group-inline {
    flex: 1;
    min-width: 120px;
}

.expense-payment-form .bank-account-group {
    display: none;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.cash-summary {
    display: flex;
    gap: 24px;
}

.cash-summary-grid,
.cash-grid,
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.cash-grid div,
.metrics-grid div {
    background: var(--light);
    border-radius: 14px;
    padding: 14px 16px;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06);
}

.cash-grid span,
.metrics-grid span {
    display: block;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(11, 11, 11, 0.6);
    margin-bottom: 6px;
}

.cash-grid strong,
.metrics-grid strong {
    font-size: 1.4rem;
}

.cash-warning {
    color: #c0392b;
    font-size: 0.75rem;
}

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

.form-grid-wide {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.form-grid-2 .form-actions {
    grid-column: 1 / -1;
}

.section-title {
    font-weight: 700;
    margin: 12px 0 8px;
    color: rgba(11, 11, 11, 0.75);
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 4px;
}

.form-grid input,
.form-grid select,
.form-grid textarea {
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid #d8d8d8;
}

.searchable-select {
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
}

.searchable-select input[type="search"] {
    font-size: 0.95rem;
}

.searchable-select-results {
    display: none;
    flex-direction: column;
    border: 1px solid #d8d8d8;
    border-radius: 10px;
    background: var(--white);
    max-height: 220px;
    overflow-y: auto;
    margin-top: 4px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
    z-index: 4;
    gap: 0;
    padding: 4px 0;
}

.searchable-select-results.is-visible {
    display: flex;
}

.searchable-select-option {
    border: none;
    background: none;
    text-align: left;
    padding: 10px 12px;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--black);
    cursor: pointer;
    width: 100%;
}

.searchable-select-option:hover,
.searchable-select-option:focus {
    outline: none;
    background: rgba(0, 116, 13, 0.08);
}

.searchable-select-empty {
    padding: 10px 12px;
    color: rgba(11, 11, 11, 0.6);
    font-weight: 600;
    font-size: 0.9rem;
}

.cash-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
    margin-top: 18px;
}

.cash-summary-grid > div {
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(0, 116, 13, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.cash-summary-grid strong {
    font-size: 0.95rem;
    display: block;
    margin-bottom: 6px;
    color: rgba(0, 0, 0, 0.8);
}

.deposit-metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
    margin-top: 18px;
}

.deposit-metrics-grid > div {
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(255, 144, 0, 0.08);
    border: 1px solid rgba(255, 144, 0, 0.3);
}

.deposit-metrics-grid strong {
    font-size: 0.95rem;
    display: block;
    margin-bottom: 6px;
    color: rgba(0, 0, 0, 0.8);
}

.cash-summary-grid small {
    color: rgba(11, 11, 11, 0.6);
}

.form-grid input:focus,
.form-grid select:focus,
.form-grid textarea:focus {
    outline: none;
    border-color: var(--green);
    box-shadow: 0 0 0 3px rgba(0, 116, 13, 0.12);
}

.form-note {
    font-size: 0.85rem;
    color: rgba(11, 11, 11, 0.65);
    margin: 0;
}
.form-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-field.full {
    grid-column: 1 / -1;
}

.section-card {
    grid-column: 1 / -1;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 16px;
    padding: 18px;
    background: rgba(0, 116, 13, 0.04);
    display: grid;
    gap: 12px;
}

.section-card__header h3 {
    margin: 0;
    font-size: 1.05rem;
    color: var(--green);
}

.section-card__header p {
    margin: 0;
    color: rgba(11, 11, 11, 0.65);
}

.raw-material-dashboard {
    display: grid;
    gap: 24px;
}

.dashboard-promo {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.6) 50%, rgba(0, 116, 13, 0.04));
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 20px;
    padding: 24px;
    display: grid;
    gap: 16px;
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.06);
}

.dashboard-promo__content {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.dashboard-title {
    margin: 0;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--black);
}

.dashboard-description {
    margin: 0;
    color: rgba(11, 11, 11, 0.64);
    line-height: 1.5;
}

.panel-filter {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    flex-wrap: wrap;
}

.panel-filter__field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 180px;
    font-size: 0.8rem;
    color: rgba(11, 11, 11, 0.65);
}

.panel-filter__field select {
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    background: #fff;
    font-size: 0.95rem;
}

.raw-material-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
    width: 100%;
}

.metric-card {
    padding: 14px 16px;
    border-radius: 16px;
    background: var(--white);
    border: 1px solid rgba(0, 0, 0, 0.08);
    min-height: 96px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.metric-card strong {
    font-size: 1.6rem;
    color: var(--green);
}

.metric-card span {
    font-size: 0.82rem;
    color: rgba(11, 11, 11, 0.6);
    line-height: 1.4;
}

.metric-card--usage strong {
    color: var(--yellow);
}

.metric-card--balance strong {
    color: #0b5024;
}

.metric-card--count strong {
    color: #3b3b3b;
}

.raw-material-grid {
    display: grid;
    gap: 20px;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.section-card--form {
    background: #fff;
}

.section-card--summary {
    background: #fff;
}

.section-card--info {
    background: #fff;
}

.info-card {
    padding: 16px;
    border-radius: 14px;
    border: 1px dashed rgba(0, 0, 0, 0.15);
    background: rgba(0, 116, 13, 0.05);
    color: rgba(0, 0, 0, 0.75);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.info-card p {
    margin: 0;
    flex: 1 1 220px;
}

.info-card .btn {
    flex: 0 0 auto;
}

.form-grid--stacked {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}

.summary-badge {
    background: var(--white);
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid rgba(0, 0, 0, 0.07);
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.03);
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.summary-badge strong {
    font-size: 1rem;
    color: var(--green);
}

.summary-badge span {
    font-size: 0.9rem;
    color: rgba(11, 11, 11, 0.65);
}

.summary-meta {
    font-size: 0.78rem;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: rgba(11, 11, 11, 0.5);
}

.empty-state {
    grid-column: 1 / -1;
    padding: 18px;
    border-radius: 12px;
    border: 1px dashed rgba(0, 0, 0, 0.2);
    text-align: center;
    color: rgba(11, 11, 11, 0.65);
}


.company-info-summary {
    display: grid;
    gap: 16px;
    background: rgba(255, 255, 255, 0.6);
}

.company-info-summary-body {
    display: flex;
    gap: 24px;
    align-items: center;
    flex-wrap: wrap;
}

.company-info-logo {
    width: 160px;
    height: 160px;
    border-radius: 16px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.company-info-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.company-info-logo--empty {
    font-weight: 700;
    color: rgba(11, 11, 11, 0.45);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.85rem;
}

.company-info-summary-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin: 0;
}

.company-info-summary-list dt {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(11, 11, 11, 0.65);
    margin-bottom: 4px;
}

.company-info-summary-list dd {
    margin: 0;
    font-weight: 600;
}

.company-info-form-wrapper.is-hidden {
    display: none;
}

.company-info-form-wrapper.is-visible {
    display: block;
}

.company-info-form-wrapper .panel-subtitle {
    margin: 4px 0 0;
    color: rgba(11, 11, 11, 0.6);
}
.client-page {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-top: 16px;
}

.client-panel {
    padding: 20px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 18px 32px rgba(0, 0, 0, 0.06);
}

.client-panel h2 {
    margin-top: 0;
    margin-bottom: 12px;
}

.client-search-bar {
    margin-bottom: 12px;
}

.client-search-bar input {
    width: 100%;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, 0.15);
    background: rgba(250, 250, 250, 0.9);
    font-size: 0.95rem;
}

.client-search-bar input:focus {
    border-color: var(--green);
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 116, 13, 0.15);
}

.client-panel-header {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.client-toolbar {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.client-toolbar .btn {
    flex-shrink: 0;
}

.client-history-controls {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.client-history-controls label {
    font-size: 0.85rem;
    font-weight: 600;
    color: rgba(11, 11, 11, 0.7);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.client-history-controls select,
.client-history-controls input[type="date"] {
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, 0.18);
    padding: 8px 10px;
    font-size: 0.9rem;
    background: rgba(250, 250, 250, 0.95);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.client-history-controls select:focus,
.client-history-controls input[type="date"]:focus {
    outline: none;
    border-color: var(--green);
    box-shadow: 0 0 0 3px rgba(0, 116, 13, 0.2);
}

.client-history-export {
    margin-left: auto;
    align-self: flex-end;
}

.client-table-wrapper {
    overflow-x: auto;
}

.client-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 8px;
}

.client-table th,
.client-table td {
    padding: 12px 14px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    font-size: 0.9rem;
    text-align: left;
}

.client-table thead th {
    background: rgba(0, 116, 13, 0.05);
}

.client-row {
    transition: background 0.2s ease;
}

.client-row:hover,
.client-row.is-selected {
    background: rgba(0, 116, 13, 0.08);
}

.client-row__actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.client-detail-panel {
    min-height: 360px;
}

.client-detail-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.client-history-placeholder {
    min-height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(11, 11, 11, 0.65);
}

.client-history-table {
    width: 100%;
    border-collapse: collapse;
}

.client-history-table th,
.client-history-table td {
    padding: 10px 12px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    font-size: 0.9rem;
    text-align: left;
}

.client-history-table th {
    background: rgba(0, 116, 13, 0.04);
}

.panel-header__tag {
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid rgba(0, 116, 13, 0.5);
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--green);
    font-weight: 600;
}
.timestamp-note {
    font-size: 1.05rem;
    color: var(--green);
    font-weight: 700;
    margin: 8px 0 16px;
}
.sale-total-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid var(--green);
    border-radius: 12px;
    padding: 10px 18px;
    gap: 12px;
    margin-top: 8px;
    background: rgba(0, 116, 13, 0.05);
}

.sale-total-label,
.sale-total-amount {
    font-size: 1.15rem;
    color: var(--green);
    font-weight: 700;
    margin: 0;
    white-space: nowrap;
}

.stock-overview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.stock-overview-meta {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
    align-items: flex-start;
}

.stock-overview-meta > div {
    display: flex;
    flex-direction: column;
}

.stock-overview-meta span {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(11, 11, 11, 0.55);
    font-weight: 700;
}

.stock-overview-meta strong {
    font-size: 1.4rem;
    color: var(--green);
}

.stock-overview-table th,
.stock-overview-table td {
    padding: 12px 10px;
}

.unit-label {
    font-size: 0.78rem;
    color: rgba(11, 11, 11, 0.55);
    display: block;
}

.btn-remove {
    border-color: rgba(220, 38, 38, 0.5);
    color: #7f1d1d;
    background: rgba(220, 38, 38, 0.12);
    box-shadow: none;
    padding: 6px 14px;
}

.btn-remove:hover:not(:disabled) {
    background: rgba(220, 38, 38, 0.2);
}
.table-card {
    background: var(--white);
    border-radius: 18px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 16px 30px rgba(0, 0, 0, 0.05);
    margin: 0;
}

.table-card-header,
.table-card-footer {
    border-radius: 18px 18px 0 0;
}

.table-card-header {
    background: rgba(0, 116, 13, 0.02);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.table-card-header strong {
    color: var(--green);
}

.table-card-footer {
    background: rgba(0, 0, 0, 0.02);
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.table-card .table {
    margin: 0;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    width: 100%;
}

.table-card .table-responsive {
    border-radius: 18px;
    width: 100%;
    overflow-x: auto;
}

.table-card .table th,
.table-card .table td {
    vertical-align: middle;
    border-top: none;
    min-width: 0;
}

.table-card .table td select {
    width: 100%;
    min-width: 0;
}

.today-sales-metrics {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px 0;
    gap: 12px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    margin-bottom: 18px;
}

.today-sales-metrics span {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(11, 11, 11, 0.6);
    font-weight: 700;
}

.today-sales-metrics strong {
    font-size: 1.5rem;
    color: var(--green);
}

.table-card .table thead th {
    font-weight: 700;
    color: rgba(11, 11, 11, 0.6);
}

.btn-add-row {
    background: var(--green);
    color: #fff;
    border: 1px solid rgba(0, 116, 13, 0.5);
    box-shadow: 0 6px 12px rgba(0, 116, 13, 0.12);
}

.table-card .btn-sm {
    border-radius: 10px;
}

.table-wrap {
    overflow-x: auto;
}

.is-hidden {
    display: none;
}

.table-wrap.table-scroll {
    max-height: 420px;
    overflow-y: auto;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 12px;
    background: var(--white);
}

.table-toolbar {
    display: flex;
    justify-content: flex-end;
    margin: 10px 0 14px;
    gap: 12px;
    flex-wrap: wrap;
}

.dashboard-filter-form {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: flex-end;
    padding: 14px 16px;
    margin-top: 6px;
    border: 1px solid #e0e7f0;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(0, 116, 13, 0.06), rgba(255, 144, 0, 0.06) 55%, #fff 100%);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}

.dashboard-filter-form .filter-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 180px;
    flex: 1 1 200px;
}

.dashboard-filter-form label {
    font-size: 0.75rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-weight: 700;
    color: rgba(11, 11, 11, 0.65);
}

.dashboard-filter-form select,
.dashboard-filter-form input[type=\"date\"],
.dashboard-filter-form input[type=\"text\"],
.dashboard-filter-form input[type=\"search\"] {
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid #cbd5e1;
    background: #fff;
    font-size: 0.95rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.08s ease;
}

.dashboard-filter-form select:focus,
.dashboard-filter-form input[type=\"date\"]:focus,
.dashboard-filter-form input[type=\"text\"]:focus,
.dashboard-filter-form input[type=\"search\"]:focus {
    outline: none;
    border-color: #5b8def;
    box-shadow: 0 0 0 3px rgba(91, 141, 239, 0.2);
}

.dashboard-filter-form select:hover,
.dashboard-filter-form input[type=\"date\"]:hover,
.dashboard-filter-form input[type=\"text\"]:hover,
.dashboard-filter-form input[type=\"search\"]:hover {
    border-color: #b0bed8;
}

.dashboard-filter-form .filter-submit {
    flex: 0 0 auto;
    padding: 12px 18px;
    border-radius: 12px;
    box-shadow: 0 8px 16px rgba(0, 116, 13, 0.18);
}

.dashboard-filter-form .filter-submit:active {
    transform: translateY(1px);
}

.dashboard-filter-form select,
.dashboard-filter-form input {
    background: linear-gradient(180deg, #fff 0%, #f9fbff 100%);
}

.dashboard-filter-form .filter-submit.btn-primary {
    border: 1px solid rgba(0, 116, 13, 0.35);
}

.transactions-header {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
}

.transactions-filter-card {
    width: 100%;
    flex: 1 1 100%;
    background: #ffffff;
    border: 1px solid #e4e9f3;
    border-radius: 18px;
    padding: 16px 18px;
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.08);
    display: grid;
    gap: 12px;
}

.transactions-filter-card .transactions-filter-meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    background: linear-gradient(120deg, rgba(0, 116, 13, 0.12), rgba(255, 144, 0, 0.12));
    color: #0b0b0b;
    font-weight: 700;
    font-size: 0.82rem;
    letter-spacing: 0.03em;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.chip-sep {
    opacity: 0.6;
    font-weight: 900;
}

.transactions-filter-form {
    background: #f8fafc;
    border: 1px dashed #d0d7e6;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.8);
    width: 100%;
}

.table-search {
    width: 280px;
    max-width: 100%;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid #d8d8d8;
}

.table-filter {
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid #d8d8d8;
    background: var(--white);
}

.table-search:focus {
    outline: none;
    border-color: var(--green);
    box-shadow: 0 0 0 3px rgba(0, 116, 13, 0.12);
}

.table-filter:focus {
    outline: none;
    border-color: var(--green);
    box-shadow: 0 0 0 3px rgba(0, 116, 13, 0.12);
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.admin-table th,
.admin-table td {
    text-align: left;
    padding: 12px 10px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.admin-table tbody tr:nth-child(even) {
    background: rgba(0, 0, 0, 0.03);
}

.admin-table tbody tr.row-inactive {
    background: rgba(220, 38, 38, 0.12);
    color: #7f1d1d;
}

.admin-table tbody tr.row-inactive td {
    border-bottom-color: rgba(220, 38, 38, 0.2);
}

.action-stack form {
    margin: 0;
}

.admin-table th {
    font-weight: 700;
    color: rgba(11, 11, 11, 0.7);
}

.inline-form {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.action-stack {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.detail-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    margin-bottom: 18px;
}

.detail-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    color: rgba(11, 11, 11, 0.6);
    text-transform: uppercase;
    margin-bottom: 4px;
}

.detail-value {
    font-size: 1rem;
    font-weight: 600;
}

.panel-wide {
    width: 100%;
}

.dashboard-panels .panel-wide {
    grid-column: 1 / -1;
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.panel-header .action-stack {
    flex-wrap: nowrap;
}

.panel-header.panel-header--actions {
    justify-content: space-between;
    align-items: flex-start;
}

.panel-header__actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.panel-top-actions {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 10px;
}

.panel-subtitle {
    margin: 6px 0 0;
    color: rgba(11, 11, 11, 0.65);
}

.table-actions {
    display: flex;
    gap: 8px;
}

.detail-grid {
    margin-top: 12px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 18px;
}

.detail-label {
    margin: 0;
    color: rgba(11, 11, 11, 0.6);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.04em;
}

.detail-value {
    font-size: 1.05rem;
    font-weight: 600;
    margin: 6px 0 0;
    color: rgba(11, 11, 11, 0.85);
}

.detail-notes {
    margin-top: 26px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 18px;
}

.detail-notes .detail-value {
    font-weight: 500;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    z-index: 50;
}

.modal-overlay.is-open {
    display: flex;
}

.modal-overlay:target {
    display: flex;
}

.modal-card {
    background: var(--white);
    border-radius: 18px;
    padding: 20px;
    min-width: 280px;
    max-width: 520px;
    width: 100%;
    box-shadow: 0 22px 60px rgba(0, 0, 0, 0.2);
}

@media print {
    body > *:not(.modal-overlay) {
        display: none !important;
    }

    .modal-overlay {
        position: static;
        inset: auto;
        background: transparent;
        align-items: stretch;
    }

    .modal-card {
        box-shadow: none;
        border-radius: 0;
    }
}

.modal-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.modal-logo-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 12px;
    background: rgba(0, 116, 13, 0.12);
    color: var(--green);
    font-weight: 700;
    letter-spacing: 0.08em;
}

.modal-logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.modal-logo-text strong {
    font-size: 1.05rem;
}

.modal-logo-tagline {
    font-size: 0.9rem;
    color: rgba(0, 0, 0, 0.6);
}

.modal-title {
    margin: 0;
    font-size: 1.3rem;
}

.modal-receipt-meta {
    margin: 4px 0 0;
    color: rgba(0, 0, 0, 0.65);
    font-size: 0.95rem;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.app-dialog-overlay {
    z-index: 1200;
}

.app-dialog-card {
    max-width: 460px;
    padding: 0;
    overflow: hidden;
}

.app-dialog-accent {
    height: 6px;
    background: linear-gradient(90deg, #00740d 0%, #57b057 100%);
}

.app-dialog-header {
    padding: 20px 22px 0;
    margin-bottom: 10px;
}

.app-dialog-eyebrow {
    margin: 0 0 4px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(0, 116, 13, 0.72);
}

.app-dialog-message {
    margin: 0;
    padding: 0 22px;
    font-size: 0.98rem;
    line-height: 1.55;
    color: rgba(11, 11, 11, 0.82);
}

.app-dialog-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 18px 22px 22px;
}

body.has-app-dialog-open {
    overflow: hidden;
}

.modal-close {
    border: none;
    background: transparent;
    font-size: 1.6rem;
    cursor: pointer;
}

.table-summary {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 8px 0 12px;
    font-weight: 600;
}

@media (max-width: 768px) {
    .app-dialog-card {
        max-width: 100%;
    }

    .site-header {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        padding: 16px;
    }

    .brand,
    .site-nav,
    .notif-menu,
    .user-menu {
        width: 100%;
    }

    .brand {
        text-align: center;
    }

    .site-nav {
        align-items: stretch;
        justify-content: flex-start;
        gap: 10px;
    }

    .site-nav > a,
    .site-nav > .nav-group {
        width: 100%;
    }

    .site-nav > a {
        display: block;
    }

    .nav-trigger {
        display: flex;
        align-items: center;
        width: 100%;
        justify-content: space-between;
        text-align: left;
    }

    .nav-group {
        flex-shrink: 1;
    }

    .nav-group.is-collapsible {
        gap: 8px;
    }

    .nav-items {
        width: 100%;
        padding-top: 4px;
    }

    .notif-menu {
        margin-left: 0;
    }

    .notif-button,
    .user-menu {
        display: flex;
    }

    .notif-button,
    .user-button {
        width: 100%;
        justify-content: center;
    }

    .user-button {
        min-height: 46px;
    }

    .notif-dropdown,
    .user-dropdown {
        left: 0;
        right: 0;
        min-width: 0;
        max-width: none;
    }

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

    .hero {
        padding: 32px 24px;
    }

    .site-main {
        padding: 24px 16px 60px;
        overflow: visible;
    }

    .auth {
        padding: 28px;
    }
    .form-grid-2 {
        grid-template-columns: 1fr;
    }
    .panel-header .action-stack {
        flex-wrap: wrap;
        width: 100%;
        justify-content: flex-start;
    }
    .table-wrap,
    .history-table-wrap {
        border-radius: 14px;
    }
    .transfer-grid,
    .transfer-driver-grid {
        grid-template-columns: 1fr;
    }
    .transfer-card .form-actions {
        flex-direction: column;
        align-items: stretch;
    }
    .history-actions {
        gap: 12px;
    }
}

@media (max-width: 1200px) {
    .dashboard-panels,
    .panel-grid,
    .panel-grid--with-table {
        gap: 16px;
    }
    .panel {
        padding: 18px;
    }
    .panel-header,
    .history-actions,
    .history-full-header,
    .dashboard-header-actions {
        flex-wrap: wrap;
        gap: 10px;
    }
    .history-actions select,
    .history-actions input,
    .history-actions button,
    .dashboard-header-actions a,
    .dashboard-header-actions button {
        flex: 1 1 220px;
        min-width: 180px;
    }
    .table-wrap,
    .history-table-wrap,
    .transfer-table,
    .table-wrap--scrollable {
        overflow-x: auto;
    }
    .admin-table {
        min-width: 640px;
    }
}

@media (max-width: 1024px) {
    .dashboard-panels {
        grid-template-columns: 1fr;
    }
    .form-grid {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    }
    .history-actions,
    .history-full-header,
    .dashboard-header-actions,
    .dashboard-filter-form {
        flex-direction: column;
        align-items: stretch;
    }
    .history-actions select,
    .history-actions input,
    .history-actions button {
        width: 100%;
    }
    .panel-grid--with-table .panel,
    .panel-grid .panel {
        min-height: auto;
    }
    .dashboard-filter-form .filter-field,
    .dashboard-filter-form .filter-submit {
        width: 100%;
    }
    .transactions-filter-card {
        padding: 12px;
    }
}
