/* ==============================
   SSTM TICKETING SYSTEM
   Navy Blue + White Logo Banner
============================== */

:root {
    --bg: #0b3970;
    --panel: #103565;
    --field: #0b2c52;
    --border: #355782;
    --blue: #0798d0;
    --blue-hover: #087eae;
    --text: #e7edf5;
    --muted: #b8cce3;
    --green: #43c99a;
    --red: #ff8585;
}

/* ==============================
   GLOBAL
============================== */

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: Arial, sans-serif;
    background: linear-gradient(135deg, #103565, #0b3970);
    color: var(--text);
}

/* ==============================
   HEADER / LOGO BANNER
============================== */

/* White rectangle INSIDE the main container */
.logo-banner {
    width: 100%;
    min-height: 145px;
    padding: 18px 24px;
    margin-bottom: 30px;

    background: #ffffff;
    border: 1px solid #dce5ef;
    border-radius: 10px;

    display: flex;
    justify-content: center;
    align-items: center;
}

/* SSTM logo */
.sstm-logo {
    display: block;
    width: 100%;
    max-width: 420px;
    height: auto;
    max-height: 125px;
    object-fit: contain;
    margin: 0 auto;
}

/* Staff login link */
.staff-link {
    position: absolute;
    top: 24px;
    right: 30px;

    color: var(--blue);
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    z-index: 10;
}

.staff-link:hover,
.back-link:hover {
    text-decoration: underline;
}

/* ==============================
   MAIN PAGE CONTAINER
============================== */

/*
   One centered container.
   The white logo banner and form
   are both inside this container.
*/

.card {
    width: min(1300px, calc(100% - 40px));
    margin: 40px auto;
    padding: 18px;

    background: rgba(16, 53, 101, 0.45);
    border: 1px solid rgba(120, 170, 215, 0.30);
    border-radius: 12px;
}

/* Login card */
.small-card {
    width: min(460px, calc(100% - 32px));
    margin: 80px auto;
    padding: 30px;

    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 14px;
}

/* ==============================
   HEADINGS
============================== */

h1 {
    margin-top: 0;
    margin-bottom: 8px;
    color: var(--text);
    font-size: 28px;
}

h2 {
    color: var(--text);
    font-size: 21px;
    margin-bottom: 20px;
}

.subtitle {
    color: var(--muted);
    margin-top: 0;
    margin-bottom: 24px;
    line-height: 1.5;
}

/* ==============================
   FORMS
============================== */

label {
    display: block;
    margin: 18px 0 7px;
    font-weight: 600;
    color: var(--text);
    font-size: 14px;
}

input,
textarea,
select {
    display: block;
    width: 100%;
    padding: 13px 14px;

    background: var(--field);
    color: var(--text);

    border: 1px solid var(--border);
    border-radius: 9px;

    font: inherit;
    font-size: 15px;
    outline: none;

    transition: border-color 0.2s;
}

input::placeholder,
textarea::placeholder {
    color: #7898b8;
}

input:focus,
textarea:focus,
select:focus {
    border-color: var(--blue);
}

textarea {
    min-height: 130px;
    resize: vertical;
}

select {
    cursor: pointer;
}

.request-form {
    margin-top: 25px;
}

.request-form h2 {
    margin-top: 0;
}

/* ==============================
   MULTIPLE GATEWAY FIELDS
============================== */

.gateway-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.gateway-row input {
    flex: 1;
    min-width: 0;
}

.gateway-row .remove-gateway {
    flex-shrink: 0;
    width: 42px;
    padding: 10px;

    background: var(--field);
    color: var(--blue);

    border: 1px solid var(--border);
    font-size: 20px;
}

.add-gateway {
    width: auto;
    margin-top: 2px;
    padding: 9px 14px;

    background: var(--field);
    color: var(--blue);

    border: 1px solid var(--border);
    font-size: 14px;
}

/* ==============================
   BUTTONS
============================== */

button {
    padding: 12px 20px;

    border: 1px solid transparent;
    border-radius: 9px;

    background: var(--blue);
    color: white;

    font: inherit;
    font-weight: 600;
    cursor: pointer;

    transition: background 0.2s;
}

button:hover {
    background: var(--blue-hover);
}

form button[type="submit"] {
    width: 100%;
    margin-top: 24px;
}

.close-button {
    white-space: nowrap;
    background: var(--blue);
    padding: 9px 12px;
    font-size: 13px;
}

.secondary {
    background: #243d50;
    color: var(--text);
    width: auto;
}

.secondary:hover {
    background: #34536a;
}

/* ==============================
   LINKS
============================== */

.back-link {
    display: inline-block;
    margin-top: 22px;
    color: var(--blue);
    text-decoration: none;
}

/* ==============================
   MESSAGES
============================== */

.message {
    margin-top: 16px;
    font-weight: 600;
    line-height: 1.5;
}

.success {
    color: var(--green);
}

.error {
    color: var(--red);
}

/* ==============================
   DASHBOARD
============================== */

.dashboard {
    width: min(1400px, 100%);
    margin: 0 auto;
    padding: 30px;
}

.dashboard-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.dashboard-heading h1 {
    margin-bottom: 8px;
}

