/* =========================================================
   SECURITY RISK REGISTER
   risk-register.css
   ========================================================= */


/* =========================
   1. RESET
   ========================= */

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

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    background: #0b0f19;
    color: #e5e7eb;
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.6;
}

button,
input,
select,
textarea {
    font: inherit;
}

button,
select {
    cursor: pointer;
}

a {
    color: inherit;
}

[hidden] {
    display: none !important;
}


/* =========================
   2. ACCESSIBILITY
   ========================= */

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}


/* =========================
   3. HEADER / NAVIGATION
   ========================= */

.header {
    position: sticky;
    top: 0;
    z-index: 1000;

    background: rgba(11, 15, 25, 0.94);
    border-bottom: 1px solid #1f2937;
    backdrop-filter: blur(14px);
}

.navbar {
    width: 100%;
    max-width: 1200px;

    margin: 0 auto;
    padding: 18px 30px;

    display: flex;
    justify-content: space-between;
    align-items: center;

    gap: 30px;
}

.logo {
    display: flex;
    justify-content: center;
    align-items: center;

    width: 42px;
    height: 42px;

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

    color: #38bdf8;

    font-size: 16px;
    font-weight: 700;

    text-decoration: none;

    transition: 0.2s ease;
}

.logo:hover {
    background: rgba(56, 189, 248, 0.1);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 26px;
}

.nav-links a {
    color: #94a3b8;

    font-size: 13px;
    font-weight: 500;

    text-decoration: none;

    transition: 0.2s ease;
}

.nav-links a:hover {
    color: #ffffff;
}

.nav-links .portfolio-link {
    color: #38bdf8;
}


/* =========================
   4. GENERAL LAYOUT
   ========================= */

.section {
    width: 100%;
    max-width: 1200px;

    margin: 0 auto;
    padding: 90px 30px;
}

.section-label {
    margin-bottom: 10px;

    color: #38bdf8;

    font-size: 11px;
    font-weight: 700;

    letter-spacing: 2px;
}

.section h2 {
    color: #ffffff;

    font-size: clamp(28px, 4vw, 38px);
    line-height: 1.2;
}

.section-description {
    max-width: 680px;

    margin-top: 12px;

    color: #94a3b8;

    font-size: 15px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;

    gap: 30px;

    margin-bottom: 35px;
}


/* =========================
   5. HERO
   ========================= */

.hero {
    position: relative;

    min-height: 570px;

    display: flex;
    align-items: center;

    overflow: hidden;

    border-bottom: 1px solid #1f2937;

    background:
        radial-gradient(
            circle at 75% 35%,
            rgba(56, 189, 248, 0.10),
            transparent 35%
        ),
        radial-gradient(
            circle at 15% 80%,
            rgba(14, 165, 233, 0.05),
            transparent 30%
        ),
        #0b0f19;
}

.hero::after {
    content: "";

    position: absolute;
    inset: 0;

    pointer-events: none;

    background-image:
        linear-gradient(
            rgba(255, 255, 255, 0.015) 1px,
            transparent 1px
        ),
        linear-gradient(
            90deg,
            rgba(255, 255, 255, 0.015) 1px,
            transparent 1px
        );

    background-size: 50px 50px;
}

.hero-content {
    position: relative;
    z-index: 1;

    width: 100%;
    max-width: 1200px;

    margin: 0 auto;
    padding: 110px 30px;
}

.hero h1 {
    max-width: 900px;

    margin-bottom: 24px;

    color: #ffffff;

    font-size: clamp(46px, 7vw, 78px);
    font-weight: 700;
    line-height: 1.02;

    letter-spacing: -2px;
}

.hero-description {
    max-width: 720px;

    color: #94a3b8;

    font-size: 18px;
    line-height: 1.8;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;

    gap: 8px;

    margin-top: 30px;
}

.project-tags span {
    padding: 6px 10px;

    background: #111827;

    border: 1px solid #334155;
    border-radius: 5px;

    color: #cbd5e1;

    font-size: 11px;
    font-weight: 600;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;

    gap: 12px;

    margin-top: 32px;
}

.hero-info {
    display: flex;
    flex-wrap: wrap;

    gap: 25px;

    margin-top: 28px;

    color: #64748b;

    font-size: 11px;
}

.hero-info span:first-child {
    color: #38bdf8;
    font-weight: 700;
}


/* =========================
   6. BUTTONS
   ========================= */

