:root {
    --ey-yellow: #ffe600;
    --ey-dark: #2e2e38;
    --ey-gray: #747480;
    --primary: #2e2e38;
    --primary-dark: #1a1a24;
    --success: #107c10;
    --warning: #ff8c00;
    --danger: #d13438;
    --bg: #f5f5f5;
    --card-bg: #ffffff;
    --text: #2e2e38;
    --text-muted: #747480;
    --border: #e1dfdd;
}

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

body {
    font-family: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    letter-spacing: -0.01em;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 3px solid var(--ey-yellow);
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-ey {
    font-size: 28px;
    font-weight: 700;
    color: var(--ey-yellow);
    background: var(--ey-dark);
    padding: 2px 10px;
    border-radius: 4px;
    line-height: 1.2;
}

header h1 {
    font-size: 24px;
    font-weight: 600;
}

.user-info {
    font-size: 14px;
    color: var(--text-muted);
}

nav {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.nav-btn {
    padding: 10px 20px;
    border: none;
    background: var(--card-bg);
    color: var(--text);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s;
}

.nav-btn:hover {
    background: var(--primary);
    color: white;
}

.nav-btn.active {
    background: var(--primary);
    color: white;
    border-bottom: 3px solid var(--ey-yellow);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

h2 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 20px;
}

h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
}

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

.stat-card {
    background: var(--card-bg);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    text-align: center;
}

.stat-value {
    font-size: 32px;
    font-weight: 600;
    color: var(--primary);
}

.stat-label {
    font-size: 14px;
    color: var(--text-muted);
    margin-top: 4px;
}

.time-filter {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 20px;
}

.time-filter select {
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 14px;
}

.keys-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.key-card {
    background: var(--card-bg);
    padding: 16px 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.key-info {
    flex: 1;
    min-width: 200px;
}

.key-id {
    font-family: 'Cascadia Code', 'Consolas', monospace;
    font-size: 13px;
    color: var(--text-muted);
}

.key-email {
    font-weight: 500;
}

.key-reason {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 4px;
}

.key-meta {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}

.key-app-tag {
    display: inline-block;
    background: var(--ey-yellow);
    color: var(--ey-dark);
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
    margin-left: 6px;
    text-transform: uppercase;
}

.key-status {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
}

.key-status.active {
    background: #dff6dd;
    color: var(--success);
}

.key-status.pending {
    background: #fff4ce;
    color: var(--warning);
}

.key-status.revoked,
.key-status.rejected {
    background: #fde7e9;
    color: var(--danger);
}

.key-actions {
    display: flex;
    gap: 8px;
}

.btn-primary {
    padding: 10px 20px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-secondary {
    padding: 8px 16px;
    background: var(--card-bg);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background: var(--bg);
}

.btn-danger {
    padding: 8px 16px;
    background: var(--danger);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
}

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

.btn-sm {
    padding: 4px 10px !important;
    font-size: 12px !important;
}

.btn-success {
    padding: 8px 16px;
    background: var(--success);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
}

.form {
    background: var(--card-bg);
    padding: 24px;
    border-radius: 8px;
    max-width: 500px;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 6px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
}

.form-group textarea {
    resize: vertical;
}

.result-box {
    margin-top: 20px;
    padding: 16px;
    border-radius: 8px;
    background: #dff6dd;
}

.result-box.error {
    background: #fde7e9;
}

.result-box .api-key-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}

.result-box .api-key {
    font-family: 'Consolas', monospace;
    background: rgba(0,0,0,0.05);
    padding: 8px 12px;
    border-radius: 4px;
    word-break: break-all;
    flex: 1;
}

.btn-copy {
    background: none;
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 6px 8px;
    cursor: pointer;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s, border-color 0.15s;
    flex-shrink: 0;
}

.btn-copy:hover {
    color: var(--primary);
    border-color: var(--primary);
}

.admin-section {
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border);
}

.admin-section:last-child {
    border-bottom: none;
}

.filter-row {
    margin-bottom: 16px;
}

.quota-status {
    background: var(--card-bg);
    padding: 16px 20px;
    border-radius: 8px;
}

.quota-bar {
    margin-top: 12px;
}

.quota-bar-label {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    margin-bottom: 4px;
}

.quota-bar-track {
    height: 8px;
    background: var(--border);
    border-radius: 4px;
    overflow: hidden;
}

.quota-bar-fill {
    height: 100%;
    background: var(--primary);
    border-radius: 4px;
    transition: width 0.3s;
}

.quota-bar-fill.warning {
    background: var(--warning);
}

.quota-bar-fill.danger {
    background: var(--danger);
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: var(--card-bg);
    padding: 24px;
    border-radius: 8px;
    width: 100%;
    max-width: 400px;
}

.modal-content h3 {
    margin-bottom: 20px;
}

.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 20px;
}

