:root {
    --app-bg: #f4f7fb;
    --app-sidebar: #111827;
    --app-sidebar-soft: #1f2937;
    --app-primary: #168ee3;
    --app-primary-dark: #00315b;
    --app-text: #111827;
    --app-muted: #6b7280;
    --app-border: #e5e7eb;
    --app-card-radius: 18px;
	
	--logo-color-1: #168ee3;
	--logo-color-2: #00315b;
	--logo-color-3: #38b326;;
}

body {
    background: var(--app-bg);
    color: var(--app-text);
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
a {
	color: var(--app-primary);
}
hr {
	margin: 40px 0 40px;
	border-top: var(--app-primary-dark) solid;
	border-bottom: var(--app-primary) solid;
}
.app-wrapper {
    min-height: 100vh;
}

.app-sidebar {
    width: 280px;
    background: linear-gradient(180deg, #111827 0%, #0f172a 100%);
    color: #ffffff;
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 1040;
    display: flex;
    flex-direction: column;
    padding: 22px;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 24px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.brand-icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: linear-gradient(135deg, #2563eb, #22c55e);
    display: grid;
    place-items: center;
    font-size: 22px;
}

.brand-title {
    font-weight: 800;
    font-size: 17px;
}

.brand-subtitle {
    font-size: 12px;
    color: #9ca3af;
}

.sidebar-nav {
    padding-top: 24px;
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.sidebar-link {
    color: #d1d5db;
    text-decoration: none;
    padding: 12px 14px;
    border-radius: 13px;
    display: flex;
    align-items: center;
    gap: 11px;
    font-weight: 600;
    transition: all .18s ease;
}

.sidebar-link i {
    font-size: 18px;
}

.sidebar-link:hover,
.sidebar-link.active {
    background: rgba(255,255,255,0.1);
    color: #ffffff;
}

.sidebar-footer {
    margin-top: auto;
}

.app-main {
    margin-left: 280px;
    min-height: 100vh;
}

.auth-main {
    min-height: 100vh;
}

.app-topbar {
    min-height: 76px;
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--app-border);
    padding: 16px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    position: sticky;
    top: 0;
    z-index: 1000;
}
.app-topbar .topbar-logo{
	width: 200px;
}
.page-heading {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.page-subheading {
    color: var(--app-muted);
    font-size: 13px;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.app-content {
    padding: 30px;
}

.auth-main .app-content {
    max-width: 1180px;
    margin: 0 auto;
}

.app-card {
    background: #ffffff;
    border: 1px solid var(--app-border);
    border-radius: var(--app-card-radius);
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.06);
}

.app-card-header {
    padding: 22px 24px;
    border-bottom: 1px solid var(--app-border);
}

.app-card-body {
    padding: 24px;
}

.auth-card {
    max-width: 540px;
    margin: 40px auto;
}

.register-card {
    max-width: 980px;
    margin: 30px auto;
}

.form-label {
    font-weight: 700;
    font-size: 13px;
    color: #374151;
}

.form-control,
.form-select {
    border-radius: 12px;
    padding: 11px 13px;
    border-color: #d1d5db;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--app-primary);
    box-shadow: 0 0 0 .22rem rgba(37, 99, 235, .14);
}

.btn {
    border-radius: 12px;
    font-weight: 700;
    padding: 10px 16px;
}

.btn-primary {
    background: var(--app-primary);
    border-color: var(--app-primary);
}

.btn-primary:hover {
    background: var(--app-primary-dark);
    border-color: var(--app-primary-dark);
}

.section-title {
    font-size: 16px;
    font-weight: 800;
    margin-bottom: 16px;
    color: #111827;
}

.section-subtitle {
    font-size: 13px;
    color: var(--app-muted);
    margin-top: -10px;
    margin-bottom: 18px;
}

.field-error {
    color: #dc2626;
    font-size: 13px;
    font-weight: 600;
    margin-top: 6px;
}

.permission-box {
    border: 1px solid var(--app-border);
    border-radius: 14px;
    padding: 14px;
    background: #f9fafb;
}

.permission-box .form-check {
    margin-bottom: 8px;
}

.permission-box .form-check:last-child {
    margin-bottom: 0;
}

.table {
    margin-bottom: 0;
}

.table thead th {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #6b7280;
    background: #f9fafb;
}

.badge-soft-primary {
    background: #dbeafe;
    color: #1d4ed8;
}

.badge-soft-success {
    background: #dcfce7;
    color: #15803d;
}

.badge-soft-warning {
    background: #fef3c7;
    color: #b45309;
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--app-muted);
}

.empty-state i {
    font-size: 42px;
    margin-bottom: 12px;
    color: #9ca3af;
}

.upload-zone {
    border: 2px dashed #cbd5e1;
    border-radius: 18px;
    padding: 36px;
    text-align: center;
    background: #f8fafc;
    cursor: pointer;
    transition: all .18s ease;
}

.upload-zone:hover,
.upload-zone.is-dragover {
    border-color: var(--app-primary);
    background: #eff6ff;
}

.upload-zone i {
    font-size: 42px;
    color: var(--app-primary);
}

.sidebar-backdrop {
    display: none;
}

@media (max-width: 991px) {
    .app-sidebar {
        transform: translateX(-100%);
        transition: transform .2s ease;
    }

    .app-sidebar.is-open {
        transform: translateX(0);
    }

    .sidebar-backdrop.is-open {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(15, 23, 42, .45);
        z-index: 1030;
    }

    .app-main {
        margin-left: 0;
    }

    .app-topbar {
        padding: 14px 18px;
    }

    .app-content {
        padding: 20px;
    }

    .topbar-actions {
        gap: 6px;
    }
}
@media (max-width: 720px) {
    .app-topbar {
        flex-wrap: wrap;
        align-items: flex-start;
    }

    .topbar-actions {
        width: 100%;
        justify-content: flex-start;
        margin-top: 10px;
        flex-wrap: wrap;
    }

    .topbar-actions .btn,
    .topbar-actions .dropdown {
        flex: 1 1 auto;
    }

    .topbar-actions .dropdown .btn {
        width: 100%;
    }
}
@media (max-width: 575px) {
    .auth-card,
    .register-card {
        margin: 15px auto;
    }

    .app-card-body {
        padding: 18px;
    }

    .app-card-header {
        padding: 18px;
    }

    .page-heading {
        font-size: 18px;
    }
}

.documents-tree .accordion-item {
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid var(--app-border);
    margin-bottom: 12px;
}

.documents-tree .accordion-button {
    font-weight: 700;
    background: #ffffff;
}

.documents-tree .accordion-button:not(.collapsed) {
    background: #f8fafc;
    color: #111827;
    box-shadow: none;
}

.document-month-item {
    margin-bottom: 10px;
}

.document-month-item:last-child {
    margin-bottom: 0;
}

.documents-tree .table td,
.documents-tree .table th {
    padding: 13px 14px;
}

.documents-tree .btn-group .btn {
    padding: 6px 10px;
}

.accountant-inactive {
    opacity: 0.62;
    background: #f8f9fa;
}

.accountant-inactive .permission-box {
    background: #f1f3f5;
}