:root {
    --primary: #14B8A6;
    --primary-hover: #0D9488;
    --secondary: #2DD4BF;
    --accent: #F59E0B;

    --bg-dark: #0A1218;
    --panel-bg: rgba(15, 25, 33, 0.7);
    --glass-border: rgba(45, 212, 191, 0.15);

    --text-main: #F0FDFA;
    --text-muted: #99F6E4;

    --font-sans: 'Inter', system-ui, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    --radius: 12px;
    --radius-sm: 6px;

    --transition: all 0.2s ease-in-out;
}

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

body {
    font-family: var(--font-sans);
    background: var(--bg-dark);
    color: var(--text-main);
    height: 100vh;
    overflow: hidden;
    display: flex;
}

.hidden {
    display: none !important;
}

/* Layout */
.app-layout {
    display: flex;
    width: 100%;
    height: 100%;
}

.sidebar {
    width: 280px;
    height: 100%;
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--glass-border);
    background: var(--panel-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 1.5rem;
}

.main-content {
    flex: 1;
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    gap: 1.5rem;
    overflow: hidden;
}

/* Glass Components */
.glass {
    background: var(--panel-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
}

/* Brand */
.brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.brand svg {
    width: 24px;
    height: 24px;
}

.brand h1 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
}

/* Nav Menu */
.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
}

.nav-item {
    background: transparent;
    border: none;
    color: var(--text-muted);
    text-align: left;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.nav-item:hover {
    background: rgba(20, 184, 166, 0.1);
    color: var(--text-main);
}

.nav-item.active {
    background: rgba(20, 184, 166, 0.15);
    color: var(--primary);
    border-left: 3px solid var(--primary);
}

/* Sidebar Bottom (Quota & Actions) */
.sidebar-bottom {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.quota-widget {
    background: rgba(0, 0, 0, 0.3);
    padding: 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.quota-widget h3 {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.quota-bar {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 99px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.quota-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--secondary), var(--primary));
    width: 0%;
    transition: width 0.5s ease;
}

.quota-stats {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
    display: flex;
    justify-content: space-between;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-family: var(--font-sans);
    font-weight: 600;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    cursor: pointer;
    transition: var(--transition);
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
}

.btn.primary {
    background: var(--primary);
    color: #000;
    box-shadow: 0 4px 15px rgba(20, 184, 166, 0.2);
}

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

.btn.primary.danger {
    background: rgba(239, 68, 68, 0.15);
    color: #EF4444;
    border-color: rgba(239, 68, 68, 0.3);
    box-shadow: none;
}

.btn.primary.danger:hover {
    background: rgba(239, 68, 68, 0.25);
}

.btn.ghost {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    border-color: var(--glass-border);
}

.btn.ghost:hover {
    background: rgba(255, 255, 255, 0.1);
}

.btn.icon-btn {
    padding: 0.5rem;
}

.btn.small {
    padding: 0.3rem 0.6rem;
    font-size: 0.8rem;
}

.w-full {
    width: 100%;
}

.mt-2 {
    margin-top: 0.5rem;
}

.cursor-pointer {
    cursor: pointer;
}

.text-center {
    text-align: center;
}

/* Main Content Header */
.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
}

.header-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header-info h2 {
    font-size: 1.25rem;
    font-weight: 600;
}

.badge {
    background: rgba(20, 184, 166, 0.15);
    color: var(--primary);
    padding: 0.25rem 0.6rem;
    border-radius: 99px;
    font-size: 0.8rem;
    font-family: var(--font-mono);
    font-weight: 600;
}

.header-actions {
    display: flex;
    gap: 0.5rem;
}

/* Data Table */
.table-container {
    flex: 1;
    overflow: auto;
    position: relative;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.data-table th,
.data-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    white-space: nowrap;
}

.data-table th {
    color: var(--text-muted);
    font-weight: 600;
    position: sticky;
    top: 0;
    background: var(--panel-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 10;
    border-bottom: 2px solid var(--glass-border);
}

.data-table tbody tr {
    transition: background 0.2s;
}

.data-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

.cell-key {
    color: var(--secondary);
    font-weight: 500;
}

.cell-val {
    font-family: var(--font-mono);
    color: var(--text-main);
    max-width: 400px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cell-actions {
    text-align: right;
}

.action-links {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
}

.empty-state {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--text-muted);
    font-style: italic;
    font-size: 0.95rem;
}

/* Modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.modal {
    width: 100%;
    max-width: 500px;
    background: var(--bg-dark);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--glass-border);
}

.modal-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.form-group label {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

.form-control {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    padding: 0.75rem;
    color: var(--text-main);
    font-family: var(--font-sans);
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s;
    width: 100%;
    resize: vertical;
}

.form-control:focus {
    border-color: var(--primary);
}

.form-control.mono {
    font-family: var(--font-mono);
    font-size: 0.85rem;
}

.modal-footer {
    padding: 1.25rem 1.5rem;
    border-top: 1px solid var(--glass-border);
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}