* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Segoe UI", Arial, sans-serif;
}

body {
    background: #0f172a;
    color: #f8fafc;
}

.container {
    width: 90%;
    max-width: 1100px;
    margin: 40px auto;
}


/* =======================================================
   Header
   ======================================================= */

header {
    text-align: center;
    margin-bottom: 40px;
}

header h1 {
    font-size: 3rem;
    color: #38bdf8;
    margin-bottom: 10px;
}

header p {
    color: #94a3b8;
    font-size: 1.2rem;
}

.logo {
    width: 150px;
    height: auto;
    display: block;
    margin: 0 auto 20px auto;
    transition: transform 0.2s ease;
}

.logo:hover {
    transform: scale(1.05);
}

.home-link {
    text-decoration: none;
    color: inherit;
}


/* =======================================================
   Main Cards
   ======================================================= */

.card {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, .35);
}

.card h2 {
    color: #38bdf8;
    margin-bottom: 12px;
}

.card h3 {
    color: #f8fafc;
    margin-bottom: 10px;
}

.card p {
    color: #cbd5e1;
    line-height: 1.6;
    margin-bottom: 20px;
}


/* =======================================================
   Section Headings
   ======================================================= */

.section-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 18px;
}

.eyebrow {
    color: #94a3b8 !important;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 1.4px;
    margin-bottom: 6px !important;
}


/* =======================================================
   Security Status
   ======================================================= */

.status-card {
    border-left: 5px solid #38bdf8;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 105px;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-loading {
    background: #334155;
    color: #cbd5e1;
}

.status-good {
    background: rgba(34, 197, 94, 0.15);
    border: 1px solid #22c55e;
    color: #86efac;
}

.status-warning {
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid #f59e0b;
    color: #fcd34d;
}

.status-danger {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid #ef4444;
    color: #fca5a5;
}


/* =======================================================
   Latest Event
   ======================================================= */

.latest-event-card {
    position: relative;
}

.risk-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 85px;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
}

.risk-low {
    background: rgba(34, 197, 94, 0.15);
    border: 1px solid #22c55e;
    color: #86efac;
}

.risk-medium {
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid #f59e0b;
    color: #fcd34d;
}

.risk-high {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid #ef4444;
    color: #fca5a5;
}

.risk-unknown {
    background: #334155;
    color: #cbd5e1;
}

.event-details {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.event-detail {
    background: #0f172a;
    border: 1px solid #334155;
    border-radius: 8px;
    padding: 14px;
}

.detail-label {
    display: block;
    color: #94a3b8;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
}


/* =======================================================
   Monitoring Grid
   ======================================================= */

.monitoring-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-top: 20px;
}

.monitoring-item {
    background: #0f172a;
    border: 1px solid #334155;
    border-radius: 10px;
    padding: 20px;
}

.monitoring-item h3 {
    color: #38bdf8;
    font-size: 1rem;
    margin-bottom: 8px;
}

.monitoring-item p {
    margin-bottom: 0;
    font-size: 0.95rem;
}


/* =======================================================
   Buttons
   ======================================================= */

.button,
button {
    display: inline-block;
    background: #0ea5e9;
    color: white;
    text-decoration: none;
    padding: 12px 20px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: .2s;
}

.button:hover,
button:hover:not(:disabled) {
    background: #0284c7;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(14, 165, 233, .35);
}

button:disabled {
    background: #475569;
    cursor: not-allowed;
}

.secondary-button {
    display: inline-block;
    background: #0f172a;
    color: #cbd5e1;
    text-decoration: none;
    padding: 11px 16px;
    border: 1px solid #475569;
    border-radius: 8px;
    font-weight: 600;
    transition: .2s;
}

.secondary-button:hover {
    border-color: #38bdf8;
    color: #38bdf8;
    transform: translateY(-2px);
}

.dashboard-links {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 15px;
}


/* =======================================================
   AI Security Assistant
   ======================================================= */

select {
    width: 100%;
    padding: 12px;
    margin-top: 15px;
    margin-bottom: 10px;
    background: #0f172a;
    color: #f8fafc;
    border: 1px solid #334155;
    border-radius: 8px;
    font-size: 1rem;
}

select:focus {
    outline: none;
    border-color: #38bdf8;
}

#aiOutput {
    background: #0f172a;
    border-left: 5px solid #38bdf8;
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
    animation: fadeIn .35s ease-in-out;
}

#aiOutput h3 {
    color: #38bdf8;
    margin-bottom: 15px;
}

#aiOutput h4 {
    color: #38bdf8;
    margin-top: 20px;
    margin-bottom: 10px;
}

#aiOutput p {
    margin-bottom: 15px;
    line-height: 1.7;
}

#aiOutput ul {
    margin-left: 20px;
    margin-bottom: 15px;
}

#aiOutput li {
    margin-bottom: 8px;
}

