﻿@import url('https://fonts.googleapis.com/css2?family=Source+Serif+4:wght@400;600&family=Source+Sans+3:wght@300;400;600;700&display=swap');

/* ================================================================
   ISAS Admin Stylesheet  —  Refined Institutional Design
   Mirrors surv.css treatment; admin-specific layout preserved.
   ================================================================ */

/* --- Custom / licensed fonts (unchanged) --- */
@font-face {
    font-family: "pelita";
    src: url("../Pelita.otf");
}
@font-face {
    font-family: "cerebri";
    src: url("../CerebriSansPro.otf");
}
@font-face {
    font-family: "cerebribold";
    src: url("../CerebriSansPro-Bold.otf");
}
@font-face {
    font-family: "tafel";
    src: url("../tafel.woff");
}
@font-face {
    font-family: "spartan";
    src: url("../leaguespartan.woff");
}

/* ================================================================
   CSS Variables  (same palette as surv.css)
   ================================================================ */
:root {
    --blue:        #01347b;
    --blue-light:  #e8eef8;
    --blue-subtle: #f4f7fc;
    --text:        #1a1a2e;
    --text-mid:    #3a3a55;
    --text-muted:  #6b7a99;
    --border:      #cdd5e3;
    --border-dark: #9aaac4;
    --white:       #ffffff;
    --radius-sm:   4px;
    --radius-md:   6px;
    --shadow-sm:   0 1px 3px rgba(0,0,0,0.08);
    --shadow-md:   0 3px 10px rgba(0,0,0,0.11);
    --shadow-lg:   0 6px 24px rgba(0,0,0,0.14);
    --font-body:   'Source Sans 3', 'Segoe UI', sans-serif;
    --font-serif:  'Source Serif 4', Georgia, serif;
    --transition:  0.18s ease;
}

/* ================================================================
   Base
   ================================================================ */
*, *::before, *::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    background-color: #ffffff;
    overflow-x: auto;
    font-family: var(--font-body);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: var(--blue);
}

ul li {
    margin-bottom: .75em;
}

h3, h4 {
    display: inline-block;
    font-family: var(--font-serif);
    color: var(--text);
    letter-spacing: -0.01em;
}

p {
    margin: 2px;
}

table {
    border-collapse: collapse;
}

/* ================================================================
   Page title  ("ISAS Administrator Page")
   Previously inline on <h1> in .asp: font-family calibri, float right,
   font-size 34px. Now defined here.
   ================================================================ */
h1.page-title,
#header h1 {
    margin: 0;
    position: relative;
    top: 100px;
    right: 30px;
    float: right;
    font-family: var(--font-body);
    font-size: 28px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.01em;
}

/* ================================================================
   .regtext  — main content wrapper
   ================================================================ */
.regtext {
    font-family: var(--font-body);
    font-size: 16px;
    margin: 15px;
    color: var(--text-mid);
}

/* ================================================================
   .surveytext
   ================================================================ */
.surveytext {
    font-family: var(--font-body);
    font-size: 14px;
    padding: 0;
    margin-top: 0;
    margin-bottom: 0;
    color: var(--text-mid);
}

/* ================================================================
   Logo
   ================================================================ */
.logo {
    position: relative;
    padding: 6px;
    width: 200px;
}

/* ================================================================
   Content layout
   ================================================================ */
.contenttd {
    margin-top: 20px;
}
.contenttbl {
    display: flex;
    flex-direction: row;
    min-height: calc(100vh - 212px);
}

/* ================================================================
   Header  (#header)
   Admin pages use normal flow (not fixed), with border-bottom.
   The margin-bottom and border-bottom remain inline in the .asp.
   ================================================================ */
#header {
    background-color: #ffffff;
}

/* ================================================================
   Header bar  (.headerbar)
   background-color injected inline from hexcolor in .asp files.
   Font/color defined here so inline style tag can be removed.
   ================================================================ */
.headerbar {
    border: none;
    position: absolute;
    top: 25px;
    right: 0px;
    height: 47px;
    width: 100%;
    /* background-color: #<%=hexcolor%>  — set inline in .asp */
    background-color: var(--blue);   /* fallback only */
    box-shadow: 0 3px 8px rgba(0,0,0,0.18);
    /* typography — previously inline in resp.asp / comp.asp */
    font-family: var(--font-body);
    font-size: 28px;
    font-weight: 700;
    color: #ffffff;
    text-align: center;
    letter-spacing: 0.04em;
}

/* ================================================================
   Header tabs
   ================================================================ */
/* Inactive tab — ghost style: white text on the colored bar,
   no visible box, subtle pill background on hover             */