.primary-button,
.secondary-button {
    min-height: 44px;

    display: inline-flex;
    justify-content: center;
    align-items: center;

    padding: 11px 17px;

    border-radius: 6px;

    font-size: 12px;
    font-weight: 700;

    text-decoration: none;

    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease,
        transform 0.2s ease;
}

.primary-button {
    background: #38bdf8;
    color: #07111f;

    border: 1px solid #38bdf8;
}

.primary-button:hover {
    background: #7dd3fc;
    border-color: #7dd3fc;

    transform: translateY(-1px);
}

.secondary-button {
    background: transparent;
    color: #cbd5e1;

    border: 1px solid #334155;
}

.secondary-button:hover {
    color: #ffffff;

    border-color: #38bdf8;

    background: rgba(56, 189, 248, 0.05);
}


/* =========================
   7. DASHBOARD
   ========================= */

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);

    gap: 18px;
}

.dashboard-card {
    position: relative;

    min-width: 0;

    padding: 25px;

    background: #111827;

    border: 1px solid #1f2937;
    border-radius: 10px;

    transition:
        transform 0.2s ease,
        border-color 0.2s ease;
}

.dashboard-card:hover {
    transform: translateY(-3px);

    border-color: #334155;
}

.dashboard-card::before {
    content: "";

    position: absolute;

    top: 0;
    left: 20px;
    right: 20px;

    height: 1px;

    background: linear-gradient(
        90deg,
        transparent,
        rgba(56, 189, 248, 0.55),
        transparent
    );
}

.dashboard-label {
    display: block;

    margin-bottom: 15px;

    color: #64748b;

    font-size: 10px;
    font-weight: 700;

    letter-spacing: 1.4px;
}

.dashboard-card strong {
    display: block;

    margin-bottom: 10px;

    color: #ffffff;

    font-size: 38px;
    line-height: 1;
}

.dashboard-card p {
    color: #94a3b8;

    font-size: 12px;
}


/* =========================
   8. DASHBOARD PANEL
   ========================= */

.dashboard-panel {
    margin-top: 20px;
    padding: 30px;

    background: #111827;

    border: 1px solid #1f2937;
    border-radius: 10px;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;

    gap: 20px;

    margin-bottom: 30px;
}

.panel-header h3 {
    color: #ffffff;

    font-size: 22px;
}

.panel-header > p {
    color: #64748b;

    font-size: 12px;
}


/* =========================
   9. RISK MATRIX
   ========================= */

.risk-matrix-container {
    width: 100%;
    max-width: 720px;
}

.risk-matrix {
    display: grid;

    grid-template-columns:
        45px
        repeat(5, minmax(60px, 1fr));

    gap: 5px;
}

.matrix-cell,
.matrix-label {
    min-height: 58px;

    display: flex;
    justify-content: center;
    align-items: center;

    border-radius: 5px;

    font-size: 12px;
    font-weight: 700;
}

.matrix-label {
    color: #64748b;
}

.matrix-empty {
    min-height: 40px;
}

.matrix-cell {
    border: 1px solid transparent;

    transition:
        transform 0.15s ease,
        filter 0.15s ease;
}

.matrix-cell:hover {
    transform: scale(1.04);
    filter: brightness(1.15);
}

.matrix-cell.low {
    background: rgba(34, 197, 94, 0.12);
    border-color: rgba(34, 197, 94, 0.30);

    color: #86efac;
}

.matrix-cell.medium {
    background: rgba(234, 179, 8, 0.12);
    border-color: rgba(234, 179, 8, 0.30);

    color: #fde047;
}

.matrix-cell.high {
    background: rgba(249, 115, 22, 0.12);
    border-color: rgba(249, 115, 22, 0.30);

    color: #fdba74;
}

.matrix-cell.critical {
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.30);

    color: #fca5a5;
}

.matrix-axis {
    display: flex;
    justify-content: space-between;

    margin-top: 10px;
    margin-left: 50px;

    color: #64748b;

    font-size: 10px;
}

.risk-legend {
    display: flex;
    flex-wrap: wrap;

    gap: 8px;

    margin-top: 25px;
}

.legend-item {
    padding: 5px 9px;

    border-radius: 4px;

    font-size: 10px;
    font-weight: 700;
}

.legend-item.low {
    background: rgba(34, 197, 94, 0.12);
    color: #86efac;
}

.legend-item.medium {
    background: rgba(234, 179, 8, 0.12);
    color: #fde047;
}

