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

body {
    font-family: 'Roboto', sans-serif;
    color: rgb(82, 98, 131);
    background: #eef2f7;
}

a {
    color: rgb(45, 150, 146);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.app-shell {
    display: flex;
    min-height: 100vh;
}

.sidebar-backdrop {
    display: none;
}

.sidebar {
    width: 240px;
    background: #1e2a3a;
    color: #d7e0ec;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 18px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-brand img {
    width: 42px;
    height: auto;
    background: white;
    border-radius: 4px;
    padding: 2px;
}

.sidebar-brand span {
    font-weight: 500;
    font-size: 15px;
    flex: 1;
}

.sidebar-close {
    display: none;
    background: transparent;
    border: none;
    color: white;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    padding: 0 4px;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    padding: 16px 10px;
    gap: 4px;
    flex: 1;
}

.sidebar-nav a {
    color: #c5d0df;
    text-decoration: none;
    padding: 12px 14px;
    border-radius: 6px;
    font-size: 15px;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
    background: rgb(63, 194, 189);
    color: white;
}

.sidebar-footer {
    padding: 14px 16px;
    font-size: 11px;
    opacity: 0.7;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.main-area {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.topbar {
    background: white;
    border-bottom: 1px solid #d8e0ea;
    padding: 12px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    position: sticky;
    top: 0;
    z-index: 20;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.topbar h1 {
    font-size: 20px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 42px;
    height: 42px;
    padding: 10px;
    border: 1px solid #cfd7e3;
    border-radius: 6px;
    background: white;
    cursor: pointer;
    flex-shrink: 0;
}

.menu-toggle span {
    display: block;
    height: 2px;
    width: 100%;
    background: rgb(82, 98, 131);
    border-radius: 1px;
}

.topbar-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.content {
    padding: 20px 24px 40px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: inherit;
    font-size: 13px;
    padding: 10px 14px;
    min-height: 40px;
    border: 1px solid #9aa8c0;
    border-radius: 4px;
    background: white;
    color: rgb(82, 98, 131);
    cursor: pointer;
    text-decoration: none;
    touch-action: manipulation;
}

.btn:hover {
    background: #e8eef6;
    text-decoration: none;
}

.btn-primary {
    background: rgb(63, 194, 189);
    border-color: rgb(63, 194, 189);
    color: white;
}

.btn-primary:hover {
    background: rgb(45, 170, 165);
}

.btn-secondary {
    background: #526283;
    border-color: #526283;
    color: white;
}

.btn-danger {
    background: #c0392b;
    border-color: #c0392b;
    color: white;
}

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

.btn-sm {
    padding: 8px 10px;
    font-size: 12px;
    min-height: 36px;
}

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

.alert-success {
    background: #e6f7f2;
    border: 1px solid #3fc2bd;
    color: #1a6b67;
}

.alert-error {
    background: #fdecea;
    border: 1px solid #e74c3c;
    color: #922b21;
}

.alert ul {
    margin-left: 18px;
}

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

.stat-card {
    background: white;
    border-radius: 8px;
    padding: 18px;
    border: 1px solid #d8e0ea;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.stat-label {
    font-size: 13px;
    opacity: 0.8;
}

.stat-value {
    font-size: 32px;
    font-weight: 500;
    color: rgb(63, 194, 189);
}

.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.three-col {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.panel {
    background: white;
    border: 1px solid #d8e0ea;
    border-radius: 8px;
    overflow: hidden;
}

.panel-header {
    padding: 14px 16px;
    border-bottom: 1px solid #e6ebf2;
}

.panel-header h2 {
    font-size: 16px;
    font-weight: 500;
}

.list-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
    padding: 12px 16px;
    border-bottom: 1px solid #eef2f7;
    color: inherit;
    text-decoration: none;
    font-size: 13px;
}

.list-row:hover {
    background: #f7fafc;
    text-decoration: none;
}

.empty {
    padding: 16px;
    font-size: 14px;
    opacity: 0.75;
}

.table-scroll {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 640px;
}

.data-table th,
.data-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #e6ebf2;
    text-align: left;
    font-size: 13px;
    vertical-align: middle;
}

.data-table th {
    background: #f5f8fb;
    font-weight: 500;
}

.actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    align-items: center;
}

.inline-form {
    display: inline;
}

.pagination-wrap {
    padding: 12px 16px;
}

.pagination {
    display: flex;
    list-style: none;
    gap: 4px;
    flex-wrap: wrap;
}

.page-item .page-link {
    display: inline-block;
    padding: 8px 12px;
    border: 1px solid #cfd7e3;
    border-radius: 4px;
    color: rgb(82, 98, 131);
    text-decoration: none;
    font-size: 13px;
    background: white;
}

.page-item.active .page-link,
.page-item .page-link:hover {
    background: rgb(63, 194, 189);
    border-color: rgb(63, 194, 189);
    color: white;
}

.page-item.disabled .page-link {
    opacity: 0.5;
    pointer-events: none;
}

.toolbar {
    display: flex;
    gap: 10px;
    padding: 12px 0;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.toolbar .print-btn {
    margin-left: auto;
}

.doc-form {
    width: 100%;
}

.doc-sheet {
    width: 100%;
    background: white;
    padding: 20px 40px;
    border: 1px solid #d8e0ea;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 160px);
}

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

.logo img {
    max-width: 250px;
    width: 250px;
    height: auto;
}

.address {
    font-size: 12px;
    line-height: 1.5;
    text-align: right;
    flex-shrink: 0;
}

.doc-title {
    text-align: center;
    font-size: 22px;
    margin: 10px 0 20px;
    font-weight: 500;
}

.invoice-details {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
    margin: 10px 0 20px;
    font-size: 13px;
    width: 100%;
}

.details-left {
    flex: 1 1 0;
    min-width: 0;
}

.details-right {
    flex: 0 1 auto;
    text-align: right;
    min-width: 180px;
}

.bold {
    font-weight: 700;
}

.meta-fields {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.meta-line {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
    font-size: 13px;
}

.meta-line input[type="date"] {
    width: auto;
    max-width: 160px;
}

.readonly-value {
    font-weight: 500;
}

.signature-block label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 13px;
}

.field-textarea,
.meta-fields input,
.signature-block input,
.itemized-list input,
.itemized-list textarea,
.notes-input {
    width: 100%;
    font-family: inherit;
    font-size: 13px;
    color: inherit;
    border: 1px solid #cfd7e3;
    border-radius: 3px;
    padding: 8px;
    background: #fff;
}

.itemized-list textarea {
    resize: vertical;
    min-height: 42px;
}

.notes-input {
    border: none;
    border-bottom: 1px dashed #cfd7e3;
    border-radius: 0;
    padding-left: 0;
    font-style: italic;
}

.itemized-list {
    width: 100%;
    min-width: 560px;
    border-collapse: collapse;
    border: 1px solid #526283;
}

.itemized-list th,
.itemized-list td {
    border: 1px solid #526283;
    padding: 6px 8px;
    font-size: 13px;
    text-align: left;
    vertical-align: top;
}

.itemized-list th {
    background: rgb(63, 194, 189);
    color: white;
    font-weight: 500;
}

.item-row.selected td {
    background: #e8f8f7;
}

.itemized-list input,
.itemized-list textarea {
    border: none;
    background: transparent;
    padding: 2px 0;
    min-height: 36px;
}

.itemized-list input:focus,
.itemized-list textarea:focus,
.field-textarea:focus,
.meta-fields input:focus,
.signature-block input:focus {
    outline: none;
    box-shadow: inset 0 0 0 1px rgb(63, 194, 189);
    background: #f0fbfa;
}

.item-number {
    width: 40px;
    text-align: center;
}

.qty {
    width: 80px;
    white-space: nowrap;
}

.money {
    white-space: nowrap;
    width: 130px;
}

.total-row td {
    font-weight: 700;
    border: 1px solid #526283;
}

.notes-line {
    padding-top: 10px;
}

.signature-section {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
    margin-top: 40px;
    gap: 40px;
    flex-wrap: nowrap;
}

.signature-block {
    flex: 1 1 0;
    font-size: 13px;
    line-height: 2;
    min-width: 0;
}

.invoice-footer {
    margin-top: auto;
    text-align: center;
    font-size: 13px;
    padding-top: 28px;
    padding-bottom: 8px;
}

.doc-footer-text {
    text-align: center;
    font-style: italic;
    font-size: 14px;
    color: rgb(82, 98, 131);
}

/* RECEIPT */
.receipt-sheet {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    background: white;
    padding: 24px;
    border: 1px solid #d8e0ea;
    border-radius: 8px;
}

.receipt-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    text-align: center;
}

.receipt-logo img {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 10px;
}

.receipt-company {
    font-size: 28px;
    font-weight: 700;
    font-family: 'Times New Roman', Times, serif;
    color: rgb(82, 98, 131);
}

.receipt-contact {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 18px;
    font-size: 12px;
    font-weight: 700;
}

.receipt-heading {
    background: rgb(63, 194, 189);
    border-radius: 10px 10px 0 0;
    color: white;
    font-size: 14px;
    padding: 8px 12px;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.receipt-heading > p,
.receipt-heading > h1,
.receipt-heading > .receipt-date-label {
    flex: 1 1 0;
    margin: 0;
}

.receipt-heading > h1 {
    text-align: center;
}

.receipt-heading > p:first-child {
    text-align: left;
}

.receipt-heading > p:last-child,
.receipt-heading > .receipt-date-label {
    text-align: right;
    justify-content: flex-end;
}

.receipt-heading h1 {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.receipt-number {
    color: #ff3b3b;
    font-weight: 700;
    font-family: Verdana, Geneva, Tahoma, sans-serif;
}

.receipt-date-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: white;
}

.receipt-date-label input {
    border: none;
    border-radius: 4px;
    padding: 4px 6px;
    font-size: 13px;
    color: rgb(82, 98, 131);
}

.receipt-body {
    border: 1px solid rgb(63, 194, 189);
    border-radius: 0 0 10px 10px;
    padding: 8px 0;
}

.receipt-field {
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.receipt-field label,
.receipt-label {
    font-weight: 700;
    font-style: italic;
    font-size: 14px;
    flex-shrink: 0;
    white-space: nowrap;
}

.receipt-field input,
.receipt-field textarea {
    width: 100%;
    font-family: inherit;
    font-size: 14px;
    text-transform: uppercase;
    border: none;
    border-bottom: 1px dotted #666;
    border-radius: 0;
    padding: 6px 2px;
    color: inherit;
    background: transparent;
}

.receipt-field input:focus,
.receipt-field textarea:focus {
    outline: none;
    background: #f0fbfa;
}

.receipt-value,
.receipt-value-line {
    flex: 1 1 auto;
    min-width: 0;
    width: 100%;
    text-transform: uppercase;
    text-decoration: none;
    border-bottom: 1px dotted #666;
    font-size: 14px;
    line-height: 1.6;
    padding-bottom: 2px;
    display: block;
}

.print-field {
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: baseline;
    gap: 10px;
    width: 100%;
}

.receipt-details {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    margin: 18px 12px 8px;
    font-weight: 700;
}

.receipt-amount-box {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgb(63, 194, 189);
    color: white;
    padding: 6px 14px;
    border-radius: 4px;
    flex-shrink: 0;
}

.receipt-amount-box input {
    width: 140px;
    border: none;
    border-radius: 3px;
    padding: 4px 8px;
    font-size: 14px;
    font-weight: 700;
    color: rgb(82, 98, 131);
}

.receipt-amount-box.static {
    font-size: 15px;
}

.receipt-sign {
    font-size: 14px;
    flex-shrink: 0;
    white-space: nowrap;
    margin: 0;
}

.receipt-print {
    border: none;
    max-width: 800px;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(20, 30, 45, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 16px;
}

.modal-overlay[hidden] {
    display: none !important;
}

.modal {
    background: white;
    width: min(420px, 92vw);
    border-radius: 8px;
    padding: 22px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
}

.modal h3 {
    font-size: 18px;
    margin-bottom: 8px;
}

.modal p {
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 18px;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.toast {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: 20px;
    margin: 0 auto;
    max-width: 360px;
    padding: 12px 16px;
    border-radius: 6px;
    color: white;
    font-size: 14px;
    z-index: 1100;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.toast.success {
    background: #1a6b67;
}

.toast.error {
    background: #c0392b;
}

.toast[hidden] {
    display: none !important;
}

.print-page {
    background: white;
}

.print-page .doc-sheet {
    min-height: 100vh;
    border: none;
    border-radius: 0;
}

.print-toolbar {
    display: flex;
    gap: 10px;
    padding: 12px 24px;
    background: #f5f7fa;
    border-bottom: 1px solid #d0d7e2;
    flex-wrap: wrap;
}

body.nav-open {
    overflow: hidden;
}

@media (max-width: 900px) {
    .menu-toggle {
        display: inline-flex;
    }

    .sidebar-close {
        display: inline-block;
    }

    .sidebar-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(15, 23, 36, 0.45);
        z-index: 90;
    }

    .sidebar-backdrop[hidden] {
        display: none !important;
    }

    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: min(280px, 86vw);
        z-index: 100;
        transform: translateX(-105%);
        transition: transform 0.2s ease;
        box-shadow: 8px 0 24px rgba(0, 0, 0, 0.2);
    }

    body.nav-open .sidebar {
        transform: translateX(0);
    }

    .topbar {
        padding: 10px 14px;
    }

    .topbar h1 {
        font-size: 16px;
    }

    .topbar-actions {
        width: 100%;
    }

    .topbar {
        flex-wrap: wrap;
    }

    .content {
        padding: 14px 12px 32px;
    }

    .two-col,
    .three-col {
        grid-template-columns: 1fr;
    }

    .list-row {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .doc-sheet {
        padding: 16px 14px;
        min-height: calc(100vh - 200px);
    }

    .invoice-header {
        flex-wrap: nowrap;
        align-items: center;
    }

    .logo img {
        max-width: 200px;
        width: 200px;
    }

    .address {
        text-align: right;
        font-size: 12px;
    }

    .doc-title {
        font-size: 18px;
    }

    .invoice-details {
        flex-direction: row;
        justify-content: space-between;
        align-items: flex-start;
        gap: 12px;
    }

    .details-left,
    .details-right {
        flex: 1 1 0;
    }

    .details-right {
        text-align: right;
        min-width: 0;
    }

    .meta-line {
        justify-content: flex-end;
        font-size: 12px;
    }

    .meta-line input[type="date"] {
        max-width: 132px;
        font-size: 12px;
        padding: 6px;
    }

    .field-textarea {
        font-size: 12px;
        min-height: 72px;
    }

    .toolbar .print-btn {
        margin-left: 0;
    }

    .toolbar {
        position: sticky;
        top: 64px;
        z-index: 15;
        background: #eef2f7;
        padding: 8px 0;
    }

    .signature-section {
        flex-direction: row;
        flex-wrap: nowrap;
        gap: 24px;
    }

    .receipt-company {
        font-size: 22px;
    }

    .receipt-heading {
        flex-wrap: nowrap;
        justify-content: space-between;
        text-align: left;
    }

    .receipt-details {
        flex-direction: row;
        flex-wrap: nowrap;
        align-items: center;
        justify-content: space-between;
    }

    .btn {
        min-height: 44px;
    }
}

@media (max-width: 560px) {
    .data-table {
        min-width: 0;
    }

    .data-table thead {
        display: none;
    }

    .data-table,
    .data-table tbody,
    .data-table tr,
    .data-table td {
        display: block;
        width: 100%;
    }

    .data-table tr {
        border-bottom: 1px solid #e6ebf2;
        padding: 12px;
    }

    .data-table td {
        border: none;
        padding: 6px 0;
        display: flex;
        justify-content: space-between;
        gap: 12px;
    }

    .data-table td::before {
        content: attr(data-label);
        font-weight: 500;
        color: #6b7a94;
        flex-shrink: 0;
    }

    .data-table td.actions {
        display: flex;
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .data-table td.actions::before {
        width: 100%;
        margin-bottom: 4px;
    }

    .data-table td.empty {
        display: block;
    }

    .data-table td.empty::before {
        content: none;
    }

    .invoice-details {
        gap: 8px;
    }

    .itemized-list {
        min-width: 480px;
        font-size: 12px;
    }
}

@media print {
    body {
        background: white;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .no-print,
    .sidebar,
    .sidebar-backdrop,
    .topbar,
    .toolbar,
    .print-toolbar,
    .modal-overlay,
    .toast,
    .menu-toggle {
        display: none !important;
    }

    .app-shell,
    .main-area,
    .content {
        display: block;
        padding: 0;
        margin: 0;
    }

    .doc-sheet {
        border: none;
        border-radius: 0;
        padding: 0;
        min-height: 100vh;
    }

    .invoice-header {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        justify-content: space-between !important;
        align-items: center !important;
    }

    .logo img {
        max-width: 250px !important;
        width: 250px !important;
        height: auto !important;
    }

    .address {
        font-size: 12px !important;
        line-height: 1.5 !important;
        text-align: right !important;
    }

    .item-row.selected td {
        background: transparent !important;
    }

    .itemized-list,
    .itemized-list th,
    .itemized-list td,
    .total-row td {
        border: 1px solid #526283 !important;
        border-width: 1px !important;
    }

    .itemized-list input,
    .itemized-list textarea,
    .field-textarea,
    .meta-fields input,
    .signature-block input,
    .notes-input {
        border: none !important;
        box-shadow: none !important;
        background: transparent !important;
        padding: 0;
    }

    .invoice-footer {
        margin-top: auto;
    }

    .invoice-details {
        flex-direction: row !important;
        justify-content: space-between !important;
    }

    .signature-section {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        justify-content: space-between !important;
        gap: 40px !important;
    }

    .signature-block {
        flex: 1 1 0 !important;
    }

    .receipt-sheet {
        border: none;
        max-width: none;
        padding: 0;
    }

    .receipt-amount-box {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .receipt-heading {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        justify-content: space-between !important;
        align-items: center !important;
        text-align: left !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .receipt-heading > p:first-child {
        text-align: left !important;
    }

    .receipt-heading > h1 {
        text-align: center !important;
    }

    .receipt-heading > p:last-child,
    .receipt-heading > .receipt-date-label {
        text-align: right !important;
    }

    .receipt-details {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        justify-content: space-between !important;
        align-items: center !important;
    }

    .print-field {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        align-items: baseline !important;
        width: 100% !important;
    }

    .receipt-value,
    .receipt-value-line {
        flex: 1 1 auto !important;
        width: auto !important;
        min-width: 0 !important;
        display: block !important;
        border-bottom: 1px dotted #666 !important;
        text-decoration: none !important;
    }

    .receipt-field input,
    .receipt-field textarea,
    .receipt-date-label input,
    .receipt-amount-box input {
        border: none !important;
        background: transparent !important;
        box-shadow: none !important;
        color: inherit !important;
    }

    .receipt-field input,
    .receipt-field textarea {
        border-bottom: 1px dotted #666 !important;
    }
}

/* AUTH LOCK + LOGIN MODAL */
body.auth-locked {
    overflow: hidden;
}

.app-shell.is-locked .main-area,
.app-shell.is-locked .sidebar {
    filter: grayscale(0.35) brightness(0.72);
    pointer-events: none;
    user-select: none;
}

.content-locked {
    min-height: 60vh;
}

.locked-placeholder {
    opacity: 0.55;
}

.login-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(18, 28, 42, 0.62);
    backdrop-filter: blur(2px);
}

.login-modal {
    width: min(420px, 94vw);
    background: #fff;
    border-radius: 10px;
    padding: 28px 24px;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
}

.login-brand {
    text-align: center;
    margin-bottom: 18px;
}

.login-brand img {
    width: 64px;
    height: auto;
    margin-bottom: 10px;
}

.login-brand h2 {
    font-size: 22px;
    font-weight: 500;
    margin-bottom: 4px;
}

.login-brand p {
    font-size: 13px;
    opacity: 0.75;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.login-form label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 13px;
}

.login-form input[type="email"],
.login-form input[type="password"] {
    width: 100%;
    font-family: inherit;
    font-size: 14px;
    padding: 10px 12px;
    border: 1px solid #cfd7e3;
    border-radius: 4px;
    color: inherit;
}

.login-form input:focus {
    outline: none;
    border-color: rgb(63, 194, 189);
    box-shadow: 0 0 0 2px rgba(63, 194, 189, 0.2);
}

.remember-row {
    flex-direction: row !important;
    align-items: center;
    gap: 8px !important;
}

.login-submit {
    width: 100%;
    min-height: 44px;
    margin-top: 4px;
}

.sidebar-user {
    font-size: 11px;
    word-break: break-all;
    margin-bottom: 8px;
    opacity: 0.85;
}

.btn-logout {
    width: 100%;
    background: transparent;
    border-color: rgba(255, 255, 255, 0.35);
    color: #d7e0ec;
}

.btn-logout:hover {
    background: rgba(255, 255, 255, 0.08);
}

.nav-locked {
    opacity: 0.7;
}

.profile-panel {
    max-width: 520px;
}

.profile-body {
    padding: 18px 16px 22px;
}

.profile-field {
    margin-bottom: 22px;
}

.profile-email {
    margin-top: 6px;
    font-size: 15px;
}

.profile-hint {
    margin-top: 4px;
    font-size: 12px;
    opacity: 0.7;
}

.password-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.password-form h3 {
    font-size: 16px;
    font-weight: 500;
}

.password-form label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 13px;
}

.password-form input {
    width: 100%;
    font-family: inherit;
    font-size: 14px;
    padding: 10px 12px;
    border: 1px solid #cfd7e3;
    border-radius: 4px;
    color: inherit;
}

.password-form input:focus {
    outline: none;
    border-color: rgb(63, 194, 189);
}

.password-form .btn {
    align-self: flex-start;
}
