/* GENERAL SETTINGS */

:root {
    --background: #0b1020;
    --surface: #141b2d;
    --surface-light: #1c2740;
    --purple: #8b5cf6;
    --purple-light: #a78bfa;
    --text: #f1f5f9;
    --muted: #94a3b8;
    --border: #29344d;
    --green: #22c55e;
    --red: #ef4444;
}

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

body {
    font-family: Arial, Helvetica, sans-serif;
    background: var(--background);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}

a {
    text-decoration: none;
    color: inherit;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: auto;
    min-height: 75vh;
}


/* NAVIGATION */

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 5%;
    background: #101729;
    border-bottom: 1px solid var(--border);
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    font-weight: bold;
}

.brand-icon {
    background: var(--purple);
    padding: 5px 9px;
    border-radius: 8px;
    font-size: 15px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 25px;
    color: var(--muted);
}

.nav-links a:hover {
    color: var(--purple-light);
}

.nav-form {
    display: inline;
}

.nav-logout {
    background: transparent;
    border: none;
    color: var(--muted);
    cursor: pointer;
    font-size: 15px;
}

.nav-logout:hover {
    color: var(--red);
}

.nav-register {
    background: var(--purple);
    color: white !important;
    padding: 9px 17px;
    border-radius: 7px;
}


/* BUTTONS */

.btn {
    display: inline-block;
    padding: 12px 22px;
    border-radius: 7px;
    font-weight: bold;
    cursor: pointer;
    border: none;
    font-size: 14px;
    text-align: center;
}

.btn-primary {
    background: var(--purple);
    color: white;
}

.btn-primary:hover {
    background: #7c3aed;
}

.btn-secondary {
    background: var(--surface-light);
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    border-color: var(--purple);
}

.full-width {
    width: 100%;
    margin-top: 12px;
}


/* HOMEPAGE HERO */

.hero {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    align-items: center;
    gap: 40px;
    padding: 90px 0;
}

.eyebrow {
    color: var(--purple-light);
    font-size: 12px;
    font-weight: bold;
    letter-spacing: 2px;
}

.hero h1 {
    font-size: clamp(38px, 5vw, 60px);
    line-height: 1.15;
    margin: 18px 0;
}

.hero h1 span {
    color: var(--purple-light);
}

.hero-content > p {
    color: var(--muted);
    max-width: 560px;
    margin-bottom: 30px;
}

.hero-buttons {
    display: flex;
    gap: 15px;
}

.hero-visual {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 25px;
    background: radial-gradient(circle, #30215b, #141b2d 70%);
    min-height: 300px;
    border-radius: 20px;
    border: 1px solid var(--border);
}

.shield {
    font-size: 100px;
}

.status-indicator {
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 12px 20px;
    border-radius: 30px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
}

.status-indicator strong {
    color: var(--green);
}

.status-dot {
    width: 9px;
    height: 9px;
    background: var(--green);
    border-radius: 50%;
}


/* FEATURES */

.features {
    padding: 45px 0 80px;
}

.section-heading {
    text-align: center;
    margin-bottom: 40px;
}

.section-heading h2 {
    font-size: 30px;
    margin: 12px 0;
}

.section-heading p {
    color: var(--muted);
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.feature-card {
    background: var(--surface);
    padding: 25px;
    border: 1px solid var(--border);
    border-radius: 12px;
}

.feature-card:hover {
    border-color: var(--purple);
    transform: translateY(-3px);
}

.feature-icon {
    font-size: 30px;
    margin-bottom: 15px;
}

.feature-card h3 {
    margin-bottom: 10px;
}

.feature-card p {
    color: var(--muted);
    font-size: 14px;
}


/* AUTHENTICATION */

.auth-wrapper {
    display: flex;
    justify-content: center;
    padding: 65px 15px;
}

.auth-card {
    background: var(--surface);
    border: 1px solid var(--border);
    width: 100%;
    max-width: 450px;
    padding: 35px;
    border-radius: 15px;
}

.auth-icon {
    font-size: 38px;
    margin-bottom: 12px;
}

.auth-card h1 {
    font-size: 30px;
    margin: 8px 0;
}

.auth-description {
    color: var(--muted);
    font-size: 14px;
    margin-bottom: 25px;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.auth-form label {
    font-size: 14px;
    font-weight: bold;
    margin-top: 8px;
}

.auth-form input {
    background: var(--background);
    border: 1px solid var(--border);
    padding: 13px;
    border-radius: 7px;
    color: white;
    outline: none;
}

.auth-form input:focus {
    border-color: var(--purple);
}

.auth-switch {
    color: var(--muted);
    text-align: center;
    margin-top: 25px;
    font-size: 14px;
}

.auth-switch a {
    color: var(--purple-light);
    font-weight: bold;
}


/* DASHBOARD HEADINGS */

.page-header {
    padding: 45px 0 30px;
}

.page-header h1 {
    font-size: 34px;
    margin: 8px 0;
}

.page-header p {
    color: var(--muted);
}


/* STATISTICS CARDS */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--surface);
    padding: 25px;
    border: 1px solid var(--border);
    border-radius: 12px;
}

.stat-icon {
    font-size: 25px;
}

.stat-card p {
    color: var(--muted);
    margin-top: 12px;
}

.stat-card h2 {
    font-size: 30px;
    margin: 5px 0;
}

.stat-card span {
    color: var(--muted);
    font-size: 12px;
}


/* CONTENT CARDS AND TABLES */

.content-card {
    background: var(--surface);
    padding: 25px;
    border: 1px solid var(--border);
    border-radius: 12px;
    margin-bottom: 30px;
}

.card-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    gap: 15px;
}