.legend-item.high {
    background: rgba(249, 115, 22, 0.12);
    color: #fdba74;
}

.legend-item.critical {
    background: rgba(239, 68, 68, 0.12);
    color: #fca5a5;
}


/* =========================
   10. REGISTER CONTROLS
   ========================= */

.register-actions {
    display: flex;
    align-items: center;

    gap: 10px;
}

.register-actions input,
.register-actions select {
    min-height: 44px;

    padding: 0 13px;

    background: #111827;
    color: #cbd5e1;

    border: 1px solid #334155;
    border-radius: 6px;

    outline: none;

    font-size: 12px;
}

.register-actions input {
    width: 180px;
}

.register-actions input::placeholder {
    color: #64748b;
}

.register-actions input:focus,
.register-actions select:focus {
    border-color: #38bdf8;
}


/* =========================
   11. RISK TABLE
   ========================= */

.table-wrapper {
    width: 100%;

    overflow-x: auto;

    background: #111827;

    border: 1px solid #1f2937;
    border-radius: 10px;
}

.risk-table {
    width: 100%;
    min-width: 1000px;

    border-collapse: collapse;
}

.risk-table th {
    padding: 15px;

    background: rgba(255, 255, 255, 0.01);

    color: #64748b;

    border-bottom: 1px solid #1f2937;

    font-size: 10px;
    font-weight: 700;

    letter-spacing: 1px;

    text-align: left;
    white-space: nowrap;
}

.risk-table td {
    padding: 15px;

    color: #cbd5e1;

    border-bottom: 1px solid #1f2937;

    font-size: 12px;
    vertical-align: middle;
}

.risk-table tbody tr {
    transition: background 0.15s ease;
}

.risk-table tbody tr:hover {
    background: rgba(56, 189, 248, 0.03);
}

.risk-table tbody tr:last-child td {
    border-bottom: none;
}


/* =========================
   12. RISK BADGES
   ========================= */

.risk-badge {
    display: inline-block;

    padding: 5px 8px;

    border-radius: 4px;

    font-size: 9px;
    font-weight: 700;

    letter-spacing: 0.5px;
}

.risk-badge.low {
    background: rgba(34, 197, 94, 0.12);
    color: #86efac;
}

.risk-badge.medium {
    background: rgba(234, 179, 8, 0.12);
    color: #fde047;
}

.risk-badge.high {
    background: rgba(249, 115, 22, 0.12);
    color: #fdba74;
}

.risk-badge.critical {
    background: rgba(239, 68, 68, 0.12);
    color: #fca5a5;
}


/* =========================
   13. TABLE ACTION BUTTONS
   ========================= */

.table-action {
    padding: 6px 9px;

    background: transparent;
    color: #94a3b8;

    border: 1px solid #334155;
    border-radius: 4px;

    font-size: 10px;

    transition: 0.2s ease;
}

.table-action:hover {
    color: #ffffff;
    border-color: #38bdf8;
}

.table-action.delete:hover {
    color: #fca5a5;
    border-color: #ef4444;

    background: rgba(239, 68, 68, 0.05);
}

.table-actions {
    display: flex;

    gap: 6px;
}


/* =========================
   14. EMPTY STATE
   ========================= */

.empty-state {
    padding: 60px 25px;

    background: #111827;

    border: 1px dashed #334155;
    border-radius: 10px;

    text-align: center;
}

.empty-icon {
    width: 48px;
    height: 48px;

    display: flex;
    justify-content: center;
    align-items: center;

    margin: 0 auto 18px;

    background: rgba(56, 189, 248, 0.08);

    border: 1px solid rgba(56, 189, 248, 0.25);
    border-radius: 50%;

    color: #38bdf8;

    font-size: 24px;
}

.empty-state h3 {
    margin-bottom: 8px;

    color: #ffffff;

    font-size: 18px;
}

.empty-state p {
    max-width: 450px;

    margin: 0 auto 22px;

    color: #94a3b8;

    font-size: 13px;
}


/* =========================
   15. FORM CONTAINER
   ========================= */

.form-container {
    padding: 35px;

    background: #111827;

    border: 1px solid #1f2937;
    border-radius: 12px;
}

fieldset {
    padding: 32px 0;

    border: 0;
    border-bottom: 1px solid #1f2937;
}

fieldset:first-of-type {
    padding-top: 0;
}

