/* ==========================================================================
   DESIGN SYSTEM & VARIABLES
   ========================================================================== */
:root {
    --bg-darker: #09090b;
    --bg-dark: #121214;
    --panel-bg: rgba(255, 255, 255, 0.03);
    --panel-border: rgba(255, 255, 255, 0.08);
    --panel-border-focus: rgba(212, 175, 55, 0.35);
    
    --text-primary: #f4f4f5;
    --text-secondary: #a1a1aa;
    --text-muted: #71717a;
    
    --gold: #d4af37;
    --gold-light: #ffd700;
    --gold-dark: #aa860b;
    --gold-gradient: linear-gradient(135deg, #ffd700 0%, #d4af37 50%, #aa860b 100%);
    
    --silver: #cbd5e1;
    --silver-dark: #64748b;
    --silver-gradient: linear-gradient(135deg, #ffffff 0%, #cbd5e1 50%, #64748b 100%);
    
    --accent-red: #ef4444;
    --accent-pink: #ec4899;
    --accent-blue: #3b82f6;
    --accent-green: #22c55e;
    --accent-warning: #f59e0b;
    
    --font-sans: 'Outfit', sans-serif;
    --font-heading: 'Cinzel', serif;
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    
    --shadow-glow: 0 0 20px rgba(212, 175, 55, 0.15);
    --shadow-panel: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

/* ==========================================================================
   RESET & GLOBAL STYLES
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

/* Background Ambient Glows */
.bg-glow {
    position: fixed;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    filter: blur(180px);
    z-index: -1;
    opacity: 0.12;
    pointer-events: none;
}
.bg-glow-1 {
    top: -200px;
    right: -100px;
    background: radial-gradient(circle, var(--gold) 0%, transparent 70%);
}
.bg-glow-2 {
    bottom: -200px;
    left: -200px;
    background: radial-gradient(circle, var(--silver-dark) 0%, transparent 70%);
}

.app-container {
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
    padding: 20px;
}

/* ==========================================================================
   APP HEADER — PREMIUM REDESIGN
   ========================================================================== */
.app-header {
    position: relative;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 24px;
    padding: 18px 28px;
    margin-bottom: 30px;
    background: linear-gradient(135deg,
        rgba(20, 20, 22, 0.98) 0%,
        rgba(16, 16, 18, 0.95) 100%);
    border: 1px solid rgba(212, 175, 55, 0.15);
    border-top: 1px solid rgba(212, 175, 55, 0.3);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    box-shadow:
        0 4px 6px -1px rgba(0, 0, 0, 0.4),
        0 20px 60px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
    overflow: hidden;
}

/* Top gold accent line */
.app-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 5%;
    width: 90%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.6), rgba(255, 215, 0, 0.8), rgba(212, 175, 55, 0.6), transparent);
    border-radius: 1px;
}

/* Subtle ambient glow behind header */
.app-header::after {
    content: '';
    position: absolute;
    top: -40px;
    right: 10%;
    width: 300px;
    height: 120px;
    background: radial-gradient(ellipse, rgba(212, 175, 55, 0.07) 0%, transparent 70%);
    pointer-events: none;
}

/* ---- Brand (Left) ---- */
.header-brand {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
}

.brand-logo-wrap {
    position: relative;
    flex-shrink: 0;
    width: 56px;
    height: 56px;
}

.brand-icon-ring {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.15) 0%, rgba(212, 175, 55, 0.05) 100%);
    border: 1px solid rgba(212, 175, 55, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
    transition: all 0.4s ease;
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.08), inset 0 1px 0 rgba(255,255,255,0.06);
}

.brand-icon-ring:hover {
    border-color: rgba(212, 175, 55, 0.5);
    box-shadow: 0 0 30px rgba(212, 175, 55, 0.2), inset 0 1px 0 rgba(255,255,255,0.08);
    transform: rotate(8deg) scale(1.05);
}

