:root {
    --primary: #00ff66;
    --primary-glow: rgba(0, 255, 102, 0.4);
    --bg-dark: #020504;
    --card-bg: rgba(5, 18, 12, 0.88);
    --border-color: rgba(0, 255, 102, 0.3);
}

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

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: var(--bg-dark);
    color: #ffffff;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    cursor: crosshair;
}

/* Live Matrix & Grid Movement Background */
.cyber-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-image: 
        linear-gradient(rgba(0, 255, 102, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 255, 102, 0.04) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: -3;
    pointer-events: none;
    animation: gridMove 20s linear infinite;
}

@keyframes gridMove {
    0% { background-position: 0 0; }
    100% { background-position: 50px 50px; }
}

/* Live Glowing Laser Animation Beam */
.laser-beam {
    position: fixed;
    top: 0;
    left: -100%;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    box-shadow: 0 0 15px var(--primary);
    z-index: -2;
    animation: laserScan 6s ease-in-out infinite;
}

@keyframes laserScan {
    0% { top: 0%; left: -100%; }
    50% { top: 100%; left: 100%; }
    100% { top: 0%; left: -100%; }
}

/* Fully Transparent Background Hacking Terminal */
#terminal-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    font-family: 'Fira Code', monospace;
    font-size: 13px;
    color: var(--primary);
    background: rgba(2, 5, 4, 0.88);
    padding: 40px;
    z-index: -1;
    overflow: hidden;
    white-space: pre-wrap;
    opacity: 0.25;
    pointer-events: none;
    line-height: 1.6;
}

/* Navigation Bar */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 8%;
    background: rgba(2, 5, 4, 0.75);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo {
    font-size: 22px;
    font-weight: 800;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.logo span {
    color: var(--primary);
    text-shadow: 0 0 15px var(--primary-glow);
}

/* Views (Pages container) & Smooth Animation */
.page-view {
    display: none;
    opacity: 0;
}

.page-view.active {
    display: block;
    animation: fadeIn 0.4s ease forwards;
}

@keyframes fadeIn {
    0% { opacity: 0; transform: translateY(10px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* Hero / Front Section with Split Layout */
.hero-login-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: calc(100vh - 85px);
    padding: 40px 8%;
    gap: 50px;
}

.hero-left {
    flex: 1;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 255, 102, 0.1);
    border: 1px solid var(--border-color);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--primary);
    margin-bottom: 20px;
    font-family: 'Fira Code', monospace;
    box-shadow: 0 0 10px rgba(0, 255, 102, 0.1);
}

.hero-left h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.15;
    background: linear-gradient(180deg, #ffffff 30%, #a0fca8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-left h1 span {
    background: linear-gradient(45deg, var(--primary), #00bfff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-left p {
    font-size: 1.05rem;
    color: #94a3b8;
    max-width: 550px;
    margin-bottom: 30px;
    line-height: 1.6;
}

.features-tags {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.tag {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 0.85rem;
    color: #cbd5e1;
    display: flex;
    align-items: center;
    gap: 6px;
}

.tag i {
    color: var(--primary);
}

/* Front Login Card */
.login-card {
    flex: 0 0 400px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 35px 30px;
    border-radius: 16px;
    backdrop-filter: blur(16px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5), 0 0 25px rgba(0, 255, 102, 0.1);
    position: relative;
    overflow: hidden;
}

.login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
}

.login-card h2 {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 10px;
}

.login-card h2 i {
    color: var(--primary);
}

.login-card p.subtitle {
    font-size: 0.85rem;
    color: #94a3b8;
    margin-bottom: 25px;
}

.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    font-size: 0.85rem;
    color: #cbd5e1;
    margin-bottom: 8px;
    font-weight: 500;
}

.input-with-icon {
    position: relative;
}

.input-with-icon i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
    font-size: 0.95rem;
}

.input-with-icon input {
    width: 100%;
    background: rgba(2, 5, 4, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 12px 15px 12px 42px;
    border-radius: 8px;
    color: #ffffff;
    font-size: 0.95rem;
    outline: none;
    transition: 0.3s;
}

.input-with-icon input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 12px var(--primary-glow);
}

