/* 🦾 RadarCore Auth - TACTICAL COMPACT v1.4 */
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700;900&family=Outfit:wght@300;400;600;900&display=swap');

:root {
    --rc-cyan: #00f2fe;
    --rc-bg: #03080c;
    --rc-glass: rgba(10, 20, 28, 0.8);
    --rc-border: rgba(0, 242, 254, 0.4);
}

.radarcore-auth-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000;
    background-image: 
        radial-gradient(circle at 50% 50%, rgba(0, 242, 254, 0.05), transparent),
        url('https://images.unsplash.com/photo-1451187580459-43490279c0fa?q=80&w=2072&auto=format&fit=crop');
    background-size: cover;
    background-position: center;
    z-index: 99999;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: 'Outfit', sans-serif;
    color: #fff;
    overflow: hidden; /* Evitiamo lo scroll della pagina intera */
}

.auth-container-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 440px; /* Più stretto */
    padding: 20px;
}

.auth-header-static {
    text-align: center;
    margin-bottom: 25px; /* Spazio ridotto */
}

.rc-logo {
    width: 75px;
    height: 75px;
    border: 2px solid var(--rc-cyan);
    border-radius: 50%;
    margin: 0 auto 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: 'Orbitron', sans-serif;
    font-size: 30px;
    color: var(--rc-cyan);
    box-shadow: 0 0 25px rgba(0, 242, 254, 0.5);
    position: relative;
    background: rgba(0, 242, 254, 0.05);
}

.rc-logo::after {
    content: '';
    position: absolute;
    width: 125%;
    height: 125%;
    border: 1px dashed var(--rc-cyan);
    border-radius: 50%;
    opacity: 0.4;
    animation: rc-spin 40s linear infinite;
}

@keyframes rc-spin { 100% { transform: rotate(360deg); } }

.auth-brand-name {
    font-family: 'Orbitron', sans-serif;
    font-size: 36px; /* Più piccolo */
    font-weight: 900;
    letter-spacing: 1.5px;
    color: #fff;
    margin-top: 5px;
}

.auth-card {
    width: 100%;
    background: var(--rc-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1.5px solid var(--rc-border);
    border-radius: 20px;
    padding: 35px 35px; /* Compattato */
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.8);
    box-sizing: border-box;
}

.sub-header-title {
    font-size: 22px; /* Compattato */
    font-weight: 700;
    color: var(--rc-cyan);
    text-align: center;
    margin-bottom: 30px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.auth-form-group {
    margin-bottom: 18px; /* Spazio ridotto */
    position: relative;
    width: 100%;
}

.auth-input-wrapper {
    position: relative;
    width: 100%;
}

.auth-input-wrapper i {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--rc-cyan);
    font-size: 18px;
    z-index: 5;
}

.auth-input {
    width: 100% !important;
    background: rgba(0, 0, 0, 0.3) !important;
    border: 1px solid rgba(0, 242, 254, 0.3) !important;
    border-radius: 12px !important;
    padding: 14px 18px 14px 55px !important; /* Meno padding */
    color: #fff !important;
    font-size: 14px !important;
    font-family: 'Outfit', sans-serif !important;
    outline: none !important;
    transition: all 0.3s !important;
    box-sizing: border-box !important;
    display: block !important;
}

.auth-input:focus {
    border-color: var(--rc-cyan) !important;
    box-shadow: 0 0 15px rgba(0, 242, 254, 0.2) !important;
}

.auth-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin: 20px 0;
    font-size: 13px;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #fff;
    cursor: pointer;
}

.forgot-pw {
    color: var(--rc-cyan);
    text-decoration: underline;
    cursor: pointer;
}