.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    padding: 12px 20px;
    background: var(--text);
    color: white;
    border-radius: 4px;
    font-size: 14px;
    z-index: 1001;
    animation: slideIn 0.3s ease;
}

.toast.success {
    background: var(--success);
}

.toast.error {
    background: var(--danger);
}

@keyframes slideIn {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.login-gate {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 500;
    overflow: auto;
}



.login-card-wrap {
    max-width: 400px;
    width: 100%;
    perspective: 800px;
    flex-shrink: 0;
}

.login-card-inner {
    position: relative;
    border-radius: 16px;
    background: linear-gradient(145deg, rgba(46,46,56,0.92) 0%, rgba(26,26,36,0.96) 100%);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    box-shadow:
        0 30px 60px rgba(0,0,0,0.5),
        0 0 0 1px rgba(255,255,255,0.06),
        inset 0 1px 0 rgba(255,255,255,0.1);
    transform: rotateY(-1.5deg) rotateX(0.5deg);
    transition: transform 0.5s cubic-bezier(.25,.46,.45,.94), box-shadow 0.5s ease;
    overflow: hidden;
}

.login-card-inner:hover {
    transform: rotateY(0deg) rotateX(0deg) translateY(-6px);
    box-shadow:
        0 40px 80px rgba(0,0,0,0.55),
        0 0 0 1px rgba(255,255,255,0.08),
        inset 0 1px 0 rgba(255,255,255,0.12),
        0 0 40px rgba(255,228,0,0.04);
}

.login-card-accent {
    height: 3px;
    background: linear-gradient(90deg, var(--ey-yellow) 0%, #ffd740 50%, transparent 100%);
}

.login-panel {
    padding: 36px 32px 28px;
}

.login-logo {
    font-size: inherit;
    font-weight: 800;
    color: var(--ey-yellow);
    letter-spacing: -0.5px;
    font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
    text-shadow: 0 0 24px rgba(255,228,0,0.2);
}

.login-title {
    font-size: 32px;
    font-weight: 700;
    color: #fff;
    line-height: 1.3;
    margin-bottom: 8px;
    letter-spacing: 3px;
}

.login-tagline {
    font-size: 10px;
    color: var(--ey-yellow);
    font-weight: 600;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    margin-bottom: 16px;
    opacity: 0.85;
}

.login-desc {
    font-size: 13px;
    color: rgba(255,255,255,0.5);
    line-height: 1.65;
    margin-bottom: 14px;
}

.login-features {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.login-feat-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: rgba(255,255,255,0.55);
}

.login-feat-icon {
    font-size: 14px;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.login-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 22px;
}

.ey-btn-primary {
    flex: 1;
    padding: 11px 24px;
    background: var(--ey-yellow);
    color: var(--ey-dark);
    border: none;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    border-radius: 8px;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 14px rgba(255,228,0,0.3);
}

.ey-btn-primary:hover:not(:disabled) {
    background: #fff;
    color: var(--ey-dark);
    box-shadow: 0 6px 20px rgba(255,255,255,0.25);
    transform: translateY(-2px);
}

.ey-btn-ghost {
    flex: 1;
    padding: 11px 24px;
    background: rgba(255,255,255,0.04);
    color: rgba(255,255,255,0.7);
    border: 1px solid rgba(255,255,255,0.12);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border-radius: 8px;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.ey-btn-ghost:hover:not(:disabled) {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.35);
    color: #fff;
    transform: translateY(-2px);
}

.ey-btn-primary:disabled,
.ey-btn-ghost:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
}

.login-footer {
    font-size: 10px;
    color: rgba(255,255,255,0.2);
    letter-spacing: 0.6px;
    padding-top: 14px;
    border-top: 1px solid rgba(255,255,255,0.05);
    font-style: italic;
    text-align: center;
}

/* Particles canvas */
.login-particles {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

/* Charts */
.charts-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin: 20px 0;
}

.chart-card {
    background: var(--card-bg);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.chart-card h3 {
    font-size: 14px;
    margin-bottom: 12px;
}

.chart-card canvas {
    max-height: 280px;
}

/* Requestor info */
.requestor-info {
    background: var(--card-bg);
    padding: 12px 20px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.requestor-info span {
    color: var(--text-muted);
    margin-right: 16px;
}

.required {
    color: var(--danger);
}

/* Data tables */
.table-wrap {
    overflow-x: auto;
    margin-bottom: 12px;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    background: var(--card-bg);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.data-table th {
    background: var(--primary);
    color: #fff;
    font-weight: 500;
    text-align: left;
    padding: 10px 12px;
    white-space: nowrap;
}

.data-table td {
    padding: 8px 12px;
    border-bottom: 1px solid var(--border);
}

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

.data-table-sm {
    font-size: 12px;
}

.data-table-sm th {
    padding: 8px 10px;
    background: var(--bg);
    color: var(--text);
}

.data-table-sm td {
    padding: 6px 10px;
}

.cell-num {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.cell-mono {
    font-family: 'Cascadia Code', 'Consolas', monospace;
    font-size: 12px;
}

.cell-nowrap {
    white-space: nowrap;
}

.cell-rank {
    text-align: center;
    font-weight: 600;
    color: var(--text-muted);
}

.cell-cost {
    font-weight: 600;
}

.text-muted {
    color: var(--text-muted);
}

.status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 6px;
}

.status-dot.ok {
    background: var(--success);
}

.status-dot.err {
    background: var(--danger);
}

/* Pagination */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 12px 0;
}

.page-info {
    font-size: 13px;
    color: var(--text-muted);
}

/* Analytics filters */
.analytics-filters {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.analytics-filters select {
    padding: 6px 10px;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 13px;
}

/* 5-column stats grid */
.stats-grid-5 {
    grid-template-columns: repeat(5, 1fr);
}

/* Budget bar with forecast marker */
.budget-bar-wrap {
    margin-top: 8px;
}

.budget-track {
    position: relative;
}

.forecast-marker {
    position: absolute;
    top: -3px;
    width: 2px;
    height: 14px;
    background: var(--danger);
    border-radius: 1px;
}

.forecast-marker::after {
    content: '';
    position: absolute;
    top: -4px;
    left: -3px;
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 4px solid var(--danger);
}

/* Application cards */
.app-card {
    background: var(--card-bg);
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    margin-bottom: 12px;
    overflow: hidden;
}

.app-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    cursor: pointer;
    transition: background 0.15s;
}

.app-card-header:hover {
    background: #f9f9fb;
}

.app-card-header.expanded {
    border-bottom: 1px solid var(--border);
}

.app-card-title {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.app-name {
    font-weight: 600;
    font-size: 15px;
    text-transform: uppercase;
}

.app-stats {
    font-size: 12px;
    color: var(--text-muted);
}

.app-cost {
    font-size: 18px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    color: var(--primary);
}

.app-card-detail {
    padding: 16px 20px;
}

.app-sub-section {
    margin-bottom: 16px;
}

.app-sub-section:last-child {
    margin-bottom: 0;
}

.app-sub-section h4 {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 8px;
}

/* Product Analytics */
.product-summary-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.product-stat {
    text-align: center;
    padding: 12px 8px;
    background: var(--bg);
    border-radius: 6px;
}

.product-stat-num {
    display: block;
    font-size: 20px;
    font-weight: 600;
    color: var(--primary);
    font-variant-numeric: tabular-nums;
}

.product-stat-label {
    display: block;
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
}

.product-user-card {
    background: var(--bg);
    border-radius: 6px;
    margin-bottom: 8px;
    overflow: hidden;
}

.product-user-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    cursor: pointer;
    transition: background 0.15s;
}

.product-user-header:hover {
    background: #eeeef2;
}

.product-user-header.expanded {
    border-bottom: 1px solid var(--border);
}

.product-user-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.product-user-email {
    font-weight: 600;
    font-size: 14px;
}

.product-user-stats {
    font-size: 12px;
    color: var(--text-muted);
}

.product-user-cost {
    font-size: 16px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    color: var(--primary);
}

.product-user-keys {
    padding: 12px 16px;
}

/* Login page animations */
@keyframes fadeSlideIn {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes loginFadeIn {
    from { opacity: 0; transform: scale(0.96) translateY(20px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

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

@keyframes orbFloat1 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(60px, -80px) scale(1.15); }
    66% { transform: translate(-40px, 40px) scale(0.9); }
}

@keyframes orbFloat2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(-70px, 60px) scale(1.1); }
    66% { transform: translate(50px, -50px) scale(0.85); }
}

@keyframes orbFloat3 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(30px, -60px) scale(1.2); }
}

@keyframes pulseGlow {
    0%, 100% { text-shadow: 0 0 20px rgba(255,228,0,0.15); }
    50% { text-shadow: 0 0 30px rgba(255,228,0,0.35), 0 0 60px rgba(255,228,0,0.1); }
}

.login-fade-in {
    animation: loginFadeIn 0.7s ease forwards;
}

.login-slide-up {
    opacity: 0;
    animation: loginSlideUp 0.5s ease forwards;
}

.login-slide-up.delay-1 { animation-delay: 0.15s; }
.login-slide-up.delay-2 { animation-delay: 0.3s; }
.login-slide-up.delay-3 { animation-delay: 0.45s; }
.login-slide-up.delay-4 { animation-delay: 0.6s; }

.login-logo-glow {
    animation: pulseGlow 3s ease-in-out infinite;
    display: inline;
}

.login-bg-anim {
    position: absolute;
    inset: 0;
    overflow: hidden;
    z-index: 0;
    background: linear-gradient(160deg, #1a1a24 0%, #2e2e38 40%, #1a1a2e 100%);
}

.login-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.35;
}

.login-orb-1 {
    width: 400px;
    height: 400px;
    background: var(--ey-yellow);
    top: -100px;
    right: -80px;
    animation: orbFloat1 12s ease-in-out infinite;
}

.login-orb-2 {
    width: 300px;
    height: 300px;
    background: #188ce5;
    bottom: -60px;
    left: -40px;
    animation: orbFloat2 15s ease-in-out infinite;
}

.login-orb-3 {
    width: 200px;
    height: 200px;
    background: #ffe600;
    top: 50%;
    left: 50%;
    opacity: 0.15;
    animation: orbFloat3 10s ease-in-out infinite;
}

.login-grid-lines {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 60px 60px;
}

.login-hero {
    width: 100%;
    height: 100%;
    position: relative;
}

.login-overlay {
    width: 100%;
    height: 100%;
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

/* Login split layout */
.login-content {
    display: flex;
    align-items: center;
    gap: 48px;
    max-width: 920px;
    width: 100%;
}

/* CLI Terminal */
.login-terminal {
    flex: 1;
    min-width: 0;
    background: rgba(10,10,18,0.85);
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.08);
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0,0,0,0.4);
}

