/* =====================================================
   Shared stylesheet – Student Application Form
   Palette: #a23e2b (brand) / #F2F1ED (cream)
   ===================================================== */

:root {
    --brand: #a23e2b;
    --brand-dark: #7a2e20;
    --cream: #F2F1ED;
    --text: #2a2a2a;
    --muted: #777;
    --error: #c0392b;
    --success: #2e7d32;
    --border: #d8d6d1;
}

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


body {
    font-family: 'Segoe UI', Helvetica, Arial, sans-serif;
    color: var(--text);
    min-height: 100vh;
    padding: 2rem 1rem;
    line-height: 1.5;
 
    /* Layered background: dark warm overlay + photo of a library/campus.
       Replace the Unsplash URL with your own image (e.g. assets/campus.jpg)
       any time. The fallback colour underneath keeps things looking good
       even if the image fails to load. */
    background:
        linear-gradient(rgba(40, 20, 14, 0.55), rgba(40, 20, 14, 0.65)),
        url('https://images.unsplash.com/photo-1481627834876-b7833e8f5570?auto=format&fit=crop&w=1600&q=80')
        center / cover no-repeat fixed,
        var(--cream);
}

.container {
    max-width: 700px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    /* transform: scale(0.79);
    transform-origin: top center; */
}

.container.wide {
    max-width: 1100px;
}


.header {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
    color: var(--cream);
    padding: 1.75rem 2rem;
    position: relative;
    overflow: hidden;
}
 
/* Subtle decorative shape in the header */
.header::after {
    content: "";
    position: absolute;
    right: -40px;
    top: -40px;
    width: 160px;
    height: 160px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 50%;
    pointer-events: none;
}
 
.header .logo {
   width: 34%;
    height: 64px;
    flex-shrink: 0;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.25));
    z-index: 1;
}
 
.header .header-text { z-index: 1; }


.header h1 {
    font-size: 1.2rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}
 
.header p {
    margin-top: 0.25rem;
    font-size: 0.9rem;
    opacity: 0.9;
}
 
@media (max-width: 540px) {
    .header { padding: 1.25rem 1.25rem; gap: 0.9rem; }
    .header .logo { width: 48px; height: 48px; }
    .header h1 { font-size: 1.25rem; }
}



.body {
    padding: 2rem;
}

/* ---------- Form fields ---------- */

.field {
    margin-bottom: 1.25rem;
}

.field label {
    display: block;
    margin-bottom: 0.4rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--brand);
    letter-spacing: 0.02em;
}

.field label .req {
    color: var(--error);
    margin-left: 2px;
}

.field label .optional {
    color: var(--muted);
    font-weight: 400;
    font-size: 0.78rem;
    margin-left: 4px;
    text-transform: lowercase;
    letter-spacing: 0;
}

.field input,
.field select,
.field textarea {
    width: 100%;
    padding: 0.7rem 0.9rem;
    font-family: inherit;
    font-size: 1rem;
    color: var(--text);
    background: #fff;
    border: 1.5px solid var(--border);
    border-radius: 6px;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(162, 62, 43, 0.12);
}

.field.invalid input,
.field.invalid select {
    border-color: var(--error);
    background: #fdf3f1;
}

.field .error-msg {
    display: none;
    margin-top: 0.35rem;
    font-size: 0.8rem;
    color: var(--error);
}

.field.invalid .error-msg {
    display: block;
}

.row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

@media (max-width: 540px) {
    .row { grid-template-columns: 1fr; }
}

/* ---------- Buttons ---------- */

.btn {
    display: inline-block;
    padding: 0.75rem 1.6rem;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--cream);
    background: var(--brand);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s, transform 0.1s;
}

.btn:hover  { background: var(--brand-dark); }
.btn:active { transform: translateY(1px); }

.btn.secondary {
    background: transparent;
    color: var(--brand);
    border: 1.5px solid var(--brand);
}
.btn.secondary:hover {
    background: var(--brand);
    color: var(--cream);
}

.actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

/* ---------- Alerts ---------- */

.alert {
    padding: 0.85rem 1rem;
    border-radius: 6px;
    margin-bottom: 1.25rem;
    font-size: 0.9rem;
}

.alert.success {
    background: #e8f5e9;
    color: var(--success);
    border-left: 4px solid var(--success);
}

.alert.error {
    background: #fdecea;
    color: var(--error);
    border-left: 4px solid var(--error);
}

.alert ul { margin-top: 0.5rem; padding-left: 1.25rem; }

/* ---------- Report table ---------- */

.toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.25rem;
}

.stat {
    font-size: 0.9rem;
    color: var(--muted);
}

.stat strong { color: var(--brand); font-size: 1.05rem; }

table.data {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

table.data th,
table.data td {
    padding: 0.7rem 0.9rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

table.data th {
    background: var(--cream);
    color: var(--brand);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
}

table.data tbody tr:hover { background: #fafaf8; }

.empty {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--muted);
}

.footer-link {
    margin-top: 1.5rem;
    text-align: center;
    font-size: 0.85rem;
    color: var(--muted);
}

.footer-link a { color: var(--brand); text-decoration: none; font-weight: 600; }
.footer-link a:hover { text-decoration: underline; }


.alert.closed {
    background: linear-gradient(135deg, #fdecea 0%, #fbe4d9 100%);
    color: var(--brand-dark);
    border-left: 6px solid var(--brand);
    padding: 1.5rem 1.75rem;
    text-align: center;
}
.alert.closed strong {
    display: block;
    font-size: 1.15rem;
    margin-bottom: 0.4rem;
    letter-spacing: 0.02em;
}
.alert.closed p { font-size: 0.95rem; opacity: 0.85; }


.deadline-notice {
    background: var(--cream);
    border: 1px dashed var(--brand);
    color: var(--brand);
    padding: 0.6rem 1rem;
    border-radius: 6px;
    margin-bottom: 1.25rem;
    font-size: 0.85rem;
    text-align: center;
    letter-spacing: 0.02em;
}
.deadline-notice strong { font-size: 0.95rem; }


 
/* ---------- Hall-ticket lookup section ---------- */
.section-title {
    color: var(--brand);
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}
.section-desc {
     color: var(--muted);
    font-size: 0.85rem;
    margin-bottom: 1.25rem;
}
 
.lookup-result {
  background: var(--cream);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.25rem 1.5rem;
    margin-top: 1.5rem;
}
.lookup-result h4 {
    color: var(--brand);
    margin-bottom: 0.85rem;
    font-size: 1rem;
}
 
.result-table {
   width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
    margin-bottom: 1rem;
}
.result-table th,
.result-table td {
    padding: 0.55rem 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}
.result-table th {
    color: var(--brand);
    font-weight: 600;
    width: 40%;
}
.result-table td { font-weight: 500; }
 
.pass-yes { color: var(--success); font-weight: 700; }
.pass-no  { color: var(--error);   font-weight: 700; }
 
/* Readonly inputs — visually distinct so users know they can't edit. */
.field input[readonly] {
    background: #f5f3ef;
    color: #555;
    cursor: not-allowed;
}
 
.alert ul { margin-top: 0.5rem; padding-left: 1.25rem; }