:root {
    --primary: #facc15;
    --primary-hover: #eab308;
    --bg: #000000;
    --surface: rgba(10, 10, 10, 0.8);
    --surface-light: rgba(255, 255, 255, 0.03);
    --surface-border: rgba(255, 255, 255, 0.08);
    --text: #ffffff;
    --text-muted: #888888;
    --danger: #ff4444;
    --success: #00ff88;
    --radius: 16px;
    --glass: blur(20px);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Advanced Background */
.bg-gradient {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: 
        radial-gradient(circle at 10% 10%, rgba(250, 204, 21, 0.03) 0%, transparent 40%),
        radial-gradient(circle at 90% 90%, rgba(250, 204, 21, 0.03) 0%, transparent 40%);
}

.container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 2.5rem;
}

.glass {
    background: var(--surface);
    backdrop-filter: var(--glass);
    -webkit-backdrop-filter: var(--glass);
    border: 1px solid var(--surface-border);
    border-radius: var(--radius);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
}

.glass:hover {
    box-shadow: 0 15px 50px rgba(250, 204, 21, 0.05);
}

/* Animations */
.animate-slide-up {
    animation: slideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    opacity: 0;
}

.animate-fade-in {
    animation: fadeIn 1s ease forwards;
    opacity: 0;
}

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

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Auth Pages */
.auth-container {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
}

.auth-card {
    width: 100%;
    max-width: 440px;
    padding: 3.5rem;
    position: relative;
    overflow: hidden;
}

.auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
}

.logo {
    text-align: center;
    margin-bottom: 2.5rem;
}

.logo img {
    height: 90px;
    filter: drop-shadow(0 0 10px rgba(250, 204, 21, 0.2));
}

/* Header */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--surface-border);
}

/* Buttons */
.btn {
    padding: 0.85rem 1.75rem;
    border-radius: 12px;
    border: none;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
}

.btn-primary {
    background: var(--primary);
    color: #000;
    box-shadow: 0 4px 20px rgba(250, 204, 21, 0.1);
}

.btn-primary:hover {
    background: #ffffff;
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 30px rgba(250, 204, 21, 0.2);
}

.btn:not(.btn-primary) {
    background: var(--surface-light);
    color: var(--text);
    border: 1px solid var(--surface-border);
}

.btn:not(.btn-primary):hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Stats & Analytics */
.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
}

.analytics-card {
    padding: 2rem;
    height: 100%;
}

.stats-column {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.stat-card {
    padding: 2rem;
    position: relative;
    overflow: hidden;
    flex: 1;
}

.stat-card h3 {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 0.75rem;
}

.stat-card p {
    font-size: 2.25rem;
    font-weight: 800;
}

.stat-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    width: 0;
    background: var(--primary);
    transition: width 0.6s ease;
}

.stat-card:hover::after {
    width: 100%;
}

/* Forms */
.input-group {
    margin-bottom: 2rem;
}

.input-group label {
    display: block;
    margin-bottom: 0.75rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

input, select, textarea {
    width: 100%;
    padding: 1rem 1.25rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--surface-border);
    border-radius: 12px;
    color: var(--text);
    outline: none;
    transition: all 0.3s;
    font-size: 1rem;
}

input:focus, select:focus, textarea:focus {
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 0 20px rgba(250, 204, 21, 0.05);
}

/* Table */
.table-container {
    padding: 1.5rem;
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 0.75rem;
}

th {
    text-align: left;
    padding: 1rem 1.5rem;
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

td {
    padding: 1.25rem 1.5rem;
    font-size: 0.95rem;
    background: rgba(255, 255, 255, 0.015);
}

td:first-child { border-radius: 12px 0 0 12px; }
td:last-child { border-radius: 0 12px 12px 0; }

tr:hover td {
    background: rgba(255, 255, 255, 0.04);
}

/* Badges */
.status-badge {
    padding: 0.4rem 1rem;
    border-radius: 8px;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.status-paid { 
    background: rgba(0, 255, 136, 0.1); 
    color: var(--success);
    border: 1px solid rgba(0, 255, 136, 0.2);
}
.status-unpaid { 
    background: rgba(255, 68, 68, 0.1); 
    color: var(--danger);
    border: 1px solid rgba(255, 68, 68, 0.2);
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-content {
    width: 100%;
    max-width: 800px;
    max-height: 95vh;
    overflow-y: auto;
    padding: 4rem;
    position: relative;
    border: 1px solid var(--surface-border);
}

.close-modal {
    position: absolute;
    top: 2rem;
    right: 2rem;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-muted);
    transition: color 0.3s;
}

.close-modal:hover {
    color: var(--text);
}

/* Invoice Preview - Pure White Contrast in Modal */
.preview-actions {
    padding: 2rem;
    padding-bottom: 0;
    display: flex;
    gap: 1.5rem;
}

.invoice-preview-container {
    background: #ffffff;
    color: #111111;
    padding: 5rem;
    margin: 2rem;
    border-radius: 4px;
    box-shadow: 0 0 50px rgba(0,0,0,0.2);
}

.invoice-header-preview {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 3rem;
    border-bottom: 4px solid #f1f5f9;
    margin-bottom: 4rem;
}

.invoice-logo-preview img {
    height: 80px;
}

.invoice-details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin-bottom: 4rem;
}

.invoice-table-preview {
    width: 100%;
    margin-bottom: 4rem;
    border-collapse: collapse;
}

.invoice-table-preview th {
    background: #f8fafc;
    padding: 1.5rem;
    color: #64748b !important;
    border-bottom: 2px solid #e2e8f0;
    text-align: left;
    font-size: 0.85rem;
}

.invoice-table-preview td {
    padding: 2rem 1.5rem;
    border-bottom: 1px solid #f1f5f9;
    color: #1e293b;
    font-size: 1.1rem;
}

.invoice-total-preview {
    margin-top: 3rem;
    padding: 3rem;
    background: #f8fafc;
    border-radius: 12px;
    text-align: right;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: #000;
}
::-webkit-scrollbar-thumb {
    background: #222;
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}
