:root {
    --primary: #DC7D07;
    --primary-hover: #b56606;
    --bg: #0a0a0a;
    --sidebar-bg: #121212;
    --card-bg: rgba(25, 25, 25, 0.7);
    --text: #ffffff;
    --text-muted: #a0a0a0;
    --border: rgba(220, 125, 7, 0.15);
    --success: #10b981;
    --accent: #ff4d4d;
    --glass: rgba(220, 125, 7, 0.05);
}

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

body {
    background-color: var(--bg);
    color: var(--text);
    overflow: hidden;
}

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

/* Sidebar */
.sidebar {
    width: 280px;
    background: #000;
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
}

.nav-label {
    font-size: 0.7rem;
    font-weight: 700;
    color: #444;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin: 1.5rem 0 0.5rem 1rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 2.5rem;
    color: var(--primary);
}

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

nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 700;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
}

.nav-item.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 8px 20px rgba(220, 125, 7, 0.3);
}

.nav-item i {
    width: 20px;
    height: 20px;
}

/* Main Content */
.content {
    flex: 1;
    overflow-y: auto;
    background: radial-gradient(at 0% 0%, rgba(220, 125, 7, 0.05) 0px, transparent 50%);
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 3rem;
    background: #050505;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.top-bar h1 {
    font-size: 2.25rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

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

.view {
    padding: 2.5rem;
    animation: fadeIn 0.4s ease-out;
}

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

/* Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.stat-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    padding: 1.75rem;
    border-radius: 1.25rem;
    backdrop-filter: blur(10px);
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 2.25rem;
    font-weight: 700;
}

.stat-trend {
    font-size: 0.75rem;
    color: var(--success);
    margin-top: 0.5rem;
}

/* Cards & Tables */
.main-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 1.25rem;
    overflow: hidden;
}

.card-header, .card-header-actions {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    text-align: left;
    padding: 1rem 2rem;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.875rem;
    border-bottom: 1px solid var(--border);
}

td {
    padding: 1rem 2rem;
    border-bottom: 1px solid var(--border);
}

input[type="number"], select, input[type="text"], input[type="email"], input[type="password"], .filter-input {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border);
    color: white;
    padding: 0 1rem;
    height: 2.75rem; /* Standard height for inputs */
    border-radius: 0.75rem;
    outline: none;
    transition: border-color 0.2s;
    font-size: 0.875rem;
}

.filter-input {
    color-scheme: dark;
}

input:focus, .filter-input:focus {
    border-color: var(--primary);
}

/* Buttons */
.btn {
    padding: 0.625rem 1.25rem;
    border-radius: 0.75rem;
    border: none;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s;
}

.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3); }
.btn-ghost { background: transparent; color: var(--text-muted); }
.btn-ghost:hover { background: var(--glass); color: var(--text); }

/* Grids */
.employee-grid, .subscriptions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.emp-card, .sub-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    padding: 2rem;
    border-radius: 1.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

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

.emp-card:hover, .sub-card:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
    background: rgba(30, 41, 59, 0.7);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
}

.emp-card:hover::before, .sub-card:hover::before {
    opacity: 1;
}

.emp-name {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: white;
}

.emp-meta {
    font-size: 0.9rem;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-bottom: 1.5rem;
}

.emp-meta span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.wallet-copy {
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    padding: 0.5rem 0.75rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 0.5rem;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: fit-content;
    margin: 0.25rem 0;
}

.wallet-copy:hover {
    background: rgba(220, 125, 7, 0.1);
    border-color: var(--primary);
    color: var(--primary);
}

.wallet-text {
    font-size: 0.8rem;
    font-family: monospace;
}

.copy-icon {
    width: 14px;
    height: 14px;
    opacity: 0.5;
}

.wallet-copy:hover .copy-icon {
    opacity: 1;
}

/* Login Screen */
.login-overlay {
    position: fixed;
    inset: 0;
    background: var(--bg);
    background-image: radial-gradient(circle at 50% 50%, rgba(220, 125, 7, 0.1), transparent);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.login-card {
    background: var(--sidebar-bg);
    border: 1px solid var(--border);
    padding: 3rem;
    border-radius: 2rem;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    animation: fadeIn 0.6s ease-out;
}

.login-card h2 {
    text-align: center;
    margin-bottom: 0.5rem;
    font-size: 1.75rem;
}
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 100;
}

.modal {
    background: var(--sidebar-bg);
    border: 1px solid var(--border);
    padding: 2rem;
    border-radius: 1.5rem;
    width: 100%;
    max-width: 450px;
}

.form-group { margin-bottom: 1.25rem; }
.form-group label { display: block; margin-bottom: 0.5rem; font-size: 0.875rem; color: var(--text-muted); }
.form-group input, .form-group select { 
    width: 100%; 
    padding: 0 1rem; 
    height: 3.5rem; 
    font-size: 1rem;
}

.modal-actions { display: flex; justify-content: flex-end; gap: 1rem; margin-top: 2rem; }

#qrcode img {
    display: block;
    margin: 0 auto;
}

#mfaActiveBox {
    display: none; 
    background: rgba(16, 185, 129, 0.1); 
    padding: 1.25rem; 
    border-radius: 1rem; 
    border: 1px solid var(--success); 
    color: var(--success); 
    align-items: center; 
    gap: 1rem;
    margin-top: 1rem;
}

#mfaSetupBox {
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--border);
    padding: 2rem;
    border-radius: 1.5rem;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

#qrcode {
    background: white;
    padding: 1rem;
    border-radius: 1rem;
    width: 210px;
    height: 210px;
    margin: 1.5rem auto;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 25px rgba(0,0,0,0.5);
}

#qrcode img, #qrcode svg {
    max-width: 100%;
    max-height: 100%;
}

#mfaSetupCode {
    text-align: center;
    font-size: 1.5rem !important;
    letter-spacing: 0.5rem;
    font-family: monospace;
    height: 4rem !important;
    border-color: var(--primary);
}