.brand-icon {
    font-size: 1.7rem;
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 8px rgba(212, 175, 55, 0.4));
}

.brand-pulse {
    position: absolute;
    inset: -4px;
    border-radius: 18px;
    border: 1px solid rgba(212, 175, 55, 0.2);
    animation: headerPulse 3s ease-in-out infinite;
    pointer-events: none;
}

@keyframes headerPulse {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.03); }
}

.brand-text {
    min-width: 0;
}

.brand-title-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.brand-name {
    font-family: var(--font-heading);
    font-size: 1.55rem;
    font-weight: 700;
    letter-spacing: 3px;
    color: var(--text-primary);
    line-height: 1;
    white-space: nowrap;
}

.brand-name-accent {
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.brand-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    font-size: 0.6rem;
    font-weight: 800;
    letter-spacing: 2px;
    color: var(--gold);
    border: 1px solid rgba(212, 175, 55, 0.4);
    border-radius: 4px;
    background: rgba(212, 175, 55, 0.08);
    font-family: var(--font-sans);
    vertical-align: middle;
    margin-top: -2px;
}

.brand-subtitle {
    font-size: 0.72rem;
    color: var(--text-muted);
    letter-spacing: 2.5px;
    text-transform: uppercase;
    margin-top: 4px;
    font-weight: 400;
}

/* ---- Center Status ---- */
.header-center {
    display: flex;
    justify-content: center;
    align-items: center;
}

.header-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    background: rgba(34, 197, 94, 0.06);
    border: 1px solid rgba(34, 197, 94, 0.2);
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 500;
    color: #4ade80;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 8px rgba(34, 197, 94, 0.8);
    animation: statusBlink 2s ease-in-out infinite;
}

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

/* ---- Controls (Right) ---- */
.header-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

/* Import button */
.hdr-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 18px;
    font-family: var(--font-sans);
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
}

.hdr-btn-import {
    background: rgba(212, 175, 55, 0.1);
    color: var(--gold);
    border: 1px solid rgba(212, 175, 55, 0.25);
}

.hdr-btn-import:hover {
    background: rgba(212, 175, 55, 0.18);
    border-color: rgba(212, 175, 55, 0.5);
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.15);
    transform: translateY(-1px);
}

.hdr-btn-import i {
    font-size: 0.85rem;
}

/* Language selector */
.hdr-select-wrap {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    transition: all 0.25s ease;
    cursor: pointer;
}

.hdr-select-wrap:hover,
.hdr-select-wrap:focus-within {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(212, 175, 55, 0.3);
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.06);
}

.hdr-select-icon {
    font-size: 0.8rem;
    color: var(--gold);
    flex-shrink: 0;
}

.hdr-select {
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    padding-right: 6px;
    min-width: 70px;
    appearance: none;
    -webkit-appearance: none;
}

.hdr-select option {
    background: #18181b;
    color: var(--text-primary);
}

.hdr-select-arrow {
    font-size: 0.65rem;
    color: var(--text-muted);
    pointer-events: none;
    flex-shrink: 0;
}

/* API Key input */
.hdr-api-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    width: 190px;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.hdr-api-wrap:focus-within {
    width: 260px;
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(212, 175, 55, 0.4);
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.12);
}

.hdr-api-icon {
    font-size: 0.8rem;
    color: var(--gold);
    flex-shrink: 0;
}

.hdr-api-input {
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-family: monospace;
    font-size: 0.85rem;
    width: 100%;
    min-width: 0;
}

.hdr-api-input::placeholder {
    color: var(--text-muted);
    font-family: var(--font-sans);
}

.hdr-api-indicator {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--text-muted);
    flex-shrink: 0;
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

.hdr-api-indicator.has-key {
    background: #22c55e;
    box-shadow: 0 0 8px rgba(34, 197, 94, 0.6);
}

/* Divider between controls */
.hdr-divider {
    width: 1px;
    height: 32px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 1px;
}