.auth-btn {
    width: 100%;
    background: var(--rc-cyan);
    color: #000;
    border: none;
    padding: 16px;
    border-radius: 10px;
    font-weight: 900;
    font-size: 15px;
    cursor: pointer;
    text-transform: uppercase;
    box-shadow: 0 0 25px rgba(0, 242, 254, 0.3);
    transition: all 0.3s;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.auth-btn:hover {
    transform: scale(1.02);
}

.auth-footer {
    text-align: center;
    margin-top: 25px;
    font-size: 13px;
    color: #94a3b8;
}

.auth-link {
    color: var(--rc-cyan);
    font-weight: 900;
    cursor: pointer;
    margin-left: 5px;
    text-transform: uppercase;
}

.auth-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.full-width { grid-column: span 2; }

/* 👤 PROFILE PANEL - COMPACT POPOVER (Step 4 Refined) */
.rc-profile-overlay {
    position: fixed;
    top: 75px; /* Giusto sotto l'header */
    right: 20px;
    width: 280px; /* Molto più stretto */
    height: auto; /* Altezza dinamica */
    max-height: 80vh;
    background: rgba(10, 20, 28, 0.95);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid var(--rc-cyan);
    z-index: 100000;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    padding: 20px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.8);
    color: #fff;
    border-radius: 15px;
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
    pointer-events: none;
}

.rc-profile-overlay.active {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: all;
}

.profile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(0, 242, 254, 0.1);
    padding-bottom: 10px;
}

.profile-header h2 {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.9rem;
    color: var(--rc-cyan);
    margin: 0;
    letter-spacing: 1px;
    font-weight: 900;
}

.close-profile {
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s;
}

.profile-section {
    width: 100%;
}

.data-group {
    margin-bottom: 12px;
    background: rgba(255, 255, 255, 0.02);
    padding: 8px 12px;
    border-radius: 10px;
    border: 1px solid rgba(0, 242, 254, 0.05);
}

.data-label {
    display: block;
    font-size: 0.6rem;
    color: #94a3b8;
    text-transform: uppercase;
    margin-bottom: 2px;
    letter-spacing: 1px;
}

.data-value {
    display: block;
    font-size: 0.85rem;
    color: #fff;
    font-weight: 500;
}

