/* NAJ Capital Solution - Base Styles */

:root {
    /* NAJ Capital Solution palette */
    --naj-gold:        #F5A623;  /* primary brand / accent */
    --naj-gold-dark:   #D98E0B;  /* hover / active */
    --naj-gold-tint:   #FBD38D;  /* light accent / highlights */
    --naj-black:       #0D0D0D;  /* primary dark surface (nav, sidebar, footer, hero) */
    --naj-surface:     #1A1A1A;  /* raised dark surface / cards on dark */
    --naj-border:      #2A2A2A;  /* borders on dark */
    --naj-white:       #FFFFFF;
    --naj-bg:          #F7F7F7;  /* light page background */
    --naj-text:        #1A1A1A;  /* text on light */
    --naj-text-light:  #EDEDED;  /* text on dark */
    --naj-muted:       #8A8A8A;  /* muted text */
    --naj-on-gold:     #0D0D0D;  /* text on gold fills */
}

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    min-height: 100vh;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #CBD5E1;
    border-radius: 3px;
}

.dark ::-webkit-scrollbar-thumb {
    background: #475569;
}

::-webkit-scrollbar-thumb:hover {
    background: #94A3B8;
}

/* Focus styles */
*:focus-visible {
    outline: 2px solid var(--naj-gold);
    outline-offset: 2px;
    border-radius: 4px;
}

/* Transitions */
.page-enter {
    opacity: 0;
    transform: translateY(8px);
}