.terminal-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    background: rgba(255,255,255,0.04);
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.terminal-dots {
    display: flex;
    gap: 5px;
}

.terminal-dots span {
    width: 9px;
    height: 9px;
    border-radius: 50%;
}

.terminal-dots span:nth-child(1) { background: #ff5f56; }
.terminal-dots span:nth-child(2) { background: #ffbd2e; }
.terminal-dots span:nth-child(3) { background: #27c93f; }

.terminal-title {
    font-size: 10px;
    color: rgba(255,255,255,0.35);
    font-family: 'Cascadia Code', 'Consolas', monospace;
    letter-spacing: 0.5px;
}

.terminal-body {
    padding: 12px 14px;
    font-family: 'Cascadia Code', 'Consolas', monospace;
    font-size: 11px;
    line-height: 1.6;
    height: 220px;
    overflow: hidden;
    position: relative;
}

.t-line {
    white-space: pre;
    opacity: 0;
    animation: tLineFade 0.25s ease forwards;
}

.t-cmd { color: #27c93f; }
.t-out { color: rgba(255,255,255,0.6); }
.t-grn { color: #27c93f; }
.t-ylw { color: var(--ey-yellow); }
.t-dim { color: rgba(255,255,255,0.3); }

.t-cursor::after {
    content: '_';
    animation: blink 0.8s step-end infinite;
}

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

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* Camera aperture lens background */
.login-aperture-lens {
    position: absolute;
    width: 600px;
    height: 600px;
    top: 50%;
    left: 25%;
    transform: translate(-50%, -50%);
    opacity: 0.06;
    z-index: 0;
    border-radius: 50%;
    border: 2px solid rgba(255,228,0,0.3);
    animation: apertureRotate 30s linear infinite;
    background:
        conic-gradient(
            from 0deg,
            transparent 0deg, rgba(255,228,0,0.15) 5deg, transparent 10deg,
            transparent 60deg, rgba(255,228,0,0.15) 65deg, transparent 70deg,
            transparent 120deg, rgba(255,228,0,0.15) 125deg, transparent 130deg,
            transparent 180deg, rgba(255,228,0,0.15) 185deg, transparent 190deg,
            transparent 240deg, rgba(255,228,0,0.15) 245deg, transparent 250deg,
            transparent 300deg, rgba(255,228,0,0.15) 305deg, transparent 310deg
        );
}

.login-aperture-lens::before {
    content: '';
    position: absolute;
    inset: 60px;
    border-radius: 50%;
    border: 1.5px solid rgba(255,228,0,0.2);
    animation: apertureRotate 20s linear infinite reverse;
}

.login-aperture-lens::after {
    content: '';
    position: absolute;
    inset: 140px;
    border-radius: 50%;
    border: 1px solid rgba(255,228,0,0.15);
    box-shadow: 0 0 80px rgba(255,228,0,0.05), inset 0 0 80px rgba(255,228,0,0.03);
}

@keyframes apertureRotate {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* 4th orb */
.login-orb-4 {
    width: 150px;
    height: 150px;
    background: #ff6b35;
    top: 30%;
    right: 30%;
    opacity: 0.18;
    animation: orbFloat1 18s ease-in-out infinite reverse;
}

/* Scan line */
.login-scan-line {
    position: absolute;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, rgba(255,230,0,0.08) 50%, transparent 100%);
    animation: scanMove 6s linear infinite;
    z-index: 1;
}

@keyframes scanMove {
    0% { top: 0; }
    100% { top: 100%; }
}

/* Welcome Banner */
.welcome-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, var(--ey-dark) 0%, #3a3a4a 100%);
    color: #fff;
    padding: 22px 28px;
    border-radius: 10px;
    margin-bottom: 20px;
    gap: 16px;
    flex-wrap: wrap;
}

.welcome-heading {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 2px;
    color: #fff;
}

.welcome-heading span {
    color: var(--ey-yellow);
}

.welcome-sub {
    font-size: 13px;
    color: rgba(255,255,255,0.6);
}

.welcome-actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

.welcome-btn {
    padding: 8px 20px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    white-space: nowrap;
}

.welcome-btn-primary {
    background: var(--ey-yellow);
    color: var(--ey-dark);
}

.welcome-btn-primary:hover {
    background: #fff;
    color: var(--ey-dark);
}

.welcome-btn-outline {
    background: transparent;
    color: #fff;
    border: 1px solid rgba(255,255,255,0.3);
}

.welcome-btn-outline:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.5);
}

/* Stat card emoji */
.stat-emoji {
    font-size: 22px;
    margin-bottom: 6px;
    line-height: 1;
}

.stat-card-accent {
    transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card-accent:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.1);
}

.hidden {
    display: none !important;
}

.empty-state {
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
}

/* Show more */
.show-more-wrap {
    text-align: center;
    padding: 12px 0 0;
}

/* App Footer */
.app-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 40px;
    padding: 16px 0;
    border-top: 3px solid var(--ey-yellow);
    font-size: 12px;
    color: var(--text-muted);
}

