/* =========================================================================
   1. GLOBAL SYSTEM SETUP & FONTS
   ========================================================================= */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    width: 100vw;
    height: 100vh;
    background-color: #0b0f19; /* Deep space dark canvas background */
    /* SF Pro Core Targets with native system typography fallbacks */
    font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
}

/* Background Abstract Orbs (Accents the glass transparency) */
.bg-gradient {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    z-index: 1;
    opacity: 0.4;
}
.bg-blue {
    width: 400px;
    height: 400px;
    background: #3b82f6;
    top: -10%;
    left: 15%;
}
.bg-purple {
    width: 450px;
    height: 450px;
    background: #8b5cf6;
    bottom: -5%;
    right: 15%;
}

/* Authentic Frosted Glass Card Architecture */
.glass-card {
    position: relative;
    z-index: 10;
    width: 90%;
    max-width: 420px;
    padding: 40px 30px;
    border-radius: 24px;
    
    /* Transparent backing values */
    background: rgba(255, 255, 255, 0.06); 
    
    /* The system engine blur controls */
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    
    /* Fine-line bright inner border highlight */
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.card-header h1 {
    font-size: 1.8rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.5px;
    margin-bottom: 8px;
    text-align: center;
}

.card-header p {
    font-size: 0.95rem;
    color: #94a3b8;
    margin-bottom: 30px;
    text-align: center;
    line-height: 1.4;
}

/* =========================================================================
   2. FORM & INPUT COMPONENT DESIGNS
   ========================================================================= */
.input-group {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
}

.input-group label {
    font-size: 0.85rem;
    font-weight: 500;
    color: #cbd5e1;
    margin-bottom: 8px;
    letter-spacing: -0.1px;
}

.input-group input {
    width: 100%;
    padding: 14px 16px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #ffffff;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.2s ease;
    outline: none;
}

.input-group input:focus {
    background: rgba(255, 255, 255, 0.08);
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.primary-btn {
    width: 100%;
    padding: 14px;
    border-radius: 12px;
    background: #3b82f6; /* Apple style blue accent */
    color: #ffffff;
    border: none;
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.2s ease;
    margin-top: 10px;
}

.primary-btn:hover {
    background: #2563eb;
}

.switch-mode-text {
    font-size: 0.9rem;
    color: #94a3b8;
    text-align: center;
    margin-top: 20px;
}

.switch-mode-text span {
    color: #3b82f6;
    cursor: pointer;
    font-weight: 500;
}
.switch-mode-text span:hover {
    text-decoration: underline;
}

.error-banner {
    margin-top: 20px;
    padding: 12px;
    border-radius: 10px;
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5;
    font-size: 0.85rem;
    text-align: center;
}

/* =========================================================================
   3. PARENT DASHBOARD SPECIFIC DESIGNS
   ========================================================================= */
.dashboard-wrapper {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
}

/* Glass Select Custom Architecture */
.glass-select {
    width: 100%;
    padding: 14px 16px;
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #ffffff;
    font-size: 1rem;
    font-family: inherit;
    outline: none;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
}
.glass-select option {
    background: #0f172a;
    color: #fff;
}

/* Status Indicators */
.pill {
    position: absolute;
    top: 5px;
    right: 0;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
    text-transform: uppercase;
}
.status-connected {
    background: rgba(34, 197, 94, 0.15);
    border: 1px solid rgba(34, 197, 94, 0.4);
    color: #4ade80;
}

/* Panel Layout Matrix */
.control-panel h3 {
    font-size: 1.1rem;
    color: #f8fafc;
    margin-bottom: 18px;
    font-weight: 600;
}
.button-row {
    display: flex;
    gap: 12px;
    margin-top: 25px;
}
.action-btn {
    flex: 1;
    padding: 14px;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    border: none;
    transition: transform 0.1s ease;
}
.action-btn:active {
    transform: scale(0.98);
}
.lock-btn {
    background: #ef4444;
    color: white;
}
.unlock-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: white;
}
.status-banner {
    margin-top: 20px;
    padding: 12px;
    border-radius: 10px;
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: #93c5fd;
    font-size: 0.85rem;
    text-align: center;
}

.glass-divider {
    border: 0;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 25px 0 15px 0;
}

.footer-actions {
    display: flex;
    justify-content: space-between;
}
.text-link-btn {
    background: none;
    border: none;
    color: #94a3b8;
    font-family: inherit;
    font-size: 0.85rem;
    cursor: pointer;
}
.text-link-btn:hover {
    color: #ffffff;
    text-decoration: underline;
}
.danger-link {
    color: #fca5a5;
}
.danger-link:hover {
    color: #ef4444;
}
