:root {
    --bg-dark: #0f0c29;
    --bg-gradient-1: #0f0c29;
    --bg-gradient-2: #302b63;
    --bg-gradient-3: #24243e;
    --accent: #00d2d3;
    --accent-glow: rgba(0, 210, 211, 0.4);
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: 1px solid rgba(255, 255, 255, 0.1);
    --text-primary: #ecf0f1;
    --text-secondary: #bdc3c7;
    --danger: #ff4757;
    --success: #2ed573;
}
/* Utilities */
.admin-only { display: none; } /* Default hidden, toggled by JS */
.text-center { text-align: center; }
.text-right { text-align: right; }

/* Scrollbar Theming */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1); 
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2); 
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3); 
}

/* Animations */
@keyframes heartbeat {
    0% { box-shadow: 0 0 0 0 rgba(0, 210, 211, 0.4); border-color: rgba(0, 210, 211, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(0, 210, 211, 0); border-color: rgba(0, 210, 211, 0.8); }
    100% { box-shadow: 0 0 0 0 rgba(0, 210, 211, 0); border-color: rgba(0, 210, 211, 0.4); }
}

.heartbeat-border {
    animation: heartbeat 2s infinite;
    transition: all 0.3s ease;
}

/* Theme: Terminal (Classic Dashboard) */
body.terminal-theme {
    /* Dark Blue/Black Background */
    --bg-gradient-1: #0b0c15; 
    --bg-gradient-2: #0b0c15;
    --bg-gradient-3: #151621;
    
    /* Classic Green Accent */
    --accent: #1f8b4c; /* Darker green */
    --accent-glow: rgba(31, 139, 76, 0.2);
    
    /* Panel Colors */
    --glass-bg: #11121bf2; /* Solid dark */
    --glass-border: #2a2b3d;
    
    /* Text */
    --text-primary: #e0e6ed;
    --text-secondary: #94a3b8;
}

body.terminal-theme .glass {
    border: 1px solid var(--glass-border);
    box-shadow: none;
    border-radius: 8px; /* Sharper corners */
    background: #11121d;
}
body.terminal-theme .blob { display: none; }
body.terminal-theme .background-blobs { background: #0b0c15; }

/* In terminal theme, make buttons green/solid */
body.terminal-theme .btn-primary {
    background: #1f8b4c; /* Specific green */
    border: none;
    color: white;
    border-radius: 4px;
    font-weight: 600;
    text-transform: none;
    box-shadow: none;
}
body.terminal-theme .btn-primary:hover {
    background: #166436;
    transform: none;
}
body.terminal-theme h2 i { color: #e0e6ed; /* White icons */ }
body.terminal-theme .logo-text { color: #fff; }
body.terminal-theme .dot { color: #3b82f6; /* Blue dot */ }

body {
    margin: 0;
    font-family: 'Outfit', sans-serif;
    background: linear-gradient(135deg, var(--bg-gradient-1), var(--bg-gradient-2), var(--bg-gradient-3));
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    overflow-y: scroll; /* Prevent layout shift */
}

/* Animated Blobs */
.background-blobs {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: -1;
    overflow: hidden;
}
.blob {
    position: absolute;
    filter: blur(80px);
    opacity: 0.5;
    border-radius: 50%;
    animation: float 20s infinite alternate;
}
.blob-1 { top: -10%; left: -10%; width: 50vw; height: 50vw; background: #8e2de2; }
.blob-2 { bottom: -10%; right: -10%; width: 60vw; height: 60vw; background: #4a00e0; }
.blob-3 { top: 30%; left: 40%; width: 40vw; height: 40vw; background: var(--accent); opacity: 0.2; }

@keyframes float {
    from { transform: translate(0, 0) rotate(0deg); }
    to { transform: translate(50px, 50px) rotate(10deg); }
}

.glass-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    min-height: 90vh;
}

.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

/* Header */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}
/* Button Resets & Styles */
button {
    font-family: 'Outfit', sans-serif;
}

.btn-primary, .btn-secondary, .btn-sm {
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
    background: var(--accent);
    color: var(--bg-dark); /* Contrast text */
    box-shadow: 0 0 15px var(--accent-glow);
}

.btn-secondary {
    background: rgba(255,255,255,0.1);
    color: var(--text-primary);
    border: 1px solid var(--glass-border);
    box-shadow: none;
}
.btn-secondary:hover {
    background: rgba(255,255,255,0.2);
    border-color: var(--text-secondary);
}

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
}

.logo-wrapper {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.brand-logo {
    height: 40px;
    width: auto;
    filter: drop-shadow(0 0 5px var(--accent-glow));
}
.logo-text { font-size: 1.8rem; font-weight: 700; letter-spacing: -1px; }
.dot { color: var(--accent); }

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 2rem;
    margin-top: 2rem;
    max-width: 1600px; /* Increased from 1200px */
    margin-left: auto;
    margin-right: auto;
    width: 100%;
}
.deploy-panel { grid-column: 1; }
.info-panel { grid-column: 2; height: fit-content; }
.logs-panel { grid-column: 1 / -1; margin-top: 1rem; }

/* Responsive */
@media (max-width: 768px) {
    .dashboard-grid { grid-template-columns: 1fr; }
}

/* Cards */
.card { padding: 2rem; border-top: 1px solid rgba(255,255,255,0.2); }
.card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; }
.card h2 { margin: 0; font-size: 1.5rem; display: flex; align-items: center; gap: 0.8rem; font-weight: 600; }
.btn-primary {
    width: 100%;
    margin-top: 2rem;
    padding: 1.2rem;
    background: linear-gradient(90deg, var(--accent), #0072ff);
    border: none;
    border-radius: 10px;
    color: white;
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex; justify-content: center; align-items: center; gap: 10px;
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 25px var(--accent-glow);
    filter: brightness(1.1);
}
.glow-effect { text-shadow: 0 2px 4px rgba(0,0,0,0.2); }

/* Logs */
.terminal {
    background: rgba(10, 10, 15, 0.8);
    border-radius: 10px;
    padding: 1.5rem;
    height: 350px;
    overflow-y: auto;
    font-family: 'Fira Code', 'Courier New', monospace;
    font-size: 0.9rem;
    border: 1px solid var(--glass-border);
}
.terminal::-webkit-scrollbar { width: 8px; }
.terminal::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 4px; }

.log-entry { margin-bottom: 0.3rem; line-height: 1.4; word-wrap: break-word; }
.log-entry.system { color: var(--accent); font-weight: bold; margin-bottom: 1rem; opacity: 0.8; }
.log-status { font-size: 0.8rem; color: #2ed573; animation: pulse 2s infinite; }

@keyframes pulse { 0% { opacity: 0.5; } 50% { opacity: 1; } 100% { opacity: 0.5; } }

/* Animations */
.slide-in {
    opacity: 0;
    animation: slideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Navigation */
.top-nav {
    display: flex;
    gap: 1rem;
    background: rgba(0,0,0,0.2);
    padding: 0.5rem;
    border-radius: 50px;
    border: 1px solid var(--glass-border);
}
.top-nav a {
    color: var(--text-secondary);
    text-decoration: none;
    padding: 0.8rem 1.5rem;
    border-radius: 30px;
    transition: all 0.3s;
    font-weight: 500;
    display: flex; align-items: center; gap: 8px;
}
.top-nav a:hover { color: white; background: rgba(255,255,255,0.05); }
.top-nav a.active {
    background: var(--accent);
    color: #0f0c29;
    font-weight: 700;
    box-shadow: 0 0 15px var(--accent-glow);
}

/* Metrics Bar */
.metrics-bar {
    display: flex;
    justify-content: space-around;
    padding: 1.5rem;
    align-items: center;
    margin-bottom: 2rem;
}
.metric-mini {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}
.metric-mini i {
    font-size: 2rem;
    color: var(--accent);
    background: rgba(0, 210, 255, 0.1);
    padding: 1rem;
    border-radius: 12px;
}
.metric-mini .label { display: block; font-size: 0.8rem; color: var(--text-secondary); margin-bottom: 0.2rem; }
.metric-mini .value { font-size: 1.5rem; font-weight: 700; }

/* Status Bar (Footer) */
/* Status Bar (Footer) */
.status-bar {
    position: fixed;
    bottom: 30px; /* Increased floating gap */
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 1200px;
    
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 2rem;
    background: rgba(15, 12, 41, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 50px; /* Rounded pill shape */
    font-size: 0.85rem;
    color: var(--text-secondary);
    z-index: 999; /* Ensure on top */
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.status-center {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0.8;
}

/* Force dark options */
option {
    background-color: #0f0c29 !important;
    color: white !important;
}
.status-left, .status-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}
.status-item { display: flex; align-items: center; gap: 8px; }
.status-item i { color: var(--accent); }
.status-item span { color: white; font-weight: 500; }
.status-item.copyright {
    color: var(--text-secondary);
    font-size: 0.75rem;
    opacity: 0.7;
    margin-right: 1rem;
    border-right: 1px solid rgba(255,255,255,0.1);
    padding-right: 1rem;
}

/* Tables */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}
.data-table th, .data-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.data-table th { color: var(--text-secondary); font-weight: 500; font-size: 0.9rem; }
.data-table tbody tr:hover { background: rgba(255,255,255,0.02); }

/* Layout Utilities */
.single-col { grid-template-columns: 1fr; }
.full-width { grid-column: 1 / -1; }
.full-height { height: 100%; }
/* Fix Form Grid Squashing */
.form-grid-3 { 
    display: grid; 
    grid-template-columns: 1fr 2fr auto;
    gap: 1rem; 
    align-items: end; 
}
.form-grid-3 .form-group { width: 100%; }
@media(max-width: 800px) { 
    .form-grid-3 { grid-template-columns: 1fr; }
    .form-grid-3 button { width: 100%; }
}

/* Modal Icons Fix */
dialog.glass-modal .btn-icon {
    background: transparent;
    border: none;
    color: var(--text-secondary); /* Was inheriting potentially wrong color */
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.5rem;
    transition: color 0.2s;
}
dialog.glass-modal .btn-icon:hover { color: var(--danger); }

/* Modal Actions - Right Align properly */
dialog.glass-modal .modal-actions {
    margin-top: 2rem;
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    border-top: 1px solid var(--glass-border);
    padding-top: 1.5rem;
}
/* Ensure buttons don't stretch in modal actions */
dialog.glass-modal .modal-actions button { width: auto; }
.profile-pic-container {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    overflow: hidden;
    background: rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: 1px solid var(--glass-border);
    transition: all 0.3s ease;
}
.profile-pic-container:hover {
    box-shadow: 0 0 10px var(--accent);
    border-color: var(--accent);
}
.profile-pic-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.profile-pic-container i {
    font-size: 1.5rem;
    color: var(--text-secondary);
}

/* --- Theme Overrides --- */
/* Ensure inputs are readable in Terminal Theme */
body.terminal-theme input,
body.terminal-theme select,
body.terminal-theme textarea {
    background: #000 !important;
    border: 1px solid #33ff00 !important;
    color: #33ff00 !important;
    font-family: 'Fira Code', monospace;
}
body.terminal-theme .glass-panel,
body.terminal-theme .card.glass {
    background: #0a0a0a;
    border: 1px solid #33ff00;
    box-shadow: none;
}

/* Navigation Sub-Tabs */
/* Navigation Sub-Tabs */
.settings-nav {
    display: flex;
    gap: 1rem;
    padding: 0.5rem;
    margin-bottom: 2rem;
    justify-content: center;
    background: rgba(0,0,0,0.1);
    border-radius: 12px;
}
.tab-btn {
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-secondary);
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    display: flex; align-items: center; gap: 8px;
    transition: all 0.3s;
    font-weight: 500;
}
.tab-btn:hover {
    background: rgba(255,255,255,0.05);
    color: var(--text-primary);
    border-color: var(--glass-border);
}
.tab-btn.active {
    background: var(--accent);
    color: #0f0c29; /* Dark text for contrast on bright accent */
    font-weight: 700;
    box-shadow: 0 0 15px var(--accent-glow);
}
/* Terminal Theme Overrides for Tabs */
body.terminal-theme .tab-btn.active {
    color: white;
    background: var(--accent);
}

.tab-content { display: none; }
.tab-content.active { display: block; animation: fadeIn 0.3s forwards; }

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

/* Provider Grid */
.provider-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}
.provider-card {
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--glass-border);
    padding: 1.5rem;
    border-radius: 12px;
    transition: all 0.3s;
    cursor: pointer;
}
.provider-card:hover {
    border-color: var(--accent);
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}
.provider-title { font-size: 1.2rem; font-weight: 600; margin-bottom: 0.5rem; display: flex; align-items: center; gap: 8px; }
.provider-desc { font-size: 0.9rem; color: var(--text-secondary); }

.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem;
    color: var(--text-secondary);
    border: 1px dashed var(--glass-border);
    border-radius: 12px;
}

/* Theme Switcher */
.theme-switcher {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    justify-content: center;
}
.theme-btn {
    opacity: 0.5;
    min-width: 150px;
}
.theme-btn.active {
    opacity: 1;
    box-shadow: 0 0 15px var(--accent-glow);
    border-color: var(--accent);
}
/* Modal */
/* Sidebar Navigation (Generated) */
.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    height: fit-content;
}
.sidebar-nav button {
    background: transparent;
    text-align: left;
    padding: 1rem;
    border-radius: 8px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.2s;
    border: 1px solid transparent;
}
.sidebar-nav button:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}
.sidebar-nav button.active {
    background: var(--accent);
    color: var(--bg-dark);
    font-weight: 700;
    box-shadow: 0 0 15px var(--accent-glow);
}
.sidebar-nav button i { width: 20px; text-align: center; }