.profile-actions {
    margin-top: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.action-btn {
    width: 100%;
    padding: 10px;
    border-radius: 8px;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.7rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-logout {
    background: rgba(0, 242, 254, 0.05);
    border: 1px solid var(--rc-cyan);
    color: var(--rc-cyan);
}

.btn-delete {
    background: rgba(244, 63, 94, 0.05);
    border: 1px solid #f43f5e;
    color: #f43f5e;
    font-size: 0.65rem;
}

/* 👑 MASTER COMMAND CENTER (Step 5) */
/* 🏰 MASTER COMMAND - FULL SCREEN WAR ROOM (Step 8 Upgrade) */
.rc-master-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(circle at center, #0f172a 0%, #020617 100%);
    z-index: 999999;
    display: none;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.rc-master-overlay.active {
    display: flex;
    opacity: 1;
}

.master-card {
    width: 95%;
    max-width: 1400px;
    height: 90vh;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(25px);
    border: 1px solid rgba(245, 158, 11, 0.2);
    border-radius: 24px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 0 80px rgba(0, 0, 0, 0.8), 0 0 20px rgba(245, 158, 11, 0.1);
    overflow: hidden;
    position: relative;
    animation: masterEnter 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.master-header {
    padding: 30px 40px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(to right, rgba(245, 158, 11, 0.05), transparent);
}

.master-header h2 {
    font-family: 'Orbitron', sans-serif;
    color: #f59e0b;
    margin: 0;
    letter-spacing: 3px;
    font-size: 1.8rem;
    font-weight: 900;
    text-shadow: 0 0 15px rgba(245, 158, 11, 0.4);
}

.master-list-container {
    flex: 1;
    overflow-y: auto;
    padding: 30px 40px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(420px, 1fr));
    gap: 25px;
    align-content: start;
}

/* 👤 USER ROW (Step 8 War Room Refinement) */
.user-row {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 25px;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 20px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.user-row:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(245, 158, 11, 0.4);
    transform: translateY(-4px) scale(1.01);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.user-info-cell {
    display: flex;
    flex-direction: column;
}

.user-info-label {
    font-size: 0.65rem;
    color: #94a3b8;
    text-transform: uppercase;
    margin-bottom: 2px;
}

.user-info-val {
    font-size: 0.9rem;
    color: #fff;
    font-weight: 600;
}

.row-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.mini-btn {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    border: 1px solid transparent;
    font-size: 1.1rem;
}

.btn-approve-mini {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
    border-color: rgba(34, 197, 94, 0.3);
}

.btn-approve-mini:hover {
    background: #22c55e;
    color: #fff;
    box-shadow: 0 0 15px rgba(34, 197, 94, 0.4);
}

.btn-reject-mini {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.3);
}

.btn-reject-mini:hover {
    background: #ef4444;
    color: #fff;
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.4);
}

/* Bottone per il Master nel Profilo */
.btn-master-panel {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
    border: none !important;
    color: #000 !important;
    font-weight: 900 !important;
    margin-top: 5px !important;
}

.btn-master-panel:hover {
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.5) !important;
    transform: scale(1.02);
}

.empty-master-state {
    text-align: center;
    padding: 40px;
    color: #94a3b8;
    font-style: italic;
    grid-column: span 4;
}

/* 💳 SUBSCRIPTION BADGES & DATE PICKERS (Step 8) */
.plan-badge {
    padding: 1px 5px;
    border-radius: 3px;
    font-size: 0.55rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    display: inline-block;
    vertical-align: middle;
    margin-left: 5px;
}

.plan-free { background: rgba(148, 163, 184, 0.2); color: #94a3b8; border: 1px solid rgba(148, 163, 184, 0.4); }
.plan-pro { background: rgba(0, 242, 254, 0.15); color: var(--rc-cyan); border: 1px solid var(--rc-cyan); }
.plan-master { background: rgba(245, 158, 11, 0.15); color: #f59e0b; border: 1px solid #f59e0b; }

.date-input-mini {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    font-family: 'Outfit', sans-serif;
    font-size: 0.8rem;
    padding: 5px;
    border-radius: 6px;
    outline: none;
    width: 140px;
}

.date-input-mini:focus {
    border-color: var(--rc-cyan);
    background: rgba(0, 242, 254, 0.05);
}

.plan-select-mini {
    background: #0f172a !important;
    border: 1px solid rgba(245, 158, 11, 0.3) !important;
    color: #f59e0b !important;
    padding: 5px !important;
    border-radius: 6px !important;
    font-size: 0.8rem !important;
    cursor: pointer !important;
    font-weight: 900 !important;
    outline: none !important;
}

/* OVERLAY SCADENZA (Tactical Block) */
.auth-msg-box.expired {
    border-color: #ef4444;
    background: rgba(239, 68, 68, 0.05);
}

.auth-msg-box.expired .msg-icon { color: #ef4444; }

.user-license-info {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.7rem;
    color: #64748b;
    line-height: 1.4;
    text-align: center;
}

.user-license-info b { 
    color: var(--rc-cyan); 
    font-size: 0.7rem;
    font-weight: 700;
}

/* 🛡️ PERMISSIONS SYSTEM - WAR ROOM SWITCHES (Step 9) */
.permissions-container {
    margin-top: 15px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.perm-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.65rem;
    color: #f59e0b;
    letter-spacing: 2px;
    margin-bottom: 15px;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 8px;
}

.perm-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.perm-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.02);
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.03);
    transition: all 0.3s;
}

.perm-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.perm-label {
    font-size: 0.65rem;
    color: #94a3b8;
    text-transform: uppercase;
    font-weight: 600;
}

/* 🦾 NEON SWITCH UI */
.rc-switch {
    width: 34px;
    height: 18px;
    position: relative;
    cursor: pointer;
}

.rc-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.rc-slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(255, 255, 255, 0.1);
    transition: .4s;
    border-radius: 18px;
}

.rc-slider:before {
    position: absolute;
    content: "";
    height: 12px;
    width: 12px;
    left: 3px;
    bottom: 3px;
    background-color: #64748b;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .rc-slider {
    background-color: rgba(245, 158, 11, 0.2);
}

input:checked + .rc-slider:before {
    transform: translateX(16px);
    background-color: #f59e0b;
    box-shadow: 0 0 8px rgba(245, 158, 11, 0.8);
}