.headertab {
    border: none;
    padding: 0 18px;
    height: 36px;
    width: auto;
    min-width: 160px;
    background-color: transparent;
    border-radius: 18px;
    color: rgba(255, 255, 255, 0.78);
    text-align: center;
    font-family: var(--font-body);
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background-color var(--transition), color var(--transition);
}
.headertab:hover {
    background-color: rgba(255, 255, 255, 0.18);
    color: #ffffff;
}

/* Active tab — solid white pill that sits cleanly on the bar  */
.headertabhl {
    border: none;
    padding: 0 18px;
    height: 36px;
    width: auto;
    min-width: 160px;
    background-color: #ffffff;
    border-radius: 18px;
    color: black;
    text-align: center;
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 15px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}

/* ================================================================
   Form inputs
   ================================================================ */
input[type=text],
input[type=number],
input[type=email],
input[type=date],
input[type=password],
select,
textarea {
    float: right;
    display: block;
    margin: 4px;
    padding: 5px 9px;
    min-height: 12px;
    font-size: 16px;
    font-family: var(--font-body);
    color: var(--text);
    background-color: #ffffff;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    outline: none;
    box-shadow: var(--shadow-sm);
    transition: border-color var(--transition), box-shadow var(--transition);
}
input[type=text]:focus,
input[type=number]:focus,
input[type=email]:focus,
input[type=date]:focus,
input[type=password]:focus,
select:focus,
textarea:focus {
    /* border/outline-color also injected inline from hexcolor */
    border-color: var(--blue);
    outline: none;
    box-shadow: 0 0 0 3px rgba(1,52,123,0.12);
}

/* ================================================================
   Data tables  (.resptable / .idtable / .comptable)
   ================================================================ */
.resptable td {
    font-size: 14px;
    font-weight: 600;
    border: 1px solid var(--border);
    width: 120px;
    padding: 4px 6px;
    text-align: center;
    color: var(--text);
}

.idtable td {
    font-size: 14px;
    font-weight: 600;
    border: 1px solid var(--border);
    padding: 4px 8px;
    height: 24px;
    color: var(--text);
}

.comptable td {
    font-size: 14px;
    font-weight: 600;
    border: 1px solid var(--border);
    padding: 4px 6px;
    width: 90px;
    height: 24px;
    text-align: center;
    color: var(--text);
}

/* ================================================================
   Glass effect
   ================================================================ */
.glass,
.glasscheck {
    position: relative;
    display: inline-block;
}
.glass:after {
    content: '';
    position: absolute;
    width: 100%;
    top: 0px;
    left: 0px;
    height: 50%;
    background: linear-gradient(rgba(213,214,214,0.4), rgba(213,214,214,0.0));
    pointer-events: none;
}
.glasscheck:after {
    content: '';
    position: absolute;
    width: 20px;
    top: 0px;
    left: 0px;
    height: 11px;
    background: linear-gradient(rgba(213,214,214,0.4), rgba(213,214,214,0.0));
    pointer-events: none;
}

/* ================================================================
   Answer reveal
   ================================================================ */
.answer {
    position: relative;
    top: -40px;
    opacity: 0;
    transition: opacity 0.25s ease, top 0.25s ease;
}
.answershow {
    position: relative;
    top: 8px;
    opacity: 1;
    transition: opacity 0.25s ease, top 0.25s ease;
}

/* ================================================================
   Info box
   ================================================================ */
.infobox {
    border: 1px solid var(--border);
    border-left: 4px solid var(--blue);
    background-color: var(--blue-subtle);
    margin-bottom: 28px;
    padding: 12px 16px;
    line-height: 1.65;
    max-width: 95%;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    box-shadow: var(--shadow-sm);
    color: var(--text-mid);
    font-size: 15px;
}

/* ================================================================
   Form sections
   ================================================================ */
.orderrow {
    display: flex;
    flex-direction: row;
    padding: 0;
    width: calc(100vw - 200px);
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
}

.formsection {
    position: relative;
    max-width: 95%;
    /* border-bottom color injected inline from hexcolor in .asp */
    border-bottom: 3px solid var(--blue);   /* fallback */
    padding-bottom: 18px;
    margin-bottom: 6px;
}

.contactsection {
    width: 555px;
    position: relative;
    border-right: 2px solid var(--border);
    padding-right: 15px;
    margin: 15px;
}

/* ================================================================
   Toggle switch
   ================================================================ */