/* Modal Styling - Premium Glass */
dialog.glass-modal {
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 0;
    background: rgba(15, 12, 41, 0.85); /* Darker, less transparent */
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    max-width: 600px;
    width: 90%;
    color: var(--text-primary);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    animation: modalIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes modalIn {
    from { opacity: 0; transform: translateY(20px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

dialog.glass-modal::backdrop {
    background: rgba(0, 0, 0, 0.7); /* Darker backdrop */
    backdrop-filter: blur(5px);
}

dialog.glass-modal .modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.03);
}
dialog.glass-modal .modal-header h3 { margin: 0; font-size: 1.25rem; font-weight: 600; display: flex; align-items: center; gap: 10px; }
dialog.glass-modal .modal-body {
    padding: 2rem;
    overflow-y: auto;
    max-height: 70vh;
}
dialog.glass-modal .modal-actions {
    margin-top: 2rem;
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    border-top: 1px solid var(--glass-border);
    padding-top: 1.5rem;
}

/* Nested Regions/Resources */
.regions-stack { display: flex; flex-direction: column; gap: 1rem; }
.region-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    overflow: hidden;
}
.region-header {
    padding: 0.8rem 1rem;
    background: rgba(0, 0, 0, 0.2);
    display: flex; justify-content: space-between; align-items: center;
    cursor: pointer;
}
.region-header:hover { background: rgba(255,255,255,0.05); }
.region-body { padding: 1rem; display: none; }
.region-body.expanded { display: block; }

.resource-list-mini { list-style: none; padding: 0; margin-top: 0.5rem; }
.resource-item-mini {
    padding: 0.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    display: flex; justify-content: space-between; font-size: 0.9rem;
}
.resource-item-mini:last-child { border-bottom: none; }

/* Forms - Global Override */
html body input, html body select, html body textarea {
    background-color: rgba(20, 20, 30, 0.6) !important; /* Richer dark */
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    color: #ffffff !important;
    padding: 0.8rem !important;
    border-radius: 8px !important;
    width: 100% !important;
    box-sizing: border-box !important; /* Fix width overflow */
    margin-bottom: 1rem !important;
    font-family: 'Outfit', sans-serif !important;
    font-weight: 500 !important; /* Better readability */
    font-size: 0.95rem !important;
    transition: all 0.3s ease !important;
    color-scheme: dark !important; 
    
    /* Custom Select Styling */
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1em;
    padding-right: 2.5rem !important;
}

/* Specific Focus State */
html body input:focus, html body select:focus, html body textarea:focus {
    outline: none !important;
    border-color: var(--accent) !important;
    background-color: rgba(255, 255, 255, 0.15) !important;
    box-shadow: 0 0 0 2px var(--accent-glow) !important;
}

/* Chrome Autofill Fix */
input:-webkit-autofill,
input:-webkit-autofill:hover, 
input:-webkit-autofill:focus, 
input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px #1e1e2e inset !important;
    -webkit-text-fill-color: white !important;
    transition: background-color 5000s ease-in-out 0s;
}