/* Responsive collapse */
@media (max-width: 900px) {
    .app-header {
        grid-template-columns: 1fr auto;
        grid-template-rows: auto auto;
    }
    .header-center { display: none; }
    .header-controls { grid-column: 1 / -1; justify-content: flex-start; flex-wrap: wrap; }
}

@media (max-width: 600px) {
    .brand-name { font-size: 1.1rem; letter-spacing: 2px; }
    .brand-subtitle { display: none; }
    .hdr-api-wrap { width: 150px; }
    .hdr-api-wrap:focus-within { width: 200px; }
}


/* ==========================================================================
   DASHBOARD GRID LAYOUT
   ========================================================================== */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 25px;
    align-items: start;
}

@media (max-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

.form-area {
    display: flex;
    flex-direction: column;
    gap: 25px;
}
.sidebar-area {
    display: flex;
    flex-direction: column;
    gap: 25px;
    position: sticky;
    top: 20px;
}

/* Glassmorphism Panel base */
.glass-panel {
    background: var(--panel-bg);
    border: 1px solid var(--panel-border);
    backdrop-filter: blur(12px);
    border-radius: 16px;
    box-shadow: var(--shadow-panel);
    transition: var(--transition-smooth);
}
.glass-panel:hover {
    border-color: rgba(255, 255, 255, 0.12);
}

.form-card, .action-card, .deploy-card {
    padding: 25px;
}

.card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--panel-border);
    padding-bottom: 15px;
}
.card-header i {
    font-size: 1.4rem;
}
.card-header h2 {
    font-family: var(--font-sans);
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.card-desc {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 20px;
}

/* ==========================================================================
   FORM CONTROLS
   ========================================================================== */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 15px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 15px;
}
.form-group.full-width {
    grid-column: 1 / -1;
}

label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
}

input[type="text"],
input[type="email"],
input[type="number"],
input[type="url"],
input[type="password"],
textarea {
    background-color: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--panel-border);
    border-radius: 8px;
    padding: 10px 14px;
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 0.95rem;
    transition: var(--transition-smooth);
    width: 100%;
}
input:focus, textarea:focus {
    border-color: var(--panel-border-focus);
    background-color: rgba(0, 0, 0, 0.4);
    outline: none;
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.1);
}

.input-with-icon {
    position: relative;
    display: flex;
    align-items: center;
}
.input-with-icon i {
    position: absolute;
    left: 14px;
    font-size: 1.1rem;
}
.input-with-icon input {
    padding-left: 40px;
}

.divider {
    height: 1px;
    background: var(--panel-border);
    margin: 25px 0;
}

h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--text-primary);
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 10px 22px;
    border-radius: 8px;
    font-family: var(--font-sans);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: var(--transition-smooth);
    text-decoration: none;
}
.btn-full {
    width: 100%;
}
.btn-large {
    padding: 15px 30px;
    font-size: 1.05rem;
}

.btn-primary {
    background: var(--gold-gradient);
    color: #000;
    text-shadow: 0 0 2px rgba(255,255,255,0.3);
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.2);
}
.btn-primary:hover {
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.35);
    transform: translateY(-2px);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border: 1px solid var(--panel-border);
}
.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-1px);
}

.btn-warning {
    background: var(--accent-warning);
    color: #000;
}
.btn-warning:hover:not(:disabled) {
    background: #ffb703;
    transform: translateY(-2px);
}
.btn-warning:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.btn-success {
    background: var(--accent-green);
    color: #fff;
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.2);
}
.btn-success:hover {
    background: #16a34a;
    transform: translateY(-2px);
}

/* ==========================================================================
   TABS SYSTEM
   ========================================================================== */
