body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background: #0f172a; /* deep slate */
    color: #e2e8f0;
}

/* Top navigation */
div a {
    color: #38bdf8;
    text-decoration: none;
    margin-right: 10px;
}

div a:hover {
    text-decoration: underline;
}

/* Headings */
h1 {
    color: #f8fafc;
    margin-top: 10px;
}

/* Container spacing */
/* =========================
   GLOBAL PAGE LAYOUT SYSTEM
   ========================= */

body {
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
}

/* Unified content container */
.container {
    margin-left: 30px;
    margin-right: 30px;
}

/* Form styling */
form {
    background: #1e293b;
    padding: 20px;
    border-radius: 10px;
    max-width: 600px;
}

input, textarea, select {
    width: 100%;
    padding: 10px;
    margin-top: 5px;
    margin-bottom: 15px;
    border-radius: 6px;
    border: none;
    background: #334155;
    color: white;
}

/* Button */
button {
    background: #38bdf8;
    color: black;
    padding: 10px 15px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
}

button:hover {
    background: #0ea5e9;
}

/* Table */
table {
    border-collapse: collapse;
    width: calc(100% - 60px);
    background: #1e293b;
    border-radius: 10px;
    overflow: hidden;
}

th {
    background: #0f172a;
    color: #38bdf8;
    padding: 12px;
    text-align: left;
}

td {
    padding: 12px;
    border-top: 1px solid #334155;
    color: #e2e8f0; /* FIX: ensures readable text */
}

/* Priority badges */
.badge {
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: bold;
}

.High { background: #ef4444; color: white; }
.Medium { background: #f59e0b; color: black; }
.Low { background: #22c55e; color: black; }

/* FORCE TABLE READABILITY (override fix) */
table, th, td {
    color: #e2e8f0 !important;
}

/* Make sure body text is readable globally */
body {
    color: #e2e8f0;
}
/* Dashboard Stats */

.stats-container {
    display: flex;
    gap: 20px;
    margin: 20px 30px;
}

.stat-card {
    background: #1e293b;
    padding: 20px;
    border-radius: 10px;
    min-width: 180px;
    text-align: center;
    box-shadow: 0 0 10px rgba(0,0,0,0.3);
}

.stat-card h2 {
    margin: 0;
    color: #38bdf8;
    font-size: 2rem;
}

.stat-card p {
    margin-top: 10px;
    color: #cbd5e1;
}
/* STATUS BADGES */
.status {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: bold;
    display: inline-block;
}

/* Status Colors */
.Open {
    background: #f59e0b;   /* amber */
    color: #111827;
}

.In-Progress {
    background: #3b82f6;   /* blue */
    color: white;
}

.Closed {
    background: #22c55e;   /* green */
    color: #111827;
}
/* DASHBOARD LAYOUT */
.dashboard {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* NAV BAR */
.nav {
    margin-bottom: 15px;
}

.nav a {
    color: #38bdf8;
    text-decoration: none;
    margin-right: 10px;
}

/* TABLE WRAPPER */
.table-container {
    margin-top: 20px;
    overflow-x: auto;
}

/* Make table feel like a card */
table {
    border-radius: 10px;
    overflow: hidden;
}

/* ACTION LINKS */
td a {
    color: #38bdf8;
    font-weight: bold;
    text-decoration: none;
}

td a:hover {
    text-decoration: underline;
}
/* NOTES */

.note-card {
    background: #0f172a;
    border: 1px solid #334155;
    border-radius: 8px;
    padding: 15px;
    margin-top: 15px;
}

.note-card strong {
    color: #38bdf8;
}
/* =========================
   MOBILE RESPONSIVENESS FIX
   ========================= */

@media (max-width: 768px) {

    body {
        margin: 0;
        padding: 10px;
    }

    /* Make table scroll instead of breaking layout */
    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
        width: 100%;
    }

    th, td {
        padding: 10px;
        font-size: 14px;
    }

    /* Stack forms nicely */
    form {
        width: 100%;
        max-width: 100%;
    }

    input, textarea, select {
        font-size: 16px; /* prevents zoom on mobile */
    }

    /* Make ticket cards breathe better */
    .ticket-card {
        width: 100%;
        padding: 15px;
    }

    /* Navigation spacing */
    .nav, div a {
        display: inline-block;
        margin-bottom: 10px;
    }
}
/* STATUS FORM */

select {
    margin-top: 8px;
    margin-bottom: 10px;
}

.ticket-card form {
    margin-top: 10px;
}
/* =========================
   HEADER LAYOUT FIX
   ========================= */

h1 {
    margin-bottom: 5px;
}

h2 {
    margin-top: 10px;
    margin-bottom: 20px;
}

/* subtitle consistency */
.subtitle {
    color: #94a3b8;
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 14px;
}
/* ===== MOBILE RESPONSIVE FIX ===== */
@media (max-width: 768px) {

    body {
        margin: 10px;
    }

    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    input[type="text"],
    input[type="email"],
    textarea,
    select {
        width: 100%;
        box-sizing: border-box;
        margin-bottom: 10px;
    }

    button, input[type="submit"] {
        width: 100%;
        margin-top: 10px;
    }

    h1 {
        font-size: 20px;
    }
}