.page-enter-active {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.page-exit {
    opacity: 1;
}

.page-exit-active {
    opacity: 0;
    transition: opacity 0.15s ease;
}

/* Active nav link */
.nav-link.active {
    background-color: rgba(245, 166, 35, 0.12);
    color: var(--naj-gold-dark);
    font-weight: 600;
}

.dark .nav-link.active {
    background-color: rgba(245, 166, 35, 0.18);
    color: var(--naj-gold);
}

/* Form styles */
.form-input {
    width: 100%;
    padding: 0.625rem 0.875rem;
    border: 1px solid #D1D5DB;
    border-radius: 0.75rem;
    font-size: 0.875rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    background-color: white;
    color: #1F2937;
}

.dark .form-input {
    background-color: #1F2937;
    border-color: #4B5563;
    color: #E5E7EB;
}

.form-input:focus {
    outline: none;
    border-color: var(--naj-gold);
    box-shadow: 0 0 0 3px rgba(245, 166, 35, 0.15);
}

.form-input.error {
    border-color: #EF4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.375rem;
}

.dark .form-label {
    color: #D1D5DB;
}

.form-error {
    font-size: 0.75rem;
    color: #EF4444;
    margin-top: 0.25rem;
}

/* Button base */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    border-radius: 0.75rem;
    font-size: 0.875rem;
    font-weight: 600;
    transition: all 0.2s;
    cursor: pointer;
    border: none;
    text-decoration: none;
    white-space: nowrap;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-primary {
    background-color: var(--naj-gold);
    color: var(--naj-on-gold);
}

.btn-primary:hover:not(:disabled) {
    background-color: var(--naj-gold-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(245, 166, 35, 0.35);
}

.btn-accent {
    background-color: var(--naj-gold);
    color: var(--naj-on-gold);
}

.btn-accent:hover:not(:disabled) {
    background-color: var(--naj-gold-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(245, 166, 35, 0.35);
}

.btn-outline {
    background-color: transparent;
    border: 1.5px solid #D1D5DB;
    color: #374151;
}

.dark .btn-outline {
    border-color: #4B5563;
    color: #D1D5DB;
}

.btn-outline:hover:not(:disabled) {
    background-color: #F3F4F6;
}

.dark .btn-outline:hover:not(:disabled) {
    background-color: #374151;
}

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

.btn-danger:hover:not(:disabled) {
    background-color: #DC2626;
}

.btn-success {
    background-color: #10B981;
    color: white;
}

.btn-success:hover:not(:disabled) {
    background-color: #059669;
}

.btn-sm {
    padding: 0.375rem 0.875rem;
    font-size: 0.8125rem;
}

.btn-lg {
    padding: 0.75rem 1.75rem;
    font-size: 1rem;
}

/* Card */
.card {
    background-color: white;
    border-radius: 1rem;
    border: 1px solid #E5E7EB;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    transition: box-shadow 0.2s;
}

.dark .card {
    background-color: #1F2937;
    border-color: #374151;
}

.card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.dark .card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Status badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: capitalize;
}

.badge-pending { background-color: #FEF3C7; color: #92400E; }
.badge-approved { background-color: #D1FAE5; color: #065F46; }
.badge-active { background-color: #DBEAFE; color: #1E40AF; }
.badge-rejected { background-color: #FEE2E2; color: #991B1B; }
.badge-completed { background-color: #D1FAE5; color: #065F46; }
.badge-overdue { background-color: #FEE2E2; color: #991B1B; }
.badge-draft { background-color: #F3F4F6; color: #4B5563; }
.badge-processing { background-color: #E0E7FF; color: #3730A3; }
.badge-paid { background-color: #D1FAE5; color: #065F46; }

.dark .badge-pending { background-color: rgba(245, 158, 11, 0.2); color: #FCD34D; }
.dark .badge-approved { background-color: rgba(16, 185, 129, 0.2); color: #6EE7B7; }
.dark .badge-active { background-color: rgba(30, 90, 250, 0.2); color: #93BBFD; }
.dark .badge-rejected { background-color: rgba(239, 68, 68, 0.2); color: #FCA5A5; }
.dark .badge-completed { background-color: rgba(16, 185, 129, 0.2); color: #6EE7B7; }
.dark .badge-overdue { background-color: rgba(239, 68, 68, 0.2); color: #FCA5A5; }
.dark .badge-draft { background-color: rgba(107, 114, 128, 0.2); color: #D1D5DB; }
.dark .badge-processing { background-color: rgba(99, 102, 241, 0.2); color: #A5B4FC; }
.dark .badge-paid { background-color: rgba(16, 185, 129, 0.2); color: #6EE7B7; }

/* Table */
.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.data-table thead th {
    padding: 0.75rem 1rem;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6B7280;
    border-bottom: 1px solid #E5E7EB;
    background-color: #F9FAFB;
}

.dark .data-table thead th {
    background-color: #111827;
    border-bottom-color: #374151;
    color: #9CA3AF;
}

.data-table tbody td {
    padding: 0.875rem 1rem;
    font-size: 0.875rem;
    color: #374151;
    border-bottom: 1px solid #F3F4F6;
}

.dark .data-table tbody td {
    color: #D1D5DB;
    border-bottom-color: #1F2937;
}

.data-table tbody tr:hover {
    background-color: #F9FAFB;
}

.dark .data-table tbody tr:hover {
    background-color: #1F2937;
}

/* Step indicator */
.step-indicator {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 0;
}

.step-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.step-circle {
    width: 2rem;
    height: 2rem;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    border: 2px solid #D1D5DB;
    color: #9CA3AF;
    background-color: white;
    transition: all 0.3s;
    flex-shrink: 0;
}

.dark .step-circle {
    background-color: #1F2937;
    border-color: #4B5563;
    color: #6B7280;
}

.step-circle.active {
    border-color: var(--naj-gold);
    background-color: var(--naj-gold);
    color: var(--naj-on-gold);
}

.step-circle.completed {
    border-color: #10B981;
    background-color: #10B981;
    color: white;
}

.step-line {
    width: 3rem;
    height: 2px;
    background-color: #D1D5DB;
    transition: background-color 0.3s;
    margin-top: 1rem; /* aligns line with vertical centre of 2rem circles */
}

.step-label {
    font-size: 0.625rem;
    margin-top: 0.375rem;
    text-align: center;
    line-height: 1.2;
    max-width: 3.5rem;
}

.dark .step-line {
    background-color: #4B5563;
}

.step-line.completed {
    background-color: #10B981;
}

@media (min-width: 640px) {
    .step-line {
        width: 5rem;
    }
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
}

.empty-state svg {
    width: 4rem;
    height: 4rem;
    margin: 0 auto 1rem;
    color: #D1D5DB;
}

.dark .empty-state svg {
    color: #4B5563;
}

/* ════════════════ Modern UI polish (NAJ premium) ════════════════ */
h1, h2, h3 { letter-spacing: -0.018em; }
h1 { font-weight: 800; }

/* Elevated, rounded cards with layered soft shadow + hover lift */
.card {
    border-radius: 1.25rem;
    border-color: #EDEFF3;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 10px 28px -12px rgba(16, 24, 40, 0.10);
}
.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 6px rgba(16, 24, 40, 0.06), 0 18px 40px -14px rgba(16, 24, 40, 0.18);
}
.dark .card { border-color: #1f2a3a; }

/* Buttons: depth + brand gradient */
.btn { border-radius: 0.9rem; }
.btn:active:not(:disabled) { transform: translateY(0); }
.btn-accent {
    background-image: linear-gradient(135deg, #F8B73F 0%, #F5A623 55%, #EE9C14 100%);
    box-shadow: 0 2px 10px rgba(245, 166, 35, 0.35);
}
.btn-accent:hover:not(:disabled) {
    background-image: linear-gradient(135deg, #F5A623, #D98E0B);
    box-shadow: 0 8px 22px rgba(245, 166, 35, 0.45);
}
.btn-primary { background-image: linear-gradient(135deg, #F8B73F 0%, #F5A623 55%, #EE9C14 100%); }
.btn-primary:hover:not(:disabled) { background-image: linear-gradient(135deg, #F5A623, #D98E0B); box-shadow: 0 8px 22px rgba(245, 166, 35, 0.45); }
.btn-lg { border-radius: 1rem; }

/* Inputs: roomier, modern focus ring */
.form-input { border-radius: 0.9rem; padding: 0.72rem 0.95rem; border-color: #DDE1E7; }
.form-input::placeholder { color: #9aa1ad; }
.form-input:focus { border-color: var(--naj-gold); box-shadow: 0 0 0 4px rgba(245, 166, 35, 0.16); }
.form-label { font-weight: 600; }

/* Soft content entrance */
#app-content > * { animation: najIn 0.28s ease both; }
@keyframes najIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