.tab-buttons {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--panel-border);
    padding-bottom: 10px;
}
.inline-tabs {
    margin-top: 10px;
    border-bottom: none;
    padding-bottom: 0;
}
.tab-btn {
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-secondary);
    padding: 8px 16px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    border-radius: 6px;
    transition: var(--transition-smooth);
}
.tab-btn:hover {
    color: var(--text-primary);
    background: rgba(255,255,255,0.02);
}
.tab-btn.active {
    color: var(--gold);
    background: rgba(212, 175, 55, 0.08);
}
.tab-content {
    display: none;
}
.tab-content.active {
    display: block;
}
.tab-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 15px;
}

/* ==========================================================================
   FILE DROP ZONES
   ========================================================================== */
.drop-zone {
    border: 2px dashed var(--panel-border);
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    background: rgba(0, 0, 0, 0.15);
    cursor: pointer;
    transition: var(--transition-smooth);
}
.drop-zone:hover, .drop-zone.drag-over {
    border-color: var(--gold);
    background: rgba(212, 175, 55, 0.03);
}
.drop-icon {
    font-size: 2.2rem;
    color: var(--text-muted);
    margin-bottom: 10px;
    transition: var(--transition-smooth);
}
.drop-zone:hover .drop-icon {
    color: var(--gold);
    transform: translateY(-3px);
}
.drop-zone p {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.file-preview-info {
    margin-top: 10px;
    font-size: 0.85rem;
    color: var(--accent-green);
    font-weight: 500;
}

/* Hero & Photos fields Grid */
.files-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 15px;
}
.file-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.file-field label {
    font-size: 0.8rem;
    color: var(--text-muted);
}
.mini-drop-zone {
    border: 1px dashed var(--panel-border);
    border-radius: 8px;
    padding: 15px 10px;
    text-align: center;
    background: rgba(0, 0, 0, 0.2);
    cursor: pointer;
    font-size: 0.8rem;
    color: var(--text-secondary);
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    justify-content: center;
}
.mini-drop-zone:hover, .mini-drop-zone.selected {
    border-color: var(--gold);
    background: rgba(212, 175, 55, 0.05);
    color: var(--text-primary);
}
.mini-drop-zone.selected {
    border-style: solid;
    border-color: var(--accent-green);
    color: var(--accent-green);
    background: rgba(34, 197, 94, 0.05);
}

.btn-fix-member-photo {
    padding: 6px 12px !important;
    font-size: 0.75rem !important;
    border-radius: 20px !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: 1px solid rgba(212, 175, 55, 0.3) !important;
    background: rgba(212, 175, 55, 0.02) !important;
    color: var(--text-primary) !important;
    transition: var(--transition-smooth);
    width: 100%;
    margin-top: 5px;
    cursor: pointer;
}
.btn-fix-member-photo:hover {
    background: rgba(212, 175, 55, 0.1) !important;
    border-color: var(--gold) !important;
    transform: translateY(-1px);
}
.btn-fix-member-photo:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* ==========================================================================
   AI OUTPUT BLOCKS
   ========================================================================== */
.ai-output-box {
    margin-top: 20px;
    background: rgba(212, 175, 55, 0.02);
    border: 1px solid rgba(212, 175, 55, 0.15);
    border-radius: 12px;
    padding: 20px;
    animation: slideDown 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.ai-box-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(212, 175, 55, 0.1);
}
.ai-box-title h4 {
    font-size: 0.95rem;
    font-weight: 600;
}