#aiOutput hr {
    border: none;
    border-top: 1px solid #334155;
    margin: 25px 0;
}

#copyButton {
    margin-top: 20px;
}


/* =======================================================
   Footer
   ======================================================= */

.portal-footer {
    text-align: center;
    margin: 35px 0 15px;
}

.portal-footer p {
    color: #64748b;
    font-size: 0.9rem;
}


/* =======================================================
   Animation
   ======================================================= */

@keyframes fadeIn {

    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* =======================================================
   Responsive Layout
   ======================================================= */

@media (max-width: 800px) {

    .container {
        width: 92%;
        margin: 25px auto;
    }

    header h1 {
        font-size: 2.3rem;
    }

    .logo {
        width: 120px;
    }

    .section-heading {
        flex-direction: column;
        gap: 10px;
    }

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

    .event-details {
        grid-template-columns: 1fr;
    }

    .dashboard-links {
        flex-direction: column;
    }

    .secondary-button {
        text-align: center;
    }
}


@media (max-width: 500px) {

    .card {
        padding: 20px;
    }

    header h1 {
        font-size: 2rem;
    }

    header p {
        font-size: 1rem;
    }

    .button,
    button,
    .secondary-button {
        width: 100%;
        text-align: center;
    }
}

/* =======================================================
   Login
   ======================================================= */

.login-container {
    max-width: 520px;
}

.login-card {
    padding: 30px;
}

.login-card label {
    display: block;
    color: #cbd5e1;
    font-weight: 600;
    margin-bottom: 8px;
}

.login-card input {
    width: 100%;
    padding: 12px;
    margin-bottom: 20px;

    background: #0f172a;
    color: #f8fafc;

    border: 1px solid #475569;
    border-radius: 8px;

    font-size: 1rem;
}

.login-card input:focus {
    outline: none;
    border-color: #38bdf8;
}

.login-button {
    width: 100%;
}

.login-error {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid #ef4444;
    color: #fca5a5;

    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
}

/* =======================================================
   Customer Identity
   ======================================================= */

.customer-bar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 18px;
    margin-bottom: 20px;
}

.customer-identity {
    text-align: right;
}

.customer-label {
    display: block;
    color: #94a3b8;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 3px;
}

.customer-identity strong {
    display: block;
    color: #f8fafc;
}

.tenant-id {
    display: block;
    color: #64748b;
    font-size: 0.8rem;
    margin-top: 2px;
}

@media (max-width: 500px) {

    .customer-bar {
        align-items: stretch;
        flex-direction: column;
    }

    .customer-identity {
        text-align: left;
    }
}

/* =======================================================
   Copy Confirmation Toast
   ======================================================= */

.explanation-card {
    position: relative;
}

.copy-toast {
    position: absolute;
    top: 50%;
    left: 50%;

    transform: translate(-50%, -50%) scale(0.95);

    background: #0f172a;
    color: #f8fafc;

    border: 1px solid #38bdf8;
    border-radius: 10px;

    padding: 14px 24px;

    font-size: 1rem;
    font-weight: 700;

    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.45);

    opacity: 0;
    pointer-events: none;

    transition:
        opacity 0.25s ease,
        transform 0.25s ease;

    z-index: 10;
}

.copy-toast.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

/* =======================================================
   Public Network Sentinel Website
   ======================================================= */

.public-container {
    max-width: 1050px;
}

.public-header {
    margin-bottom: 30px;
}

.public-hero {
    text-align: center;
    padding: 45px 35px;
}

.public-hero h2 {
    font-size: 2.6rem;
    margin-bottom: 18px;
}

.public-lead {
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
    font-size: 1.08rem;
}

.public-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 25px;
}

.public-feature-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-top: 20px;
}

.public-process {
    display: grid;
    gap: 15px;
    margin-top: 20px;
}

.public-process-step {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    background: #0f172a;
    border: 1px solid #334155;
    border-radius: 10px;
    padding: 20px;
}

.public-step-number {
    color: #38bdf8;
    font-size: 1.2rem;
    font-weight: 800;
    letter-spacing: 1px;
}

.public-process-step h3 {
    margin-bottom: 6px;
}

.public-process-step p {
    margin-bottom: 0;
}

.public-pilot-card {
    border-left: 5px solid #22c55e;
}

.public-portal-card {
    text-align: center;
}

.public-portal-card p {
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.portal-footer a {
    color: #38bdf8;
    text-decoration: none;
}

.portal-footer a:hover {
    text-decoration: underline;
}

@media (max-width: 800px) {
    .public-hero {
        padding: 35px 25px;
    }

    .public-hero h2 {
        font-size: 2rem;
    }

    .public-feature-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 500px) {
    .public-actions {
        flex-direction: column;
    }

    .public-process-step {
        flex-direction: column;
        gap: 8px;
    }
}