.card-heading p {
    color: var(--muted);
    font-size: 13px;
}

.text-link {
    color: var(--purple-light);
}

.count-badge {
    background: var(--surface-light);
    color: var(--purple-light);
    padding: 7px 12px;
    border-radius: 20px;
    font-size: 12px;
}

.table-wrapper {
    width: 100%;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

th, td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
}

th {
    color: var(--purple-light);
    font-size: 12px;
    text-transform: uppercase;
}

td {
    color: #d1d5db;
}

.empty-state {
    color: var(--muted);
    padding: 25px 0;
    text-align: center;
}


/* ALERTS */

.alert-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.security-alert {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    background: var(--background);
    border: 1px solid var(--border);
    padding: 20px;
    border-radius: 10px;
}

.alert-title-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.alert-details p {
    color: var(--muted);
    margin: 10px 0;
}

.alert-meta {
    display: flex;
    gap: 20px;
    color: var(--muted);
    font-size: 12px;
    flex-wrap: wrap;
}

.severity {
    padding: 4px 9px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: bold;
}

.severity.high {
    background: #451a1a;
    color: #fca5a5;
}

.severity.medium {
    background: #422006;
    color: #fcd34d;
}

.severity.low {
    background: #123524;
    color: #86efac;
}

.alert-status {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
}

.resolved-badge {
    color: var(--green);
    font-size: 12px;
    font-weight: bold;
}

.unresolved-badge {
    color: #f87171;
    font-size: 12px;
    font-weight: bold;
}


/* QUICK ACTIONS */

.quick-actions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 35px;
}

.action-card {
    background: var(--surface);
    padding: 22px;
    border: 1px solid var(--border);
    border-radius: 12px;
}

.action-card:hover {
    border-color: var(--purple);
}

.action-card span {
    font-size: 28px;
}

.action-card h3 {
    margin: 10px 0;
}

.action-card p {
    color: var(--muted);
    font-size: 13px;
}


/* USER ROLES */

.role-badge {
    background: var(--surface-light);
    color: var(--purple-light);
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 12px;
}

.role-badge.admin {
    color: #fcd34d;
}


/* FLASH MESSAGES */

.alert-message {
    padding: 13px 18px;
    border-radius: 8px;
    margin: 20px 0;
    font-size: 14px;
}

.alert-message.success {
    background: #123524;
    color: #86efac;
}

.alert-message.danger {
    background: #451a1a;
    color: #fca5a5;
}

.alert-message.warning {
    background: #422006;
    color: #fcd34d;
}


/* FOOTER */

footer {
    text-align: center;
    padding: 30px;
    color: var(--muted);
    font-size: 12px;
    border-top: 1px solid var(--border);
}


/* MOBILE RESPONSIVENESS */

@media (max-width: 900px) {
    .feature-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 650px) {
    .navbar {
        flex-direction: column;
        gap: 15px;
    }

    .nav-links {
        gap: 12px;
        flex-wrap: wrap;
        justify-content: center;
        font-size: 13px;
    }

    .stats-grid,
    .feature-grid,
    .quick-actions {
        grid-template-columns: 1fr;
    }

    .security-alert {
        flex-direction: column;
        align-items: flex-start;
    }

    .alert-status {
        align-items: flex-start;
    }

    .hero {
        padding: 50px 0;
    }

    .auth-card {
        padding: 25px;
    }

    .page-header h1 {
        font-size: 27px;
    }
}