.logo-preview-box {
    margin-top: 20px;
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid var(--panel-border);
    border-radius: 12px;
    padding: 20px;
    animation: slideDown 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.logo-preview-box h5 {
    font-size: 0.9rem;
    margin-bottom: 12px;
    color: var(--text-secondary);
}
.logo-svg-render {
    width: 200px;
    height: 200px;
    margin: 0 auto 20px auto;
    background: radial-gradient(circle, #27272a 0%, #09090b 100%);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5), var(--shadow-glow);
}
.logo-svg-render svg {
    width: 100%;
    height: 100%;
    max-width: 180px;
    max-height: 180px;
}

/* ==========================================================================
   SIDEBAR RESULTS & DEPLOYMENT
   ========================================================================== */
.build-result {
    margin-top: 20px;
    animation: slideDown 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.success-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #4ade80;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
    margin-bottom: 15px;
    font-weight: 500;
}
.success-banner i {
    font-size: 1.2rem;
}
.zip-info {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 10px;
    text-align: center;
}

.deploy-progress {
    margin-top: 20px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--panel-border);
    border-radius: 10px;
    padding: 15px;
}
.progress-steps {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.step-line {
    font-size: 0.85rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 10px;
}
.step-line::before {
    content: "○";
    font-weight: 700;
}
.step-line.active {
    color: var(--accent-warning);
}
.step-line.active::before {
    content: "●";
    animation: pulse 1s infinite alternate;
}
.step-line.done {
    color: var(--accent-green);
}
.step-line.done::before {
    content: "✓";
}

.live-link {
    color: var(--gold-light);
    text-decoration: underline;
    font-size: 0.85rem;
    margin-top: 4px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

/* ==========================================================================
   TOASTS & OVERLAY
   ========================================================================== */
.toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: rgba(18, 18, 20, 0.9);
    border: 1px solid var(--gold);
    color: var(--text-primary);
    padding: 12px 24px;
    border-radius: 10px;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), var(--shadow-glow);
    animation: slideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
}
.toast-icon {
    font-size: 1.2rem;
    color: var(--gold);
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(9, 9, 11, 0.85);
    backdrop-filter: blur(8px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
}
.loader-box {
    background: var(--bg-dark);
    border: 1px solid var(--panel-border);
    padding: 40px;
    border-radius: 16px;
    text-align: center;
    box-shadow: var(--shadow-panel);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    max-width: 300px;
    width: 100%;
}
.spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(212, 175, 55, 0.1);
    border-top-color: var(--gold);
    border-radius: 50%;
    animation: spin 1s infinite linear;
}
.loader-box p {
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text-secondary);
}

/* ==========================================================================
   ANIMATIONS & UTILITIES
   ========================================================================== */
.hidden {
    display: none !important;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}
@keyframes pulse {
    from { opacity: 0.5; }
    to { opacity: 1; }
}
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}
.text-gold {
    color: var(--gold);
}
.text-silver {
    color: var(--silver);
}
.text-pink { color: var(--accent-pink); }
.text-red { color: var(--accent-red); }
.text-blue { color: var(--accent-blue); }
.text-white { color: #fff; }

/* ==========================================================================
   MAIN APP TABS REDESIGN & DROPDOWN STYLES
   ========================================================================== */
.main-dashboard-container {
    max-width: 1100px;
    margin: 0 auto;
}

.main-tabs {
    display: flex;
    justify-content: space-around;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--panel-border);
    padding: 8px;
    border-radius: 12px;
    margin-bottom: 30px;
    backdrop-filter: blur(12px);
    box-shadow: var(--shadow-panel);
}

.main-tabs .tab-btn {
    flex: 1;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 8px;
    color: var(--text-secondary);
    transition: var(--transition-smooth);
    background: transparent;
    cursor: pointer;
    border: none;
    outline: none;
}

.main-tabs .tab-btn i {
    font-size: 1.1rem;
    transition: var(--transition-smooth);
}

.main-tabs .tab-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.04);
}

.main-tabs .tab-btn:hover i {
    transform: scale(1.1);
}

.main-tabs .tab-btn.active {
    color: #000;
    background: var(--gold-gradient);
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.2);
}

.main-tabs .tab-btn.active i {
    color: #000 !important;
}

/* Custom select and option elements globally to fix white-on-white on Windows/Chrome */
select {
    background-color: #121214 !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--panel-border);
    border-radius: 8px;
    padding: 10px 14px;
    font-family: var(--font-sans);
    font-size: 0.95rem;
    transition: var(--transition-smooth);
    width: 100%;
    outline: none;
}