legend {
    width: 100%;

    margin-bottom: 8px;

    color: #ffffff;

    font-size: 18px;
    font-weight: 700;
}

.form-help {
    max-width: 700px;

    margin-bottom: 22px;

    color: #64748b;

    font-size: 12px;
}


/* =========================
   16. FORM GRID
   ========================= */

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);

    gap: 20px;
}

.cia-input-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);

    gap: 20px;
}

.risk-input-grid {
    display: grid;

    grid-template-columns:
        minmax(0, 1fr)
        40px
        minmax(0, 1fr)
        40px
        minmax(130px, 0.65fr);

    align-items: end;

    gap: 15px;
}


/* =========================
   17. FORM ELEMENTS
   ========================= */

.form-group {
    min-width: 0;

    display: flex;
    flex-direction: column;

    gap: 8px;
}

.form-group.full-width {
    margin-top: 20px;
}

.form-group label {
    color: #cbd5e1;

    font-size: 12px;
    font-weight: 700;
}

.form-group small,
.input-description {
    color: #64748b;

    font-size: 10px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;

    padding: 13px 14px;

    background: #0b0f19;
    color: #ffffff;

    border: 1px solid #334155;
    border-radius: 6px;

    outline: none;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.form-group textarea {
    min-height: 110px;

    resize: vertical;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #475569;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #38bdf8;

    box-shadow:
        0 0 0 3px rgba(56, 189, 248, 0.08);
}


/* =========================
   18. RISK CALCULATION
   ========================= */

.operator {
    min-height: 47px;

    display: flex;
    justify-content: center;
    align-items: center;

    color: #64748b;

    font-size: 22px;
}

.calculated-risk {
    min-height: 47px;

    display: flex;
    justify-content: center;
    align-items: baseline;

    gap: 5px;

    padding: 9px 12px;

    background: #0b0f19;

    border: 1px solid #334155;
    border-radius: 6px;
}

.calculated-risk span {
    color: #64748b;

    font-size: 9px;
    font-weight: 700;
}

.calculated-risk strong {
    color: #ffffff;

    font-size: 24px;
    line-height: 1;
}

.calculated-risk small {
    color: #64748b;

    font-size: 10px;
}


/* =========================
   19. RISK RESULT
   ========================= */

.risk-result {
    display: flex;
    justify-content: space-between;
    align-items: center;

    gap: 20px;

    margin-top: 15px;
    padding: 13px 15px;

    border: 1px solid transparent;
    border-radius: 6px;
}

.risk-result span {
    font-size: 9px;
    font-weight: 700;

    letter-spacing: 1px;
}

.risk-result strong {
    font-size: 12px;
}

.risk-result.low {
    background: rgba(34, 197, 94, 0.08);
    border-color: rgba(34, 197, 94, 0.20);

    color: #86efac;
}

.risk-result.medium {
    background: rgba(234, 179, 8, 0.08);
    border-color: rgba(234, 179, 8, 0.20);

    color: #fde047;
}

.risk-result.high {
    background: rgba(249, 115, 22, 0.08);
    border-color: rgba(249, 115, 22, 0.20);

    color: #fdba74;
}

.risk-result.critical {
    background: rgba(239, 68, 68, 0.08);
    border-color: rgba(239, 68, 68, 0.20);

    color: #fca5a5;
}


/* =========================
   20. FORM ACTIONS
   ========================= */

.form-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;

    flex-wrap: wrap;

    gap: 10px;

    padding-top: 30px;
}


/* =========================
   21. ABOUT PROJECT
   ========================= */

.about-description {
    margin-bottom: 35px;
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);

    gap: 18px;

    margin-top: 35px;
}

.about-card {
    min-width: 0;

    padding: 25px;

    background: #111827;

    border: 1px solid #1f2937;
    border-radius: 10px;

    transition:
        transform 0.2s ease,
        border-color 0.2s ease;
}

.about-card:hover {
    transform: translateY(-3px);

    border-color: #334155;
}

.card-number {
    display: block;

    margin-bottom: 18px;

    color: #38bdf8;

    font-size: 10px;
    font-weight: 700;

    letter-spacing: 1px;
}

.about-card h3 {
    margin-bottom: 10px;

    color: #ffffff;

    font-size: 17px;
}

.about-card p {
    color: #94a3b8;

    font-size: 12px;
}


/* =========================
   22. TECHNOLOGY
   ========================= */