/* --- Expandable Provider Cards & Nested Layout --- */
.provider-card {
    transition: all 0.3s ease;
}
.provider-card.expanded {
    border-color: var(--accent);
    background: rgba(255, 255, 255, 0.08); /* Highlight active */
    cursor: default;
}

.provider-details {
    display: none;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px dashed var(--glass-border);
    animation: slideDown 0.3s ease-out;
}

.provider-card.expanded .provider-details {
    display: block;
}

/* --- Sub-Section Cards (Regions/Resources Containers) --- */
.sub-section-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    margin-top: 1.5rem;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.sub-section-card.inner {
    background: rgba(0, 0, 0, 0.2);
    border: none;
    margin-top: 0;
}

.card-header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.2rem;
    background: rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid var(--glass-border);
}
.card-header-inner h4, .card-header-inner h5 {
    margin: 0;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}
.card-header-inner.info-bg {
    background: rgba(var(--accent-rgb), 0.1); /* Subtle accent tint */
}


/* Regions as Cards */
.provider-regions-section {
    margin-top: 1.5rem;
}
.regions-stack {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    padding: 1.2rem;
}

.region-card {
    background: var(--card-bg); 
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s;
}
.region-card:hover { border-color: rgba(255,255,255,0.3); }

.region-header {
    padding: 1rem 1.2rem;
    display: flex; justify-content: space-between; align-items: center;
    cursor: pointer;
    background: rgba(255,255,255,0.03);
}
.region-header:hover { background: rgba(255,255,255,0.06); }