select:focus {
    border-color: var(--panel-border-focus);
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.1);
}

select option {
    background-color: #121214 !important;
    color: var(--text-primary) !important;
    font-family: var(--font-sans);
    font-size: 0.95rem;
    padding: 10px;
}

/* Responsiveness for main tabs */
@media (max-width: 768px) {
    .main-tabs {
        flex-direction: column;
        gap: 8px;
    }
    .main-tabs .tab-btn {
        width: 100%;
    }
}

/* ==========================================================================
   LAYOUT REFRESH 2.0 — full-width raspored + suptilno osvežavanje (ista tema)
   ========================================================================== */

/* 1) Iskoristi celu širinu ekrana (nestaje prazan prostor sa strane) */
.app-container {
    max-width: 1860px;
    padding: 28px clamp(20px, 4vw, 56px);
}
.main-dashboard-container {
    max-width: 100%;
}

/* 2) Tab navigacija — lepša, lepljiva na vrhu i prozračnija */
.main-tabs {
    position: sticky;
    top: 14px;
    z-index: 60;
    gap: 6px;
    padding: 10px;
    margin-bottom: 34px;
    background: linear-gradient(180deg, rgba(20,20,23,0.92), rgba(16,16,18,0.88));
    border-color: rgba(255,255,255,0.10);
    box-shadow: 0 10px 30px rgba(0,0,0,0.45);
}
.main-tabs .tab-btn {
    border-radius: 10px;
    padding: 13px 14px;
    transition: var(--transition-smooth);
}
.main-tabs .tab-btn:not(.active):hover {
    background: rgba(255,255,255,0.05);
}

/* 3) Kartice — više vazduha, suptilni „lift" i zlatni akcenat na vrhu */
.form-card, .action-card, .deploy-card {
    padding: 30px 34px;
    position: relative;
    overflow: hidden;
}
.glass-panel {
    transition: transform .35s cubic-bezier(.2,.7,.3,1), border-color .3s, box-shadow .3s;
}
.glass-panel:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 40px rgba(0,0,0,0.45);
}
.form-card::before, .action-card::before, .deploy-card::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: var(--gold-gradient);
    opacity: 0;
    transition: opacity .35s ease;
}
.form-card:hover::before, .action-card:hover::before, .deploy-card:hover::before {
    opacity: .8;
}

/* 4) Naslovi kartica malo izraženiji */
.card-header { margin-bottom: 22px; padding-bottom: 16px; }
.card-header h2 { font-size: 1.32rem; letter-spacing: 0.4px; }

/* 5) Forme — širi, prozračniji raspored koji koristi punu širinu */
.form-grid {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px 22px;
}
.form-group { margin-bottom: 18px; }

/* 6) Čitljivost na širokom ekranu — opisi/pasusi se ne razvlače predaleko */
.tab-desc, .card-desc { max-width: 820px; }

/* 7) Razmaci između sekcija/kartica unutar taba */
.tab-content > section,
.tab-content > .glass-panel,
.tab-content > .form-card {
    margin-bottom: 24px;
}

/* 8) Lepša traka za skrolovanje (suptilno, u tonu teme) */
* { scrollbar-width: thin; scrollbar-color: rgba(212,175,55,0.35) transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb { background: rgba(212,175,55,0.30); border-radius: 8px; }
*::-webkit-scrollbar-thumb:hover { background: rgba(212,175,55,0.55); }

/* 9) Na vrlo širokim ekranima — još malo vazduha */
@media (min-width: 1700px) {
    .form-card, .action-card, .deploy-card { padding: 34px 40px; }
    .card-header h2 { font-size: 1.4rem; }
}

/* 10) Telefon/tablet — vrati uobičajene margine i isključi sticky */
@media (max-width: 900px) {
    .app-container { padding: 18px 16px; }
    .main-tabs { position: static; }
    .form-card, .action-card, .deploy-card { padding: 22px 18px; }
}