.technology-box {
    display: flex;
    justify-content: space-between;
    align-items: center;

    gap: 30px;

    margin-top: 20px;
    padding: 25px;

    background: rgba(56, 189, 248, 0.035);

    border: 1px solid rgba(56, 189, 248, 0.16);
    border-radius: 10px;
}

.technology-box h3 {
    color: #ffffff;

    font-size: 18px;
}

.technology-tags {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;

    gap: 8px;
}

.technology-tags span {
    padding: 6px 10px;

    background: #111827;

    border: 1px solid #334155;
    border-radius: 5px;

    color: #cbd5e1;

    font-size: 10px;
}


/* =========================
   23. DISCLAIMER
   ========================= */

.disclaimer {
    padding: 25px;

    background: #111827;

    border: 1px solid #1f2937;
    border-left: 3px solid #38bdf8;

    border-radius: 6px;
}

.disclaimer strong {
    display: block;

    margin-bottom: 7px;

    color: #ffffff;
}

.disclaimer p {
    max-width: 850px;

    color: #94a3b8;

    font-size: 12px;
}


/* =========================
   24. FOOTER
   ========================= */

footer {
    border-top: 1px solid #1f2937;

    background: #080b12;
}

.footer-content {
    width: 100%;
    max-width: 1200px;

    margin: 0 auto;
    padding: 30px;

    display: flex;
    justify-content: space-between;
    align-items: center;

    gap: 20px;

    color: #64748b;

    font-size: 11px;
}

.footer-content a {
    color: #94a3b8;

    text-decoration: none;

    transition: 0.2s ease;
}

.footer-content a:hover {
    color: #38bdf8;
}


/* =========================
   25. SCROLLBAR
   ========================= */

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #0b0f19;
}

::-webkit-scrollbar-thumb {
    background: #334155;

    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #475569;
}


/* =========================
   26. RESPONSIVE
   TABLET
   ========================= */

@media (max-width: 950px) {

    .dashboard-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .about-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .section-header {
        align-items: flex-start;
    }

    .register-actions {
        flex-wrap: wrap;
        justify-content: flex-end;
    }

    .cia-input-grid {
        grid-template-columns: 1fr;
    }

    .risk-input-grid {
        grid-template-columns: 1fr;
    }

    .operator {
        min-height: auto;
        height: 20px;
    }

}


/* =========================
   27. RESPONSIVE
   MOBILE
   ========================= */

@media (max-width: 700px) {

    .navbar {
        padding: 15px 20px;
    }

    .nav-links {
        gap: 14px;
    }

    .nav-links a:not(.portfolio-link) {
        display: none;
    }

    .section {
        padding: 65px 20px;
    }

    .hero {
        min-height: auto;
    }

    .hero-content {
        padding: 85px 20px;
    }

    .hero h1 {
        letter-spacing: -1px;
    }

    .hero-description {
        font-size: 16px;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }

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

    .dashboard-panel {
        padding: 20px;
    }

    .panel-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .risk-matrix {
        grid-template-columns:
            35px
            repeat(5, minmax(42px, 1fr));
    }

    .matrix-cell,
    .matrix-label {
        min-height: 45px;

        font-size: 10px;
    }

    .matrix-axis {
        margin-left: 40px;
    }

    .register-actions {
        width: 100%;

        flex-direction: column;
        align-items: stretch;
    }

    .register-actions input,
    .register-actions select {
        width: 100%;
    }

    .form-container {
        padding: 22px;
    }

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

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

    .technology-box {
        flex-direction: column;
        align-items: flex-start;
    }

    .technology-tags {
        justify-content: flex-start;
    }

    .form-actions {
        flex-direction: column-reverse;
        align-items: stretch;
    }

    .form-actions button {
        width: 100%;
    }

    .footer-content {
        flex-direction: column;
        align-items: flex-start;
    }

}


/* =========================
   28. VERY SMALL SCREENS
   ========================= */

@media (max-width: 450px) {

    .hero h1 {
        font-size: 40px;
    }

    .project-tags {
        gap: 6px;
    }

    .hero-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .hero-actions a {
        width: 100%;
    }

    .risk-matrix {
        gap: 3px;

        grid-template-columns:
            28px
            repeat(5, minmax(35px, 1fr));
    }

    .matrix-cell,
    .matrix-label {
        min-height: 38px;

        font-size: 9px;
    }

    .risk-result {
        align-items: flex-start;
        flex-direction: column;

        gap: 5px;
    }

}