.region-body {
    padding: 1rem;
    display: none;
    background: rgba(0,0,0,0.1);
    border-top: 1px solid var(--glass-border);
}
.region-header.expanded-header {
    background: rgba(255,255,255,0.08);
}
.region-body.expanded { display: block; }

/* Resources as Cards (Deepest Level) */
.resource-list-mini {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.2rem;
    padding: 1.2rem;
}
.resource-card-mini {
    background: #1a1a2e; /* Solid dark for contrast */
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 1.2rem;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: all 0.2s;
    position: relative;
}
.resource-card-mini:hover {
    transform: translateY(-3px);
    border-color: var(--accent);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}
.resource-card-mini .res-name { font-weight: 600; font-size: 1rem; color: #fff; display: flex; align-items: center; gap: 8px;}
.resource-card-mini .res-kind { font-size: 0.75rem; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 1px; }

.btn-icon {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 5px;
    transition: color 0.2s;
}
.btn-icon:hover { color: #fff; }
.btn-icon.danger:hover { color: #ff4757; }


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

.provider-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    padding: 0.5rem 0;
}



/* Profile Dropdown */
.profile-dropdown {
    position: absolute;
    top: 60px;
    right: 20px;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 8px;
    min-width: 180px;
    z-index: 1000;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    display: none;
    flex-direction: column;
    animation: fadeIn 0.1s ease-out;
}

.profile-dropdown.active {
    display: flex !important;
}

.profile-dropdown a {
    color: var(--text-primary);
    text-decoration: none;
    padding: 10px 16px;
    border-radius: 8px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
}

.profile-dropdown a:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--accent);
}

.profile-dropdown i {
    width: 20px;
    text-align: center;
    opacity: 0.8;
}

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