.switch {
    position: relative;
    top: 2px;
    display: inline-block;
    width: 35px;
    height: 20px;
}
.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 1px;
    /* background-color injected inline from hexcolor */
    background-color: var(--blue);
    border-radius: 20px;
    transition: background-color 0.3s;
}
.slider:before {
    position: absolute;
    content: "";
    height: 10px;
    width: 10px;
    left: 5px;
    bottom: 5px;
    background-color: #ffffff;
    border-radius: 50%;
    transition: transform 0.15s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
input:checked + .slider:before {
    transform: translateX(15px);
}

/* ================================================================
   Custom radio / checkbox  (.radiostyle)
   ================================================================ */
.radiostyle {
    display: inline-block;
    position: relative;
    padding-left: 25px;
    user-select: none;
    cursor: pointer;
}
.radiostyle input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.radiocheck {
    position: absolute;
    top: 0; left: 0;
    height: 20px;
    width: 20px;
    /* background-color injected inline from hexcolor */
    background-color: var(--blue);
    border-radius: 3px;
    cursor: pointer;
    transition: filter var(--transition);
}
.radiostyle:hover .radiocheck {
    filter: brightness(1.15);
}
.radiocheck:after {
    content: "";
    position: absolute;
    display: none;
}
.radiostyle input:checked ~ .radiocheck:after {
    display: block;
}
.radiostyle .radiocheck:after {
    top: 5px;
    left: 5px;
    width: 10px;
    height: 10px;
    background: #ffffff;
}

.realradio {
    border-radius: 20px;
}
.radiostyle .realradio:after {
    border-radius: 5px;
}

.realcheck {
    /* square check variant */
}
.radiostyle .realcheck:after {
    top: 2px;
    left: 6px;
    width: 5px;
    transform: rotate(45deg);
    background: transparent;
    border-bottom: 3px solid #ffffff;
    border-right: 3px solid #ffffff;
}

/* checkmark variant */
.checkmark {
    position: absolute;
    top: 0; left: 0;
    height: 20px;
    width: 20px;
    background-color: var(--blue);
    border-radius: 3px;
}
.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}
.radiostyle input:checked ~ .checkmark:after {
    display: block;
}
.radiostyle .checkmark:after {
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid #ffffff;
    border-width: 0 3px 3px 0;
    transform: rotate(45deg);
}

/* ================================================================
   Buttons
   background-color injected inline from hexcolor in .asp files.
   ================================================================ */
.btn {
    position: relative;
    /* background-color: #<%=hexcolor%>  — set inline in .asp */
    background-color: var(--blue);   /* fallback only */
    color: #ffffff;
    padding: 8px 20px;
    cursor: pointer;
    text-align: center;
    font-weight: 700;
    font-size: 16px;
    font-family: var(--font-body);
    letter-spacing: 0.02em;
    border-radius: var(--radius-md);
    border: none;
    box-shadow: var(--shadow-md);
    transition: filter var(--transition), box-shadow var(--transition), transform var(--transition);
    user-select: none;
}
.btn:hover {
    filter: brightness(1.12);
    box-shadow: var(--shadow-lg);
    transform: translateY(-1px);
}
.btn:active {
    transform: translateY(0);
    filter: brightness(0.94);
    box-shadow: var(--shadow-sm);
}

.smallbtn {
    position: relative;
    background-color: var(--blue);   /* fallback only */
    color: #ffffff;
    padding: 3px 10px;
    cursor: pointer;
    text-align: center;
    font-weight: 600;
    font-size: 13px;
    font-family: var(--font-body);
    letter-spacing: 0.02em;
    border-radius: var(--radius-sm);
    border: none;
    box-shadow: var(--shadow-sm);
    transition: filter var(--transition);
    user-select: none;
}
.smallbtn:hover {
    filter: brightness(1.15);
}

/* ================================================================
   Tooltip
   ================================================================ */
i.fa-question-circle {
    color: var(--blue);
    background-color: #ffffff;
    font-size: 24px;
    border: 1px solid var(--blue);
    border-radius: 50%;
    position: relative;
    display: inline-block;
    cursor: help;
    transition: filter var(--transition);
}
i.fa-question-circle:hover {
    filter: brightness(1.2);
}

.tooltip {
    position: relative;
    display: inline-block;
}
.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
    z-index: 200;
}
/* Single-class selector so the .asp inline style block's
   .tooltiptext { background-color: #hexcolor } wins       */
.tooltiptext {
    visibility: hidden;
    opacity: 0;
    transform: translateY(-4px);
    font-family: var(--font-body);
    font-size: 14px;
    width: 800px;
    max-width: 75vw;
    /* background-color: #<%=hexcolor%>  — injected inline in .asp */
    background-color: var(--blue);   /* fallback only */
    color: #ffffff;
    text-align: left;
    padding: 8px 12px;
    border-radius: var(--radius-md);
    position: absolute;
    left: 30px;
    top: -3px;
    box-shadow: var(--shadow-lg);
    line-height: 1.55;
    transition: opacity 0.18s ease, transform 0.18s ease;
}
.tooltiptext:after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: calc(100% - 4px);
    height: 80%;
    background: linear-gradient(rgba(255,255,255,.18), rgba(255,255,255,0));
    pointer-events: none;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
}