/* ==============================
   DASHBOARD TABLES
============================== */

.table-wrap {
    overflow-x: auto;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 14px;
}

table {
    width: 100%;
    min-width: 1000px;
    border-collapse: collapse;
}

th,
td {
    padding: 14px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
    line-height: 1.45;
}

th {
    background: var(--panel);
    color: var(--muted);
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
}

td {
    color: var(--text);
    font-size: 14px;
}

tbody tr:hover {
    background: #172e40;
}

.issue-cell {
    min-width: 220px;
    max-width: 360px;
    white-space: normal;
    overflow-wrap: anywhere;
}

.issue-cell div {
    margin-bottom: 8px;
    min-width: 180px;
}

.issue-cell strong {
    text-transform: capitalize;
}

/* ==============================
   STATUS DROPDOWN
============================== */

.status-select {
    min-width: 125px;
    padding: 8px 10px;

    background: var(--field);
    color: var(--text);

    border: 1px solid var(--border);
    border-radius: 8px;

    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.status-select:focus {
    border-color: var(--blue);
    outline: none;
}

.status-select:disabled {
    opacity: 0.6;
    cursor: wait;
}

/* ==============================
   TICKET SECTIONS
============================== */

.ticket-section {
    margin-top: 36px;
}

.section-title {
    margin-bottom: 16px;
    padding: 0 0 12px 14px;
    border-left: 4px solid var(--blue);
}

.section-title h2 {
    margin: 0 0 6px;
    font-size: 22px;
    color: var(--text);
}

.section-title span {
    color: var(--muted);
    font-size: 13px;
}

.ticket-section .table-wrap {
    margin-bottom: 24px;
}

.ticket-section table {
    width: 100%;
    min-width: 1100px;
}

/* ==============================
   STATISTICS
============================== */

.stats-banner {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 15px;

    width: 100%;
    margin: 25px 0;
}

.stat-card {
    background: #122536;
    border: 1px solid #263f52;
    border-radius: 15px;

    min-height: 104px;
    padding: 22px 20px;

    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;

    transition: border-color 0.2s ease;
}

.stat-card:hover {
    border-color: #087f9c;
}

.stat-number {
    color: #28b5df;
    font-size: 30px;
    font-weight: 700;
    line-height: 1.2;
}

.stat-label {
    color: #b8c9d9;
    font-size: 14px;
    font-weight: 400;
}

/* ==============================
   RESPONSIVE
============================== */

[hidden] {
    display: none !important;
}

@media (max-width: 800px) {
    .stats-banner {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 700px) {
    .card {
        width: calc(100% - 20px);
        margin: 70px auto 20px;
        padding: 12px;
    }

    .small-card {
        margin: 60px auto 20px;
        padding: 22px;
    }

    .dashboard {
        padding: 16px 10px;
    }

    .dashboard-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .logo-banner {
        min-height: 110px;
        padding: 15px;
        margin-bottom: 24px;
    }

    .sstm-logo {
        max-width: 300px;
        max-height: 90px;
    }

    h1 {
        font-size: 23px;
    }

    .staff-link {
        top: 18px;
        right: 16px;
        font-size: 13px;
    }

    .stats-banner {
        grid-template-columns: 1fr;
    }

    .stat-card {
        min-height: 90px;
    }
}
/* ==============================
   EMPLOYEE DASHBOARD HEADER
============================== */

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;

    width: 100%;
    min-height: 75px;
    padding: 18px 30px;

    background: #0d2d54;
    border-bottom: 1px solid #355782;
}

.topbar strong {
    color: #0798d0;
    font-size: 21px;
}

#staffName {
    color: #b8cce3;
    margin-left: 8px;
    font-size: 16px;
}

.topbar button {
    width: auto;
    margin: 0;
    padding: 10px 22px;

    background: #243d50;
    color: #e7edf5;

    border: 1px solid #355782;
    border-radius: 8px;
}

.topbar button:hover {
    background: #34536a;
}
/* ==============================
   INDEX PAGE TOP BAR
============================== */

.index-topbar {
    width: 100%;
    min-height: 70px;
    padding: 0 40px;

    display: flex;
    justify-content: space-between;
    align-items: center;

    background: #0b2c52;
    border-bottom: 1px solid #355782;
}

/* Title on the left */
.topbar-title {
    color: #0798d0;
    font-size: 21px;
    font-weight: 700;
}

.topbar-title span {
    color: #e7edf5;
    font-weight: 400;
}

/* Staff Login on the top right */
.index-topbar .staff-link {
    position: static;
    display: inline-block;

    color: #20b5e5;
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;

    padding: 10px 16px;
    border: 1px solid transparent;
    border-radius: 8px;
    transition: 0.2s ease;
}

.index-topbar .staff-link:hover {
    background: rgba(7, 152, 208, 0.12);
    border-color: #355782;
    text-decoration: none;
}

/* Mobile */
@media (max-width: 600px) {
    .index-topbar {
        padding: 0 16px;
        min-height: 60px;
    }

    .topbar-title {
        font-size: 16px;
    }

    .index-topbar .staff-link {
        font-size: 13px;
        padding: 8px;
    }
}