.login-btn {
    width: 100%;
    padding: 12px;
    background: var(--primary);
    color: #020504;
    font-weight: 700;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.3s;
    font-size: 1rem;
    box-shadow: 0 0 20px var(--primary-glow);
    margin-top: 10px;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 30px rgba(0, 255, 102, 0.7);
}

.error-msg {
    color: #ff4d4d;
    font-size: 0.8rem;
    margin-top: 10px;
    text-align: center;
    display: none;
}

/* --- DASHBOARD STYLES --- */
.dashboard-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 8%;
    background: rgba(2, 5, 4, 0.95);
    border-bottom: 1px solid var(--border-color);
    backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 2000;
}

.profile-menu-container {
    position: relative;
}

.profile-circle {
    width: 44px;
    height: 44px;
    background: rgba(0, 255, 102, 0.15);
    border: 2px solid var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary);
    box-shadow: 0 0 12px var(--primary-glow);
    cursor: pointer;
    transition: 0.3s;
}

.profile-circle:hover {
    background: var(--primary);
    color: #020504;
    box-shadow: 0 0 20px var(--primary-glow);
}

.profile-dropdown {
    position: absolute;
    right: 0;
    top: 52px;
    width: 230px;
    background: #04120a;
    border: 1px solid var(--primary);
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.95), 0 0 20px rgba(0, 255, 102, 0.2);
    display: none;
    z-index: 99999;
}

.profile-dropdown.active {
    display: block !important;
    animation: fadeIn 0.3s ease forwards;
}

.dropdown-username {
    font-size: 1.05rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 6px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dropdown-role {
    font-size: 0.75rem;
    color: #94a3b8;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    gap: 6px;
}

.dropdown-logout-btn {
    width: 100%;
    background: #ff4d4d !important;
    color: #ffffff !important;
    border: none !important;
    padding: 10px 14px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: 0.3s;
    box-shadow: 0 0 15px rgba(255, 77, 77, 0.4);
}

.dropdown-logout-btn:hover {
    background: #ff1a1a !important;
    box-shadow: 0 0 22px rgba(255, 77, 77, 0.8);
}

.dashboard-container {
    max-width: 1100px;
    margin: 40px auto;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #ffffff;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    margin-bottom: 30px;
    transition: 0.3s;
}

.back-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.dash-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 40px 30px;
    border-radius: 16px;
    backdrop-filter: blur(12px);
    text-align: center;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.dash-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    opacity: 0;
    transition: 0.4s;
}

.dash-card:hover {
    border-color: var(--primary);
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0, 255, 102, 0.2);
}

.dash-card:hover::before {
    opacity: 1;
}

.dash-icon {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 20px;
    text-shadow: 0 0 15px var(--primary-glow);
}

.dash-card h3 {
    font-size: 1.5rem;
    margin-bottom: 12px;
    font-weight: 700;
    color: #ffffff;
}

.dash-card p {
    color: #94a3b8;
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 25px;
}

.dash-action-btn {
    background: rgba(0, 255, 102, 0.1);
    border: 1px solid var(--primary);
    color: var(--primary);
    padding: 10px 24px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: 0.3s;
}

.dash-card:hover .dash-action-btn {
    background: var(--primary);
    color: #020504;
    box-shadow: 0 0 15px var(--primary-glow);
}

.sub-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}

.sub-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    text-decoration: none;
    color: #ffffff;
    transition: 0.3s;
    display: block;
    position: relative;
    overflow: hidden;
}

.sub-card:hover {
    border-color: var(--primary);
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 255, 102, 0.2);
}

.sub-card h4 {
    font-size: 1.3rem;
    color: var(--primary);
    margin-bottom: 10px;
}

.sub-card p {
    color: #94a3b8;
    font-size: 0.85rem;
}

@media (max-width: 968px) {
    .hero-login-container {
        flex-direction: column;
        justify-content: center;
        text-align: center;
        padding: 40px 20px;
    }
    .hero-left h1 { font-size: 2.8rem; }
    .hero-left p { margin: 0 auto 30px auto; }
    .features-tags { justify-content: center; }
    .login-card { width: 100%; max-width: 420px; }
    .dashboard-topbar { padding: 15px 5%; }
    
    #terminal-bg {
        font-size: 10px;
        padding: 20px;
    }
}
