/* = Root Variables = */
:root {
    --tb-blue: #2e307d;
    --tb-orange: #fe890f;
    --tb-bg-light: #f5fafd;
    --tb-bg-table-header: #f1f5f9;
    --tb-green: #28a745;
    --tb-grey: #adb5bd;
    --tb-yellow: #ffc107;
}

/* = Base & Body = */
body {
    font-family: 'Segoe UI', Arial, sans-serif;
    background-color: var(--tb-bg-light);
    margin: 0;
    padding: 0;
    color: var(--tb-blue);
}

/* = Headings = */
h1, h2, h3, h4, h5 {
    font-weight: 600;
    color: var(--tb-blue);
}

/* = Card Enhancements = */
.card {
    border-radius: 10px;
    box-shadow: 0 2px 16px rgba(0,0,0,0.05);
    border: none;
    background-color: #fff;
}
.card-title {
    font-weight: 600;
    color: var(--tb-blue);
}
.card-body {
    font-size: 0.95rem;
    color: #333;
}

/* = Form Elements = */
form {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
}
input[type=text],
input[type=password],
select,
input[type=file] {
    padding: 10px;
    margin-bottom: 12px;
    width: 100%;
    max-width: 350px;
    border: 1px solid #cad4e7;
    border-radius: 5px;
    transition: border-color 0.3s ease;
}
input[type=text]:focus,
input[type=password]:focus,
select:focus,
input[type=file]:focus {
    outline: none;
    border-color: var(--tb-orange);
    box-shadow: 0 0 6px var(--tb-orange);
}

/* = Buttons = */
button,
input[type=submit],
.btn {
    border-radius: 6px;
    font-weight: 600;
    background-color: var(--tb-orange);
    color: #fff;
    border: none;
    padding: 10px 18px;
    transition: background-color 0.3s ease;
    cursor: pointer;
}
button:hover,
input[type=submit]:hover,
.btn:hover,
.btn:focus {
    background-color: #e67d00;
    color: #fff;
    text-decoration: none;
}

/* = Exam Question Box = */
.question-box {
    background: #fff;
    padding: 18px;
    margin-bottom: 22px;
    border-radius: 8px;
    border: 1px solid #cad4e7;
    box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}
.question-box h5 {
    color: var(--tb-blue);
    font-weight: 700;
}

/* = Palette Styling = */
.palette {
    margin-top: 18px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: flex-start;
}
.palette .btn {
    width: 42px;
    height: 42px;
    padding: 0;
    text-align: center;
    font-weight: 600;
    font-size: 1rem;
    line-height: 42px;
    border-radius: 6px;
    border: 1px solid #ccc;
    color: var(--tb-blue);
    background: #f0f4ff;
    transition: background-color 0.3s ease, color 0.3s ease;
    cursor: pointer;
}
/* Current (Yellow/Orange) */
.palette .btn.active-question {
    background: var(--tb-yellow) !important;
    color: #212529 !important;
    border-color: var(--tb-yellow) !important;
}
/* Marked (Green) */
.palette .btn.marked-question {
    background: var(--tb-green) !important;
    color: #fff !important;
    border-color: var(--tb-green) !important;
}
/* Review (Grey) */
.palette .btn.review-question {
    background: var(--tb-grey) !important;
    color: #fff !important;
    border-color: var(--tb-grey) !important;
}

/* = Timer Styling = */
#timer {
    font-weight: bold;
    font-size: 1.6rem;
    color: var(--tb-blue);
}

/* = Table Enhancements = */
.table thead th {
    background-color: var(--tb-bg-table-header);
    color: var(--tb-blue);
    font-weight: 700;
}
.table-striped tbody tr:nth-of-type(odd) {
    background-color: #fafcff;
}
.badge {
    font-size: 0.9rem;
    font-weight: 600;
}

/* = Alerts = */
.alert {
    border-radius: 8px;
    font-weight: 600;
}
.alert-info {
    background-color: #e7f1ff;
    border-color: var(--tb-blue);
    color: var(--tb-blue);
}

/* = Navbar Adjustments = */
.navbar, .navbar-brand {
    font-weight: 700;
}
.navbar-dark .navbar-nav .nav-link {
    color: #fff;
}
.navbar-dark .navbar-nav .nav-link:hover {
    color: var(--tb-orange);
}

/* = Footer Styling = */
footer {
    background-color: var(--tb-blue);
    color: #fff;
    padding: 18px 0;
    font-weight: 600;
    font-size: 1.1rem;
    text-align: center;
}

/* = Responsive Adjustments = */
@media (max-width: 768px) {
    .palette {
        justify-content: center;
    }
    input[type=text],
    input[type=password],
    select,
    input[type=file] {
        max-width: 100%;
    }
}