.footer-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-ey {
    font-size: 18px;
    font-weight: 700;
    color: var(--ey-yellow);
    background: var(--ey-dark);
    padding: 1px 6px;
    border-radius: 3px;
    line-height: 1.2;
}

.footer-tagline {
    font-style: italic;
    color: var(--text-muted);
}

.footer-right {
    font-weight: 500;
    color: var(--text-muted);
}

/* Product Analytics Table */
.product-overview-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    background: var(--card-bg);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    margin-bottom: 20px;
}

.product-overview-table th {
    background: var(--primary);
    color: #fff;
    font-weight: 500;
    text-align: left;
    padding: 10px 14px;
    white-space: nowrap;
}

.product-overview-table td {
    padding: 10px 14px;
    border-bottom: 1px solid var(--border);
}

.product-overview-table tbody tr {
    cursor: pointer;
    transition: background 0.15s;
}

.product-overview-table tbody tr:hover {
    background: #f5f5fa;
}

.product-overview-table tbody tr.selected-product {
    background: #fffbe6;
    border-left: 3px solid var(--ey-yellow);
}

.product-detail-panel {
    background: var(--card-bg);
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    padding: 20px;
    margin-top: 16px;
    animation: fadeSlideIn 0.3s ease;
}

.product-detail-panel h3 {
    font-size: 17px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.product-detail-panel h3 .app-name {
    color: var(--ey-yellow);
    background: var(--ey-dark);
    padding: 2px 10px;
    border-radius: 4px;
    font-size: 14px;
}

/* ============================
   Responsive Design
   ============================ */

@media (max-width: 1200px) {
    .container {
        max-width: 100%;
        padding: 16px;
    }
}

@media (max-width: 900px) {
    .stats-grid-5 {
        grid-template-columns: repeat(3, 1fr);
    }

    header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    nav {
        gap: 6px;
    }

    .nav-btn {
        padding: 8px 14px;
        font-size: 13px;
    }

    .charts-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 12px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .stats-grid-5 {
        grid-template-columns: repeat(2, 1fr);
    }

    .product-summary-row {
        grid-template-columns: repeat(3, 1fr);
    }

    .modal-content {
        max-width: 92vw;
        margin: 12px;
    }

    .app-footer {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }

    .data-table {
        font-size: 12px;
    }

    .data-table th,
    .data-table td {
        padding: 6px 8px;
    }

    .login-content {
        flex-direction: column;
        gap: 32px;
    }

    .login-terminal {
        display: none;
    }

    .login-card-wrap {
        max-width: 340px;
    }

    .login-panel {
        padding: 28px 24px 22px;
    }

    .login-title {
        font-size: 22px;
    }

    .login-logo {
        font-size: 24px;
    }
}

@media (max-width: 600px) {
    .container {
        padding: 10px;
    }

    .stats-grid-5 {
        grid-template-columns: repeat(2, 1fr);
    }

    .welcome-banner {
        flex-direction: column;
        text-align: center;
        padding: 18px 20px;
    }

    .welcome-actions {
        width: 100%;
        justify-content: center;
    }

    .login-overlay {
        padding: 20px 16px;
    }

    .login-card-wrap {
        max-width: 100%;
    }

    .login-card-inner {
        transform: none;
        border-radius: 10px;
    }

    .login-panel {
        padding: 24px 20px 20px;
    }

    .login-title {
        font-size: 20px;
    }

    .login-logo {
        font-size: 22px;
    }

    .login-desc {
        font-size: 12px;
    }

    .login-actions {
        flex-direction: column;
    }

    .ey-btn-primary,
    .ey-btn-ghost {
        width: 100%;
        text-align: center;
    }

    .key-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .key-actions {
        width: 100%;
        justify-content: flex-end;
    }

    nav {
        gap: 4px;
    }

    .nav-btn {
        padding: 8px 10px;
        font-size: 12px;
        flex: 1 1 auto;
        text-align: center;
        min-width: 0;
    }

    header h1 {
        font-size: 20px;
    }

    h2 {
        font-size: 18px;
    }

    .stat-value {
        font-size: 24px;
    }

    .filter-row.analytics-filters {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-row.analytics-filters label {
        width: 100%;
    }

    .filter-row.analytics-filters select {
        width: 100%;
    }

    .time-filter {
        flex-direction: column;
        align-items: stretch;
    }

    .time-filter select {
        width: 100%;
    }

    .product-summary-row {
        grid-template-columns: repeat(2, 1fr);
    }

    .product-user-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .app-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .form {
        padding: 16px;
        max-width: 100%;
    }

    .login-orb-1 {
        width: 250px;
        height: 250px;
    }

    .login-orb-2 {
        width: 180px;
        height: 180px;
    }

    .login-orb-3 {
        width: 120px;
        height: 120px;
    }

    .product-overview-table th,
    .product-overview-table td {
        padding: 8px 10px;
        font-size: 12px;
    }

    .product-detail-panel {
        padding: 14px;
    }
}

@media (max-width: 400px) {
    .container {
        padding: 8px;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .stat-card {
        padding: 14px 10px;
    }

    .stat-value {
        font-size: 20px;
    }

    .stat-label {
        font-size: 12px;
    }

    .nav-btn {
        padding: 6px 8px;
        font-size: 11px;
    }

    .key-card {
        padding: 12px;
    }

    .btn-primary,
    .btn-secondary,
    .btn-danger {
        font-size: 13px;
        padding: 8px 14px;
    }

    .btn-sm {
        padding: 3px 8px !important;
        font-size: 11px !important;
    }

}
