@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@400;600;700;800&display=swap');

:root {
    --navy: #122a43;
    --blue: #2463eb;
    --ink: #19283a;
    --muted: #778499;
    --line: #e4eaf2;
    --bg: #f5f7fb;
    --green: #16845e
}

* {
    box-sizing: border-box
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font: 14px "DM Sans", sans-serif
}

.hidden {
    display: none !important
}

button,
input,
select,
textarea {
    font: inherit
}

button {
    cursor: pointer
}

button:focus-visible,
input:focus-visible,
select:focus-visible {
    outline: 3px solid #b7ceff;
    outline-offset: 2px
}

.layout {
    min-height: 100vh
}

.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: 235px;
    background: var(--navy);
    color: #fff;
    padding: 25px 17px;
    display: flex;
    flex-direction: column
}

.brand {
    display: flex;
    gap: 11px;
    align-items: center;
    text-decoration: none;
    color: #fff;
    margin: 0 7px 35px
}

.brand b {
    background: #f2c66b;
    color: var(--navy);
    border-radius: 12px;
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    font: 800 23px Manrope
}

.brand strong,
.brand small {
    display: block;
    letter-spacing: 1px
}

.brand strong {
    font: 800 13px Manrope
}

.brand small {
    font-size: 9px;
    opacity: .65;
    margin-top: 4px
}

.label {
    color: #8492a5;
    font-size: 10px;
    letter-spacing: 1.4px;
    font-weight: 700
}

.sidebar .label {
    padding-left: 10px
}

.sidebar nav {
    display: grid;
    gap: 6px;
    margin-top: 10px
}

.sidebar nav button {
    background: transparent;
    border: 0;
    color: #c0cada;
    text-align: left;
    border-radius: 9px;
    padding: 13px;
    font-weight: 600;
    font-size: 12px
}

.sidebar nav button:hover,
.sidebar nav button.active {
    background: #27445f;
    color: white
}

.sidefoot {
    margin-top: auto;
    border-top: 1px solid #30465e;
    padding: 17px 5px 0;
    display: flex;
    gap: 9px;
    align-items: center;
    font-size: 11px
}

.sidefoot>span {
    color: #57d09d
}

.sidefoot small,
.sidefoot b {
    display: block
}

.sidefoot small {
    color: #aab8c8;
    margin-top: 4px;
    font-size: 10px
}

.sidefoot button {
    display: block;
    margin-top: 12px;
    background: none;
    border: 1px solid #50657a;
    color: white;
    padding: 8px;
    border-radius: 7px
}

.main-area,
main {
    margin-left: 235px;
    padding: 0 32px 20px;
    max-width: 1700px
}

header {
    height: 96px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--line);
    margin-bottom: 25px
}

h1 {
    font: 800 23px Manrope;
    margin: 6px 0 0
}

h2 {
    font: 800 27px Manrope;
    letter-spacing: -.5px;
    margin: 9px 0
}

h3 {
    font: 800 16px Manrope;
    margin: 12px 0
}

.headright,
.rowbetween,
.row {
    display: flex;
    align-items: center;
    gap: 12px
}

.rowbetween {
    justify-content: space-between
}

.identity {
    font-weight: 700;
    font-size: 11px
}

.pill {
    background: #fff0d4;
    color: #936615;
    padding: 7px 11px;
    border-radius: 30px;
    font-size: 10px;
    font-weight: 700;
    white-space: nowrap
}

.pill.open {
    background: #ddf7eb;
    color: #13744f
}

.pill.closed {
    background: #ffe8eb;
    color: #a53444
}

.hero {
    background: linear-gradient(110deg, #183653, #2b567a);
    border-radius: 17px;
    color: #fff;
    padding: 32px 38px;
    margin-bottom: 25px
}

.hero>small {
    color: #f2c66b;
    letter-spacing: 1.5px;
    font-weight: 700
}

.hero h2 {
    font-size: 36px;
    max-width: 570px;
    line-height: 1.15
}

.hero em {
    font-style: normal;
    color: #f2c66b
}

.hero p {
    color: #c6d2e0;
    line-height: 1.6
}

.hero div {
    font-size: 11px;
    color: #e0e8f1;
    margin-top: 22px
}

.authgrid {
    display: grid;
    grid-template-columns: .8fr 1.2fr;
    gap: 35px;
    padding: 10px 3% 30px
}

.authgrid>div:first-child {
    padding-top: 28px
}

.authgrid p {
    line-height: 1.7
}

.muted {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.6
}

.warning {
    background: #fff7e5;
    color: #8a6829;
    border: 1px solid #f1e0b9;
    border-radius: 9px;
    padding: 12px;
    font-size: 11px;
    line-height: 1.5
}

.panel,
.metrics article {
    background: white;
    border: 1px solid #e7edf4;
    border-radius: 14px;
    padding: 22px;
    box-shadow: 0 8px 24px #19283a08
}

.tabs {
    display: flex;
    gap: 14px;
    border-bottom: 1px solid var(--line);
    margin-bottom: 20px;
    overflow: auto
}

.tabs button {
    border: 0;
    background: none;
    color: #7d8a9d;
    font-size: 11px;
    font-weight: 700;
    padding: 0 0 12px;
    white-space: nowrap
}

.tabs button.active {
    color: var(--blue);
    border-bottom: 2px solid var(--blue)
}

.stack {
    display: grid;
    gap: 13px
}

.stack label {
    display: grid;
    gap: 7px;
    font-size: 11px;
    font-weight: 700;
    color: #45556a
}

.stack input,
.stack select,
.stack textarea {
    width: 100%;
    min-width: 0;
    border: 1px solid #dce4ed;
    border-radius: 8px;
    padding: 11px;
    background: white;
    color: var(--ink);
    font-size: 12px
}

.primary,
.outline,
.danger {
    border-radius: 8px;
    padding: 11px 15px;
    font-size: 11px;
    font-weight: 700;
    border: 1px solid transparent
}

.primary {
    background: var(--blue);
    color: white
}

.primary:hover {
    background: #164fcf
}

.outline {
    background: white;
    color: #465970;
    border-color: #d7e0eb
}

.danger {
    background: #fff0f1;
    color: #a63240;
    border-color: #ffd5da
}

.full {
    width: 100%
}

.metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin: 20px 0
}

.metrics.three {
    grid-template-columns: repeat(3, minmax(0, 1fr))
}

.metrics article {
    padding: 18px
}

.metrics small,
.metrics span {
    display: block;
    color: var(--muted);
    font-size: 10px
}

.metrics strong {
    display: block;
    font: 800 27px Manrope;
    margin: 12px 0 5px;
    overflow-wrap: anywhere
}

.twocol {
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    gap: 16px;
    margin: 20px 0
}

.schedule {
    display: flex;
    gap: 25px;
    border-top: 1px solid var(--line);
    padding-top: 15px;
    margin-top: 18px;
    flex-wrap: wrap
}

.schedule small,
.schedule b {
    display: block
}

.schedule small {
    font-size: 10px;
    color: var(--muted);
    margin-bottom: 5px
}

.schedule b {
    font-size: 11px
}

.blueText {
    color: var(--blue);
    font-size: 11px
}

.ballotmeta {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 12px;
    margin: 20px 0
}

.ballotmeta>div {
    display: grid;
    gap: 6px
}

.ballotmeta>div+div {
    border-left: 1px solid var(--line);
    padding-left: 16px
}

.ballotmeta small {
    font-size: 10px;
    color: var(--muted)
}

.ballotmeta b {
    font-size: 11px
}

.position {
    background: white;
    border: 1px solid var(--line);
    border-radius: 13px;
    margin-bottom: 16px;
    overflow: hidden
}

.positionhead {
    background: #fbfcfe;
    border-bottom: 1px solid var(--line);
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    gap: 10px
}

.positionhead h3 {
    margin: 0 0 5px
}

.positionhead p {
    margin: 0;
    color: var(--muted);
    font-size: 11px
}

.options {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 11px;
    padding: 14px
}

.option {
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 14px;
    cursor: pointer;
    min-width: 0
}

.option.selected {
    border: 1.5px solid var(--blue);
    background: #f4f7ff
}

.option input {
    float: right;
    accent-color: var(--blue)
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: #e9f0ff;
    color: #315db4;
    display: grid;
    place-items: center;
    font: 800 14px Manrope;
    margin-bottom: 11px
}

.option h4 {
    font: 800 12px Manrope;
    margin: 0 0 6px;
    overflow-wrap: anywhere
}

.option p {
    font-size: 10px;
    color: var(--muted);
    line-height: 1.5;
    margin: 0
}

.tag {
    display: inline-block;
    background: #eaf0ff;
    color: #4a69a6;
    border-radius: 5px;
    padding: 4px 6px;
    font-size: 9px;
    margin-top: 10px
}

.submitrow {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px
}

.submitrow p {
    margin: 5px 0 0
}

.results {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-top: 15px
}

.resultcard {
    border: 1px solid var(--line);
    border-radius: 11px;
    padding: 18px;
    min-width: 0
}

.resulthead {
    display: flex;
    justify-content: space-between;
    gap: 8px
}

.resulthead h3 {
    margin: 0 0 5px
}

.resulthead p {
    font-size: 10px;
    color: var(--muted);
    margin: 0
}

.leader {
    background: #ddf7eb;
    color: #13744f;
    padding: 5px 7px;
    border-radius: 5px;
    font-size: 9px;
    white-space: nowrap;
    height: max-content
}

.barrow {
    margin: 15px 0
}

.barlabels {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    font-size: 11px;
    margin-bottom: 7px
}

.barlabels b {
    overflow-wrap: anywhere
}

.barlabels span {
    white-space: nowrap;
    color: #69778b
}

.track {
    height: 7px;
    background: #edf1f6;
    border-radius: 9px;
    overflow: hidden
}

.fill {
    height: 100%;
    background: #3169e8;
    border-radius: 9px
}

.barrow.leading .fill {
    background: #168b63
}

.adminTabs {
    margin-top: 25px
}

.adminTabs button {
    padding: 13px 10px
}

.candidateRow {
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid var(--line);
    padding: 10px;
    border-radius: 9px;
    margin: 9px 0
}

.candidateRow .avatar {
    margin: 0;
    flex-shrink: 0
}

.candidateInfo {
    flex: 1;
    min-width: 0
}

.candidateInfo b,
.candidateInfo small {
    display: block;
    overflow-wrap: anywhere
}

.candidateInfo b {
    font-size: 11px
}

.candidateInfo small {
    font-size: 10px;
    color: var(--muted);
    margin-top: 4px
}

.mini {
    font-size: 10px;
    padding: 6px 7px;
    background: white;
    border: 1px solid var(--line);
    border-radius: 5px
}

.check {
    display: flex !important;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 9px !important
}

.check input {
    width: auto
}

.tablewrap {
    overflow: auto
}

table {
    border-collapse: collapse;
    width: 100%;
    font-size: 11px;
    text-align: left
}

td,
th {
    padding: 12px;
    border-bottom: 1px solid var(--line);
    white-space: nowrap
}

th {
    background: #f8fafc;
    color: var(--muted);
    font-size: 10px
}

footer {
    border-top: 1px solid var(--line);
    padding-top: 16px;
    margin-top: 30px;
    display: flex;
    justify-content: space-between;
    gap: 10px;
    color: #9aa5b3;
    font-size: 10px
}

.notice {
    padding: 12px 14px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 12px;
    line-height: 1.5
}

.notice.success {
    background: #e2f7ed;
    color: #13724f
}

.notice.error {
    background: #fff0f1;
    color: #a63240
}

.notice.info {
    background: #edf3ff;
    color: #2455ad
}

.notice.warn {
    background: #fff4dc;
    color: #8c6515
}

.backdrop {
    position: fixed;
    inset: 0;
    background: #10243dcc;
    display: grid;
    place-items: center;
    padding: 20px;
    z-index: 10
}

.modal {
    background: white;
    border-radius: 16px;
    padding: 27px;
    width: min(470px, 100%)
}

.modal h2 {
    font-size: 22px
}

.summaryitem {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    background: #f7f9fc;
    padding: 10px;
    border-radius: 7px;
    margin: 7px 0;
    font-size: 11px
}

.summaryitem span {
    color: var(--muted)
}

.end {
    justify-content: flex-end;
    margin-top: 20px
}

hr {
    border: 0;
    border-top: 1px solid var(--line);
    margin: 22px 0
}

.empty {
    padding: 18px;
    color: var(--muted);
    font-size: 11px
}

.admin-only,
.student-only {
    display: none
}

body.role-admin .admin-only {
    display: block
}

body.role-student .student-only {
    display: inline-flex
}

body.role-admin .student-only {
    display: none
}

@media(max-width:1050px) {
    .sidebar {
        width: 205px
    }

    main {
        margin-left: 205px;
        padding: 0 20px
    }

    .metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr))
    }

    .authgrid {
        gap: 20px
    }

    .options {
        grid-template-columns: repeat(2, minmax(0, 1fr))
    }
}

@media(max-width:720px) {
    .sidebar {
        position: static;
        width: auto;
        padding: 13px
    }

    .brand {
        margin: 0
    }

    .sidebar .label,
    .sidefoot {
        display: none
    }

    .sidebar nav {
        display: flex;
        overflow: auto;
        margin-top: 12px
    }

    .sidebar nav button {
        white-space: nowrap;
        padding: 10px
    }

    .sidebar nav button.admin-only,
    .sidebar nav button.student-only {
        display: none
    }

    body.role-admin .sidebar nav button.admin-only,
    body.role-student .sidebar nav button.student-only {
        display: block
    }

    main {
        margin: 0;
        padding: 0 13px 18px
    }

    header {
        height: 78px;
        margin-bottom: 17px
    }

    h1 {
        font-size: 18px
    }

    .identity {
        display: none
    }

    .hero {
        padding: 25px 21px
    }

    .hero h2 {
        font-size: 29px
    }

    .hero div {
        line-height: 1.8
    }

    .authgrid,
    .twocol {
        grid-template-columns: 1fr;
        gap: 14px
    }

    .authgrid>div:first-child {
        padding-top: 4px
    }

    .authgrid h2 {
        font-size: 23px
    }

    .panel {
        padding: 17px
    }

    .metrics {
        gap: 9px
    }

    .metrics article {
        padding: 14px
    }

    .metrics strong {
        font-size: 23px
    }

    .rowbetween {
        align-items: flex-start;
        flex-wrap: wrap
    }

    .rowbetween h2 {
        font-size: 23px
    }

    .ballotmeta {
        grid-template-columns: 1fr
    }

    .ballotmeta>div+div {
        border-left: 0;
        border-top: 1px solid var(--line);
        padding: 10px 0 0
    }

    .options {
        grid-template-columns: 1fr 1fr;
        padding: 9px
    }

    .option {
        padding: 10px
    }

    .submitrow {
        align-items: stretch;
        flex-direction: column
    }

    .submitrow button {
        width: 100%
    }

    .results {
        grid-template-columns: 1fr
    }

    .metrics.three {
        grid-template-columns: repeat(3, minmax(0, 1fr))
    }

    .metrics.three strong {
        font-size: 21px
    }

    .authgrid .panel {
        padding: 16px
    }

    .row {
        flex-wrap: wrap
    }

    footer {
        flex-direction: column
    }

    .adminTabs {
        overflow: auto
    }

    .adminTabs button {
        white-space: nowrap
    }
}

@media(max-width:380px) {
    .options {
        grid-template-columns: 1fr
    }

    .metrics.three {
        grid-template-columns: 1fr 1fr
    }

    .hero h2 {
        font-size: 26px
    }
}

/* Candidate grid */
.candidategrid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 22px;
    padding: 18px 0;
}

/* Candidate card */
.candidate {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 25px 18px;
    background: #ffffff;
    border: 2px solid #e5eaf2;
    border-radius: 18px;
    text-align: center;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.25s ease;
}

/* Circular candidate photo */
.candidate-photo {
    display: block;
    width: 155px;
    height: 155px;
    min-width: 155px;
    object-fit: cover;
    object-position: center;
    border-radius: 50%;
    border: none;
    outline: none;
    margin: 0 auto 18px;
    padding: 0;
    background: #eef2f7;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.12);
}

/* Candidate name */
.candidate b {
    display: block;
    width: 100%;
    margin: 5px 0 8px;
    color: #172554;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.5;
}

/* Candidate manifesto */
.candidate p {
    margin: 0;
    color: #64748b;
    font-size: 13px;
    line-height: 1.7;
}

/* Radio selection */
.candidate input[type="radio"] {
    width: 19px;
    height: 19px;
    accent-color: #2563eb;
    cursor: pointer;
    margin: 0 0 12px;
}

/* Hover effect */
.candidate:hover {
    border-color: #93b4ff;
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.10);
}

/* Beautiful selected-candidate design */
.candidate:has(input[type="radio"]:checked) {
    border: 2px solid #2563eb;
    background: linear-gradient(145deg, #eff6ff, #ffffff);
    box-shadow: 0 10px 28px rgba(37, 99, 235, 0.18);
    transform: translateY(-3px);
}

/* Highlight selected candidate's name */
.candidate:has(input[type="radio"]:checked) b {
    color: #1d4ed8;
}

/* Selected candidate photo */
.candidate:has(input[type="radio"]:checked) .candidate-photo {
    box-shadow: 0 0 0 5px #dbeafe,
        0 0 0 8px #2563eb;
}

/* Keyboard accessibility */
.candidate:has(input[type="radio"]:focus-visible) {
    outline: 3px solid #93c5fd;
    outline-offset: 3px;
}

/* Mobile layout */
@media (max-width: 600px) {
    .candidategrid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .candidate-photo {
        width: 140px;
        height: 140px;
        min-width: 140px;
    }
}

/* =================================
   AMADIOUS COLLEGE HEADER
================================= */

header {
    background: linear-gradient(135deg, #071b3a, #123c70);
    color: #ffffff;
    padding: 22px 35px;
    border-bottom: 4px solid #d4af37;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.12);
}

header h1 {
    color: #ffffff;
    font-size: 27px;
    font-weight: 800;
    letter-spacing: 0.5px;
    margin: 5px 0;
}

header .label {
    color: #e5c76b;
    font-weight: 700;
    letter-spacing: 2px;
    font-size: 11px;
}

.headright {
    display: flex;
    align-items: center;
    gap: 14px;
}

.pill {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.25);
    padding: 9px 16px;
    border-radius: 30px;
    font-size: 12px;
    font-weight: 700;
}

/* =================================
   AMADIOUS COLLEGE FOOTER
================================= */

footer {
    background: linear-gradient(135deg, #071b3a, #0d2c52);
    color: #dbe5f2;
    padding: 30px 20px;
    margin-top: 45px;
    text-align: center;
    border-top: 4px solid #d4af37;
    font-size: 13px;
    line-height: 1.8;
}

footer::before {
    content: "AMADIOUS COLLEGE";
    display: block;
    color: #e5c76b;
    font-size: 18px;
    font-weight: 800;
    letter-spacing: 3px;
    margin-bottom: 8px;
}

footer span {
    display: block;
    margin-top: 5px;
    color: #9fb4d0;
    font-size: 12px;
}

/* =================================
   RESPONSIVE DESIGN
================================= */

@media (max-width: 768px) {
    header {
        padding: 18px;
    }

    header h1 {
        font-size: 21px;
    }

    .headright {
        flex-wrap: wrap;
        gap: 8px;
    }

    footer {
        padding: 25px 15px;
    }
}

/* ==========================================
   AMADIOUS COLLEGE - ADMIN DASHBOARD
   Professional Navy & Gold Theme
========================================== */

:root {
    --admin-navy: #102747;
    --admin-blue: #1d4ed8;
    --admin-gold: #d4af37;
    --admin-bg: #f3f6fb;
    --admin-white: #ffffff;
    --admin-text: #1e293b;
    --admin-muted: #64748b;
    --admin-border: #e2e8f0;
    --admin-radius: 16px;
    --admin-shadow: 0 5px 20px rgba(15, 23, 42, 0.06);
}

/* Dashboard background */

body {
    background: var(--admin-bg);
    color: var(--admin-text);
    font-family: "Inter", "Segoe UI", Arial, sans-serif;
}

/* ==========================================
   SIDEBAR
========================================== */

.sidebar {
    background: linear-gradient(180deg,
            #102747 0%,
            #0b1930 100%);
    color: #ffffff;
    box-shadow: 5px 0 25px rgba(15, 23, 42, 0.08);
}

.brand {
    padding: 24px 18px;
    text-decoration: none;
}

.brand b {
    background: linear-gradient(135deg,
            #e7c65b,
            #b78a16);
    color: #102747;
    width: 46px;
    height: 46px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: 0 5px 15px rgba(212, 175, 55, 0.2);
}

.brand strong {
    color: #ffffff;
    letter-spacing: 1.5px;
    font-size: 15px;
}

.brand small {
    color: #d4af37;
    letter-spacing: 1.5px;
    font-size: 10px;
}

.sidebar .label {
    color: #91a6c4;
    font-size: 10px;
    letter-spacing: 2px;
    font-weight: 800;
}

/* Sidebar navigation */

.sidebar nav {
    padding: 10px 12px;
}

.sidebar nav button {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 15px;
    margin: 5px 0;
    border: 1px solid transparent;
    border-radius: 10px;
    background: transparent;
    color: #cbd5e1;
    text-align: left;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sidebar nav button:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    transform: translateX(3px);
}

.sidebar nav button.active {
    background: linear-gradient(90deg,
            rgba(212, 175, 55, 0.2),
            rgba(212, 175, 55, 0.06));
    border-color: rgba(212, 175, 55, 0.3);
    color: #f4d878;
}

/* Sidebar footer */

.sidefoot {
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    padding: 18px;
    color: #dbe5f2;
}

.sidefoot small {
    color: #94a3b8;
}

/* ==========================================
   DASHBOARD HEADER
========================================== */

main>header {
    background: #ffffff;
    color: var(--admin-text);
    padding: 25px 32px;
    border-bottom: 1px solid var(--admin-border);
    box-shadow: 0 3px 12px rgba(15, 23, 42, 0.025);
}

main>header h1 {
    color: var(--admin-navy);
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -0.6px;
    margin: 6px 0;
}

main>header .label {
    color: var(--admin-blue);
    font-size: 10px;
    letter-spacing: 2px;
    font-weight: 800;
}

.headright {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.pill {
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
    border-radius: 30px;
    padding: 9px 15px;
    font-size: 12px;
    font-weight: 700;
}

/* ==========================================
   PAGE CONTENT
========================================== */

.view {
    padding: 28px;
}

.view h2,
.view h3 {
    color: var(--admin-navy);
    letter-spacing: -0.3px;
}

.view h2 {
    font-size: 23px;
    font-weight: 800;
}

.view h3 {
    font-size: 17px;
    font-weight: 750;
}

.muted {
    color: var(--admin-muted);
    line-height: 1.7;
}

/* ==========================================
   DASHBOARD PANELS AND CARDS
========================================== */

.panel {
    background: var(--admin-white);
    border: 1px solid var(--admin-border);
    border-radius: var(--admin-radius);
    padding: 24px;
    box-shadow: var(--admin-shadow);
    transition: box-shadow 0.2s ease,
        transform 0.2s ease;
}

.panel:hover {
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

.panel h3 {
    margin-top: 0;
    margin-bottom: 12px;
}

.twocol {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
    align-items: start;
}

/* ==========================================
   FORMS AND INPUT FIELDS
========================================== */

.stack {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.stack label {
    color: #334155;
    font-size: 13px;
    font-weight: 700;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.stack input,
.stack select,
.stack textarea {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #d7e0ec;
    background: #fbfdff;
    border-radius: 10px;
    padding: 12px 14px;
    color: #1e293b;
    font: inherit;
    font-size: 14px;
    transition: border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.stack input:focus,
.stack select:focus,
.stack textarea:focus {
    outline: none;
    border-color: var(--admin-blue);
    box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.1);
    background: #ffffff;
}

.stack textarea {
    min-height: 100px;
    resize: vertical;
}

/* ==========================================
   BUTTONS
========================================== */

button.primary,
button.outline,
button.danger {
    border-radius: 10px;
    padding: 11px 17px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

button.primary {
    background: var(--admin-navy);
    color: #ffffff;
    border: 1px solid var(--admin-navy);
    box-shadow: 0 4px 10px rgba(16, 39, 71, 0.12);
}

button.primary:hover {
    background: #1d416e;
    transform: translateY(-1px);
}

button.outline {
    background: #ffffff;
    color: var(--admin-navy);
    border: 1px solid #cbd5e1;
}

button.outline:hover {
    background: #f1f5f9;
    border-color: var(--admin-blue);
}

button.danger {
    background: #fff1f2;
    color: #be123c;
    border: 1px solid #fecdd3;
}

button.danger:hover {
    background: #ffe4e6;
}

button:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
}

/* ==========================================
   TABS
========================================== */

.tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    padding: 5px;
    background: #f1f5f9;
    border-radius: 12px;
    margin-bottom: 22px;
}

.tabs button {
    background: transparent;
    color: #64748b;
    border: 1px solid transparent;
    border-radius: 8px;
    padding: 10px 15px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.tabs button:hover {
    color: var(--admin-navy);
    background: #ffffff;
}

.tabs button.active {
    background: #ffffff;
    color: var(--admin-navy);
    border-color: #e2e8f0;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.06);
}

/* ==========================================
   TABLES AND ACCOUNT LISTS
========================================== */

.tablewrap {
    width: 100%;
    overflow-x: auto;
    border: 1px solid var(--admin-border);
    border-radius: 12px;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
    font-size: 13px;
}

thead {
    background: #f1f5f9;
}

th {
    color: #475569;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.7px;
    font-weight: 800;
}

th,
td {
    padding: 14px 16px;
    border-bottom: 1px solid #edf1f6;
    text-align: left;
}

tbody tr:hover {
    background: #f8fafc;
}

tbody tr:last-child td {
    border-bottom: none;
}

/* ==========================================
   NOTIFICATIONS
========================================== */

.notice {
    margin: 18px 28px 0;
    padding: 14px 17px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.6;
}

.notice.success {
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
}

.notice.error {
    background: #fff1f2;
    color: #be123c;
    border: 1px solid #fecdd3;
}

/* ==========================================
   ADMIN FOOTER
========================================== */

main>footer {
    margin-top: 35px;
    padding: 25px 20px;
    background: #102747;
    border-top: 4px solid var(--admin-gold);
    color: #dbe5f2;
    text-align: center;
    font-size: 12px;
    line-height: 1.8;
}

main>footer span {
    display: block;
    margin-top: 5px;
    color: #a9bdd7;
}

/* ==========================================
   RESPONSIVE DESIGN
========================================== */

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

    .view {
        padding: 20px;
    }

    main>header {
        padding: 20px;
    }
}

@media (max-width: 600px) {
    .view {
        padding: 14px;
    }

    main>header {
        padding: 17px;
    }

    main>header h1 {
        font-size: 21px;
    }

    .panel {
        padding: 17px;
    }

    .tabs {
        flex-direction: column;
    }

    .tabs button {
        width: 100%;
        text-align: left;
    }

    .notice {
        margin-left: 14px;
        margin-right: 14px;
    }
}

/* =========================================
   AMADIOUS COLLEGE — ELECTION RESULTS
========================================= */

.results-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    margin-top: 24px;
}

/* Individual position results */

.result-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    padding: 24px;
    box-shadow: 0 6px 22px rgba(15, 23, 42, 0.06);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    overflow: hidden;
}

.result-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.1);
}

.result-card h3 {
    color: #102747;
    font-size: 19px;
    font-weight: 800;
    margin: 0 0 8px;
}

.result-card .result-total {
    color: #64748b;
    font-size: 12px;
    margin-bottom: 22px;
}

/* Candidate result rows */

.result-candidate {
    margin: 20px 0;
    padding: 14px;
    background: #f8fafc;
    border: 1px solid #edf1f6;
    border-radius: 12px;
    transition: background 0.2s ease;
}

.result-candidate:hover {
    background: #f1f5f9;
}

.result-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.result-label span:first-child {
    color: #1e293b;
    font-size: 13px;
    font-weight: 750;
}

.result-label span:last-child {
    color: #1d4ed8;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

/* Animated vote bars */

.result-track {
    width: 100%;
    height: 12px;
    background: #e2e8f0;
    border-radius: 20px;
    overflow: hidden;
}

.result-fill {
    height: 100%;
    width: 0;
    border-radius: 20px;
    background: linear-gradient(90deg, #1d4ed8, #60a5fa);
    transition: width 1.2s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Winner highlight — requires winner class in JavaScript */

.result-candidate.winner {
    background: #fffbeb;
    border: 1px solid #e8c85b;
}

.result-candidate.winner .result-label span:first-child::after {
    content: "  🏆";
}

.result-candidate.winner .result-fill {
    background: linear-gradient(90deg, #b8860b, #f4d35e);
}

/* Results summary */

.results-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin: 20px 0;
}

.results-summary-card {
    padding: 20px;
    border-radius: 14px;
    background: linear-gradient(135deg, #102747, #1d4ed8);
    color: #ffffff;
}

.results-summary-card small {
    display: block;
    color: #dbeafe;
    font-size: 11px;
    margin-bottom: 10px;
}

.results-summary-card strong {
    font-size: 25px;
    font-weight: 800;
}

/* Respect reduced-motion settings */

@media (prefers-reduced-motion: reduce) {

    .result-fill,
    .result-card {
        transition: none;
    }
}

/* Mobile results */

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

    .results-summary {
        grid-template-columns: 1fr;
    }

    .result-card {
        padding: 17px;
    }
}

/* Results entrance animation */
.results-appear {
    animation: resultsAppear 0.65s ease both;
}

@keyframes resultsAppear {
    from {
        opacity: 0;
        transform: translateY(14px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Locked results panel */
.results-locked {
    text-align: center;
    padding: 40px 20px;
}

.results-lock-icon {
    font-size: 38px;
    margin-bottom: 12px;
}

.results-status {
    display: inline-block;
    margin-top: 10px;
    padding: 7px 13px;
    border-radius: 30px;
    background: #fff7ed;
    color: #c2410c;
    font-size: 12px;
    font-weight: 700;
}

/* Accessible animation settings */
@media (prefers-reduced-motion: reduce) {
    .results-appear {
        animation: none;
    }
}

/* =====================================
   ANIMATED ELECTION RESULTS
===================================== */

.result-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    padding: 24px;
    box-shadow: 0 8px 25px rgba(15, 23, 42, 0.06);
    overflow: hidden;
    animation: resultFadeIn 0.6s ease both;
}

.result-eyebrow {
    display: block;
    color: #64748b;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.5px;
    margin-bottom: 7px;
}

.result-card .positionhead {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.result-total {
    background: #eff6ff;
    color: #1d4ed8;
    padding: 8px 12px;
    border-radius: 30px;
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
}

.result-candidate {
    background: #f8fafc;
    border: 1px solid #edf1f6;
    border-radius: 13px;
    padding: 15px;
    margin: 14px 0;
    transition: background 0.25s ease, transform 0.25s ease;
}

.result-candidate:hover {
    background: #f1f5f9;
    transform: translateY(-2px);
}

/* Candidate currently leading */

.result-candidate.winner {
    background: #fffbeb;
    border: 1px solid #e7ca70;
    box-shadow: 0 4px 14px rgba(212, 175, 55, 0.08);
}

/* Candidate photo and initials */

.result-candidate-name {
    display: flex;
    align-items: center;
    gap: 11px;
    min-width: 0;
}

.result-photo,
.result-avatar {
    width: 44px;
    height: 44px;
    min-width: 44px;
    border-radius: 50%;
    object-fit: cover;
}

.result-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #e0eaff;
    color: #173b70;
    font-size: 13px;
    font-weight: 800;
}

.result-name-details {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.result-name-details b {
    color: #1e293b;
    font-size: 13px;
    overflow-wrap: anywhere;
}

.leader-badge {
    color: #946b08;
    font-size: 10px;
    font-weight: 800;
}

/* Vote count and percentage */

.result-vote-count {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    white-space: nowrap;
}

.result-vote-count strong {
    color: #102747;
    font-size: 17px;
}

.result-vote-count span {
    color: #64748b;
    font-size: 11px;
    font-weight: 800;
}

.result-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 13px;
}

/* Animated progress bars */

.result-track {
    width: 100%;
    height: 10px;
    background: #e2e8f0;
    border-radius: 30px;
    overflow: hidden;
}

.result-fill {
    height: 100%;
    width: 0;
    border-radius: 30px;
    background: linear-gradient(90deg, #2563eb, #60a5fa);
    transition: width 1.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.result-fill.leader-fill {
    background: linear-gradient(90deg, #b8860b, #f4d35e);
}

/* Position totals */

.result-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #e2e8f0;
    color: #64748b;
    font-size: 12px;
}

.result-card-footer strong {
    color: #102747;
    font-size: 17px;
}

/* Entrance animation */

@keyframes resultFadeIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile responsiveness */

@media (max-width: 600px) {
    .result-card {
        padding: 16px;
    }

    .result-label {
        gap: 8px;
    }

    .result-photo,
    .result-avatar {
        width: 36px;
        height: 36px;
        min-width: 36px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .result-card {
        animation: none;
    }

    .result-fill {
        transition: none;
    }
}

/* ==========================================
   AMADIOUS COLLEGE VOTING SYSTEM
   RESPONSIVE DESIGN
   Phones, Tablets, Laptops and Desktops
========================================== */

/* Prevent unwanted horizontal scrolling */
* {
    box-sizing: border-box;
}

html {
    width: 100%;
    overflow-x: hidden;
}

body {
    width: 100%;
    min-width: 320px;
    margin: 0;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
}

/* Make form fields fit their containers */
input,
select,
textarea,
button {
    max-width: 100%;
    font: inherit;
}

input,
select,
textarea {
    width: 100%;
}

/* Keep the main content within the screen */
.layout {
    width: 100%;
    max-width: 100%;
}

main {
    min-width: 0;
    width: 100%;
}

.view,
.panel,
article {
    min-width: 0;
    max-width: 100%;
}

p,
h1,
h2,
h3,
small,
label {
    overflow-wrap: anywhere;
}

/* ==========================================
   TABLETS AND SMALL LAPTOPS
========================================== */

@media (max-width: 1024px) {

    .layout {
        grid-template-columns: 220px minmax(0, 1fr);
    }

    main {
        padding: 20px;
    }

    .twocol {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
    }

    .rowbetween {
        gap: 16px;
        flex-wrap: wrap;
    }
}

/* ==========================================
   MOBILE PHONES
========================================== */

@media (max-width: 768px) {

    .layout {
        display: block;
        width: 100%;
    }

    .sidebar {
        width: 100%;
        position: relative;
        height: auto;
        min-height: 0;
        padding: 14px;
    }

    .sidebar nav {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }

    .sidebar nav button,
    .sidebar nav a {
        flex: 1 1 140px;
        min-width: 0;
        text-align: center;
    }

    main {
        width: 100%;
        padding: 14px;
    }

    main>header {
        padding: 18px 14px;
        gap: 12px;
        flex-wrap: wrap;
    }

    main>header h1 {
        font-size: clamp(22px, 6vw, 30px);
    }

    .twocol {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 14px;
    }

    .rowbetween {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .panel {
        padding: 16px;
        margin-bottom: 14px;
    }

    .stack {
        width: 100%;
    }

    input,
    select,
    textarea {
        width: 100%;
        min-height: 44px;
        font-size: 16px;
    }

    button {
        min-height: 44px;
        padding: 10px 14px;
        cursor: pointer;
    }

    .tabs {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }

    .tabs button {
        flex: 1 1 130px;
    }

    /* Results and statistics */
    .result-card,
    .result-candidate {
        min-width: 0;
        width: 100%;
    }

    .result-track {
        width: 100%;
    }

    /* Footer */
    footer {
        width: 100%;
        padding: 20px 14px;
        display: flex;
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }
}

/* ==========================================
   VERY SMALL PHONES
========================================== */

@media (max-width: 400px) {

    main {
        padding: 10px;
    }

    .sidebar {
        padding: 10px;
    }

    .panel {
        padding: 12px;
    }

    main>header h1 {
        font-size: 22px;
    }

    .sidebar nav button,
    .sidebar nav a {
        flex-basis: 100%;
    }

    .tabs button {
        flex-basis: 100%;
    }
}

/* Improved mobile layout for Amadious College Voting System */
@media (max-width: 720px) {

    /* Make the sidebar more compact */
    .sidebar {
        width: 100%;
        box-sizing: border-box;
        padding: 12px 14px;
        border-radius: 0;
    }

    .brand {
        display: flex;
        align-items: center;
        gap: 10px;
    }

    /* Keep navigation compact and horizontally scrollable */
    .sidebar nav {
        display: flex;
        gap: 6px;
        overflow-x: auto;
        overflow-y: hidden;
        padding-bottom: 5px;
        -webkit-overflow-scrolling: touch;
    }

    .sidebar nav button {
        flex: 0 0 auto;
        min-height: 42px;
        font-size: 13px;
    }

    /* Prevent content from exceeding the screen */
    main {
        width: auto;
        min-width: 0;
        margin: 0;
        padding: 0 12px 20px;
        box-sizing: border-box;
    }

    main>header {
        width: 100%;
        box-sizing: border-box;
    }

    /* Make dashboard cards fit smaller screens */
    .metrics,
    .results,
    .twocol,
    .authgrid {
        width: 100%;
        min-width: 0;
        box-sizing: border-box;
    }

    .metrics article,
    .panel {
        min-width: 0;
        box-sizing: border-box;
    }

    /* Make admin tabs easier to use */
    .adminTabs {
        display: flex;
        gap: 8px;
        overflow-x: auto;
        padding-bottom: 8px;
        -webkit-overflow-scrolling: touch;
    }

    .adminTabs button {
        flex: 0 0 auto;
        min-height: 42px;
    }

    /* Make form controls comfortable to tap */
    input,
    select,
    textarea,
    button {
        max-width: 100%;
    }

    input,
    select,
    textarea {
        box-sizing: border-box;
    }

    /* Compact mobile footer */
footer {
    box-sizing: border-box;
    gap: 6px;
    padding: 10px 8px;
    margin-top: 10px;
    text-align: center;
    font-size: 12px;
    line-height: 1.4;
}
}

/* Mobile improvements for Amadious College Voting System */
@media screen and (max-width: 600px) {

    /* Reduce space around the main page */
    main {
        min-width: 0;
        width: 100%;
        max-width: 100%;
    }

    /* Compact mobile sidebar */
.sidebar {
    width: 100%;
    padding: 10px;
    gap: 8px;
    box-sizing: border-box;
}

.brand {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.sidebar nav {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 6px;
    padding: 0;
    margin: 0;
}

.sidebar nav a,
.sidebar nav button {
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
    min-height: 38px;
    padding: 8px;
    margin: 0;
    font-size: 12px;
    text-align: center;
    box-sizing: border-box;
}

    /* Make dashboard cards fit small screens */
    .twocol,
    .stats,
    .stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    /* Make forms and buttons easier to use */
    input,
    select,
    textarea,
    button {
        max-width: 100%;
        box-sizing: border-box;
    }

    button {
        min-height: 44px;
    }

    /* Prevent long text from breaking the layout */
    h1,
    h2,
    h3,
    p,
    small {
        overflow-wrap: anywhere;
    }
}

/* Responsive improvements for phones, tablets and computers */

/* Tablets */
@media (min-width: 721px) and (max-width: 1024px) {
    .layout {
        grid-template-columns: 220px minmax(0, 1fr);
        width: 100%;
    }

    main {
        min-width: 0;
        padding: 20px;
    }

    .twocol {
        grid-template-columns: 1fr;
    }

    .panel {
        min-width: 0;
    }
}

/* Phones */
@media (max-width: 720px) {
    .layout {
        display: block;
        width: 100%;
        max-width: 100%;
        margin: 0;
        border-radius: 0;
    }

    .sidebar {
        width: 100%;
        padding: 14px;
        height: auto;
        min-height: 0;
    }

    .sidebar nav {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0;
    padding: 0;
}

.sidebar nav button,
.sidebar nav a {
    flex: 0 1 auto;
    min-width: 0;
    min-height: 36px;
    padding: 8px 10px;
    margin: 0;
    font-size: 12px;
}

    main {
        width: 100%;
        min-width: 0;
        padding: 14px;
    }

    .twocol {
        grid-template-columns: minmax(0, 1fr);
    }

    .rowbetween {
        align-items: flex-start;
        flex-wrap: wrap;
        gap: 12px;
    }

    .tabs {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }

    .tabs button {
        flex: 1 1 130px;
    }

    input,
    select,
    textarea,
    button {
        max-width: 100%;
    }

    .panel,
    .position,
    .result-card {
        width: 100%;
        min-width: 0;
        box-sizing: border-box;
    }

    table {
        display: block;
        width: 100%;
        overflow-x: auto;
    }
}

/* Small phones */
@media (max-width: 400px) {
    main {
        padding: 10px;
    }

    .sidebar {
        padding: 10px;
    }

    h1 {
        font-size: 1.4rem;
    }

    h2 {
        font-size: 1.2rem;
    }

    .sidebar nav button,
    .sidebar nav a,
    .tabs button {
        flex-basis: 100%;
    }
}

/* =====================================
   MOBILE DISPLAY FIX
   Amadious College Voting System
===================================== */

@media screen and (max-width: 600px) {

    /* Prevent unwanted horizontal scrolling */
    html,
    body {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }

    body {
        font-size: 14px;
    }

    /* Make the header more compact */
    header {
        padding: 10px 12px;
        gap: 8px;
        flex-wrap: wrap;
    }

    /* Keep the logout button visible */
    #logoutBtn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        visibility: visible;
        position: relative;
        z-index: 1000;
        padding: 8px 12px;
        font-size: 12px;
        white-space: nowrap;
    }

    /* Preserve the hidden state when logged out */
    #logoutBtn.hidden {
        display: none !important;
    }

    /* Reduce excessive spacing */
    main,
    .container,
    .dashboard,
    .content {
        width: 100%;
        max-width: 100%;
        padding: 12px;
        box-sizing: border-box;
    }

    /* Make dashboard cards fit phone screens */
    .grid,
    .stats-grid,
    .dashboard-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .card,
    .panel,
    .stat-card {
        min-width: 0;
        padding: 12px;
        box-sizing: border-box;
    }

    /* Keep headings compact */
    h1 {
        font-size: 22px;
    }

    h2 {
        font-size: 18px;
    }

    h3 {
        font-size: 15px;
    }

    /* Prevent long text from stretching the page */
    p,
    label,
    td,
    th {
        overflow-wrap: anywhere;
    }

    /* Make forms fit the screen */
    input,
    select,
    textarea {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    /* Make tables scroll inside their own area */
    .table-container,
    .table-responsive {
        max-width: 100%;
        overflow-x: auto;
    }

    /* Reduce button sizes */
    button {
        max-width: 100%;
        font-size: 13px;
    }
}

/* Smaller phones */
@media screen and (max-width: 380px) {

    .grid,
    .stats-grid,
    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    header {
        padding: 8px;
    }

    #logoutBtn {
        padding: 7px 9px;
        font-size: 11px;
    }

    h1 {
        font-size: 20px;
    }
}
/* Mobile header layout and logout visibility */
@media screen and (max-width: 600px) {
    header {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
        width: 100%;
        box-sizing: border-box;
    }

    #logoutBtn {
        flex-shrink: 0;
        white-space: nowrap;
        margin-left: auto;
    }

    #logoutBtn.hidden {
        display: none !important;
    }
}
/* Compact two-column layout on mobile */
@media screen and (max-width: 600px) {
    .twocol {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}
/* Compact main header on mobile */
@media screen and (max-width: 600px) {
    main > header {
        width: 100%;
        padding: 6px 8px;
        margin: 0 0 8px;
        gap: 6px;
        box-sizing: border-box;
    }

    main > header h1,
    main > header h2 {
        margin-top: 4px;
        margin-bottom: 4px;
        line-height: 1.25;
    }

    main > header p {
        margin-top: 4px;
        margin-bottom: 4px;
    }
}
/* =====================================
EXTRA-COMPACT MOBILE LOGIN
Amadious College Voting System
===================================== */

@media screen and (max-width: 600px) {
/* Reduce authentication page spacing */
#view-auth {
    padding: 4px;
    margin: 0;
}

#view-auth .panel,
#view-auth .card {
    padding: 6px;
    margin: 2px 0;
}

/* Compact authentication tabs */
#view-auth .tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
    margin: 0 0 5px;
    padding: 0;
}

#view-auth .tabs button {
    flex: 1 1 40%;
    min-width: 0;
    min-height: 28px;
    padding: 4px;
    font-size: 10px;
    line-height: 1.15;
}

/* Compact login forms */
#loginForm,
#admin-loginForm {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin: 0;
    padding: 0;
}

/* Reduce label spacing */
#view-auth form label {
    display: block;
    margin: 0 0 3px;
    font-size: 11px;
    line-height: 1.15;
}

/* Reduce input height */
#view-auth form input {
    display: block;
    width: 100%;
    min-height: 26px;
    margin: 2px 0 3px;
    padding: 4px 7px;
    font-size: 12px;
    line-height: 1.2;
    box-sizing: border-box;
}

/* Compact headings */
#view-auth h1,
#view-auth h2,
#view-auth h3 {
    margin: 2px 0 5px;
    line-height: 1.15;
}

/* Compact descriptions */
#view-auth p {
    margin: 2px 0 4px;
    font-size: 10px;
    line-height: 1.25;
}

/* Compact login buttons */
#view-auth form button {
    min-height: 28px;
    padding: 5px 7px;
    margin-top: 2px;
    font-size: 11px;
    line-height: 1.2;
}

/* Reduce unnecessary column spacing */
#view-auth .authgrid,
#view-auth .twocol {
    gap: 5px;
}

}
/* =====================================
COMPACT MOBILE ADMIN DASHBOARD
===================================== */

@media screen and (max-width: 600px) {
/* Reduce dashboard content spacing */
#view-admin {
    padding: 4px;
    margin: 0;
}

#view-admin .panel,
#view-admin .card {
    padding: 6px;
    margin: 2px 0;
}

/* Compact dashboard heading */
#view-admin h1,
#view-admin h2,
#view-admin h3 {
    margin: 2px 0 5px;
    line-height: 1.2;
}

#view-admin p {
    margin: 2px 0 4px;
    font-size: 11px;
    line-height: 1.3;
}

#view-admin small {
    font-size: 10px;
}

/* Compact dashboard metrics */
#view-admin .metrics,
#view-admin .stats,
#view-admin .stat-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5px;
    margin: 4px 0;
}

#view-admin .metrics article,
#view-admin .stat-card {
    min-width: 0;
    padding: 6px;
    margin: 0;
    box-sizing: border-box;
}

/* Compact dashboard sections */
#view-admin .twocol,
#view-admin .results {
    gap: 6px;
    margin: 4px 0;
}

/* Compact admin tabs */
#view-admin .adminTabs {
    gap: 4px;
    margin-bottom: 5px;
    padding-bottom: 4px;
}

#view-admin .adminTabs button {
    min-height: 30px;
    padding: 5px 7px;
    font-size: 11px;
}

/* Compact admin forms */
#view-admin form {
    gap: 3px;
    margin: 0;
    padding: 4px;
}

#view-admin form label {
    margin-bottom: 3px;
    font-size: 11px;
}

#view-admin form input,
#view-admin form select,
#view-admin form textarea {
    min-height: 28px;
    padding: 4px 7px;
    margin: 2px 0;
    font-size: 12px;
    box-sizing: border-box;
}

#view-admin form textarea {
    min-height: 45px;
}

#view-admin form button,
#view-admin > button {
    min-height: 30px;
    padding: 5px 8px;
    font-size: 11px;
}

/* Keep tables within the screen */
#view-admin .table-container,
#view-admin .table-responsive {
    max-width: 100%;
    overflow-x: auto;
}

#view-admin table {
    font-size: 11px;
}

#view-admin th,
#view-admin td {
    padding: 5px;
}
}
/* Ultra-compact admin navigation on phones */
@media screen and (max-width: 600px) {

/* Reduce spacing around admin navigation */
#view-admin .adminTabs {
    display: flex;
    flex-wrap: nowrap;
    gap: 3px;
    margin: 3px 0;
    padding: 0 0 3px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
}

/* Make each tab shorter */
#view-admin .adminTabs button {
    flex: 0 0 auto;
    min-height: 26px;
    height: 28px;
    padding: 4px 7px;
    margin: 0;
    font-size: 10px;
    line-height: 1.1;
    white-space: nowrap;
}

/* Reduce space around the navigation container */
#view-admin .adminTabs + * {
    margin-top: 4px;
}

/* Reduce spacing around admin sections */
#view-admin .panel,
#view-admin .card {
    margin-top: 3px;
    margin-bottom: 3px;
    padding: 6px;
}
}
/* Compact sidebar footer to make room for logout */
@media screen and (max-width: 600px) {
.sidefoot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 5px;
    width: 100%;
    margin-top: 5px;
    padding: 5px 7px;
    box-sizing: border-box;
}

.sidefoot span {
    font-size: 11px;
}

/* Keep logout compact and visible when signed in */
#logoutBtn {
    flex: 0 0 auto;
    width: auto;
    min-height: 28px;
    margin: 0;
    padding: 5px 8px;
    font-size: 11px;
    line-height: 1.2;
    white-space: nowrap;
}

#logoutBtn.hidden {
    display: none !important;
}

}
/* =====================================
STUDENT UNION LOGO — HEADER
===================================== */

main > header {
display: flex;
align-items: center;
justify-content: space-between;
gap: 12px;
box-sizing: border-box;
}

.header-brand {
display: flex;
align-items: center;
gap: 10px;
min-width: 0;
}

.student-union-logo {
    width: 65px;
    height: 65px;
    object-fit: contain;
    flex-shrink: 0;
}

.header-brand h1 {
margin: 3px 0;
}

.headright {
display: flex;
align-items: center;
gap: 8px;
flex-wrap: wrap;
}

/* Mobile sizing */
@media screen and (max-width: 600px) {
main > header {
gap: 6px;
padding: 5px 6px;
}
.header-brand {
    gap: 6px;
}

.student-union-logo {
    width: 48px;
    height: 48px;
}
.header-brand h1 {
    font-size: 16px;
}

.headright {
    gap: 4px;
}
}
/* =========================================
PREMIUM ADMIN & CANDIDATE DIRECTORY
Colors: Dark Blue, White, Green
========================================= */

:root {
--admin-navy: #102a43;
--admin-blue: #174a7e;
--admin-green: #198754;
--admin-white: #ffffff;
--admin-border: #dbe4ee;
--admin-muted: #64748b;
}

/* Candidate directory panel */
#pane-candidates > .panel:first-child {
background: var(--admin-white);
border: 1px solid var(--admin-border);
border-radius: 12px;
padding: 18px;
min-width: 0;
}

#pane-candidates > .panel:first-child h3 {
color: var(--admin-navy);
margin-top: 0;
padding-bottom: 12px;
border-bottom: 2px solid var(--admin-green);
}

/* Arrange candidate entries in columns */
#candidateList {
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: 14px;
align-items: stretch;
}

/* Candidate cards: applies to common direct children */
#candidateList > * {
min-width: 0;
padding: 14px;
background: var(--admin-white);
border: 1px solid var(--admin-border);
border-radius: 10px;
box-sizing: border-box;
overflow-wrap: anywhere;
box-shadow: 0 3px 8px rgba(16, 42, 67, 0.06);
}

/* Candidate text */
#candidateList h3,
#candidateList h4,
#candidateList strong {
color: var(--admin-navy);
}

#candidateList p,
#candidateList small {
color: var(--admin-muted);
overflow-wrap: anywhere;
}

/* Candidate photos */
#candidateList img {
width: 64px;
height: 64px;
object-fit: cover;
border-radius: 8px;
}

/* Candidate action buttons */
#candidateList button {
margin: 4px 4px 0 0;
padding: 8px 10px;
border-radius: 6px;
cursor: pointer;
}

#candidateList button.primary {
background: var(--admin-green);
color: var(--admin-white);
}

/* Candidate form panel */
#pane-candidates > .panel:last-child {
background: var(--admin-white);
border: 1px solid var(--admin-border);
border-radius: 12px;
padding: 18px;
min-width: 0;
}

#pane-candidates > .panel:last-child h3 {
color: var(--admin-navy);
margin-top: 0;
}

/* Tablet layout */
@media screen and (max-width: 900px) {
#candidateList {
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: 10px;
}
}

/* Phone layout */
@media screen and (max-width: 600px) {
#pane-candidates {
grid-template-columns: minmax(0, 1fr);
gap: 10px;
}
#pane-candidates > .panel {
    padding: 10px;
    border-radius: 8px;
}

#candidateList {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

#candidateList > * {
    padding: 9px;
    border-radius: 8px;
}

#candidateList img {
    width: 48px;
    height: 48px;
}

#candidateList button {
    padding: 6px 8px;
    font-size: 11px;
}
}
/* ==========================================
   PREMIUM ADMIN DASHBOARD
   Amadious College Voting System
   Colors: Dark Blue, White, Green
========================================== */

/* Dashboard heading */
#view-admin > .rowbetween {
    background: #102a43;
    color: #ffffff;
    padding: 18px;
    margin-bottom: 16px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    box-sizing: border-box;
}

#view-admin > .rowbetween .label {
    color: #a7f3d0;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.5px;
}

#view-admin > .rowbetween h2 {
    color: #ffffff;
    font-size: 24px;
    margin: 5px 0;
}

#view-admin > .rowbetween p {
    color: #dbeafe;
    font-size: 13px;
    margin: 4px 0 0;
}

/* Export button */
#exportBtn {
    background: #198754;
    color: #ffffff;
    border: none;
    border-radius: 7px;
    padding: 10px 14px;
    font-weight: 600;
}

/* Statistics cards */
#view-admin .metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin: 14px 0 18px;
}

#view-admin .metrics article {
    background: #ffffff;
    border: 1px solid #dbe4ee;
    border-top: 4px solid #198754;
    border-radius: 10px;
    padding: 16px;
    min-width: 0;
    box-shadow: 0 4px 12px rgba(16, 42, 67, 0.06);
    box-sizing: border-box;
}

#view-admin .metrics article small {
    display: block;
    color: #64748b;
    font-size: 12px;
    margin-bottom: 8px;
}

#view-admin .metrics article strong {
    display: block;
    color: #102a43;
    font-size: 28px;
    font-weight: 800;
}

/* Dashboard navigation tabs */
#view-admin .adminTabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px;
    margin-bottom: 14px;
    background: #102a43;
    border-radius: 10px;
}

#view-admin .adminTabs button {
    background: transparent;
    color: #ffffff;
    border: 1px solid transparent;
    border-radius: 7px;
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

#view-admin .adminTabs button.active {
    background: #198754;
    color: #ffffff;
}

/* Dashboard content panels */
#view-admin > .panel,
#view-admin #pane-results,
#view-admin #pane-candidates > .panel {
    background: #ffffff;
    border: 1px solid #dbe4ee;
    border-radius: 12px;
    padding: 18px;
    box-shadow: 0 4px 12px rgba(16, 42, 67, 0.05);
    box-sizing: border-box;
}

#view-admin .panel h3 {
    color: #102a43;
    margin-top: 0;
}

/* Responsive tablet layout */
@media screen and (max-width: 900px) {
    #view-admin .metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Compact mobile layout */
@media screen and (max-width: 600px) {

    #view-admin > .rowbetween {
        padding: 10px;
        margin-bottom: 8px;
        gap: 6px;
        border-radius: 8px;
    }

    #view-admin > .rowbetween h2 {
        font-size: 18px;
    }

    #view-admin > .rowbetween p {
        font-size: 11px;
        line-height: 1.3;
    }

    #exportBtn {
        padding: 7px 9px;
        font-size: 10px;
        white-space: nowrap;
    }

    #view-admin .metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 7px;
        margin: 8px 0 10px;
    }

    #view-admin .metrics article {
        padding: 9px;
        border-radius: 8px;
    }

    #view-admin .metrics article small {
        font-size: 10px;
        margin-bottom: 4px;
    }

    #view-admin .metrics article strong {
        font-size: 21px;
    }

    #view-admin .adminTabs {
        flex-wrap: nowrap;
        gap: 4px;
        padding: 5px;
        margin-bottom: 8px;
        overflow-x: auto;
    }

    #view-admin .adminTabs button {
        flex: 0 0 auto;
        padding: 8px 10px;
        font-size: 11px;
        white-space: nowrap;
    }

    #view-admin > .panel,
    #view-admin #pane-results,
    #view-admin #pane-candidates > .panel {
        padding: 10px;
        border-radius: 8px;
    }
}
/* ==========================================
PREMIUM ELECTION RESULTS
Dark Blue | White | Green
========================================== */

/* Results panel */
#pane-results {
background: #ffffff;
border: 1px solid #dbe4ee;
border-radius: 12px;
padding: 18px;
box-sizing: border-box;
}

#pane-results > h3 {
color: #102a43;
font-size: 20px;
margin: 0 0 16px;
padding-bottom: 10px;
border-bottom: 2px solid #198754;
}

/* Results layout */
#adminResults {
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: 14px;
align-items: start;
}

/* Result cards */
#adminResults > * {
min-width: 0;
padding: 14px;
background: #ffffff;
border: 1px solid #dbe4ee;
border-radius: 10px;
box-shadow: 0 3px 10px rgba(16, 42, 67, 0.06);
box-sizing: border-box;
overflow-wrap: anywhere;
}

/* Candidate and position headings */
#adminResults h3,
#adminResults h4,
#adminResults strong {
color: #102a43;
}

#adminResults p,
#adminResults small {
color: #64748b;
}

/* Vote percentage bars */
#adminResults progress {
width: 100%;
height: 9px;
accent-color: #198754;
}

/* Buttons inside results */
#adminResults button {
padding: 7px 10px;
border-radius: 6px;
}

/* Tablet */
@media screen and (max-width: 900px) {
#adminResults {
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: 10px;
}
}

/* Compact mobile results */
@media screen and (max-width: 600px) {
#pane-results {
padding: 10px;
border-radius: 8px;
}
#pane-results > h3 {
    font-size: 16px;
    margin-bottom: 10px;
    padding-bottom: 7px;
}

#adminResults {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
}

#adminResults > * {
    padding: 10px;
    border-radius: 8px;
}

#adminResults h3,
#adminResults h4 {
    font-size: 14px;
}

#adminResults p,
#adminResults small {
    font-size: 11px;
}
}
/* Premium candidate directory cards */
#candidateList {
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: 12px;
align-items: stretch;
}

#candidateList .candidate-list-item {
min-width: 0;
padding: 14px;
background: #ffffff;
border: 1px solid #dbe4ee;
border-left: 4px solid #198754;
border-radius: 9px;
box-shadow: 0 3px 10px rgba(16, 42, 67, 0.06);
overflow-wrap: anywhere;
box-sizing: border-box;
}

#candidateList .candidate-list-item b {
display: block;
margin-bottom: 6px;
color: #102a43;
font-size: 14px;
}

#candidateList .candidate-list-item p {
margin: 0 0 10px;
color: #64748b;
font-size: 12px;
}

#candidateList .candidate-list-item button {
padding: 7px 12px;
font-size: 12px;
border-radius: 6px;
}

/* Compact candidate cards on mobile */
@media screen and (max-width: 600px) {
#candidateList {
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: 7px;
}
#candidateList .candidate-list-item {
    padding: 9px;
    border-radius: 7px;
}

#candidateList .candidate-list-item b {
    font-size: 12px;
}

#candidateList .candidate-list-item p {
    font-size: 10px;
    margin-bottom: 7px;
}

#candidateList .candidate-list-item button {
    padding: 6px 8px;
    font-size: 11px;
}
}
/* =====================================
PREMIUM ELECTION RESULTS DESIGN
===================================== */

#adminResults {
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: 18px;
align-items: stretch;
}

#adminResults .result-card {
min-width: 0;
padding: 18px;
background: #ffffff;
border: 1px solid #dbe4ee;
border-radius: 14px;
box-shadow: 0 5px 16px rgba(16, 42, 67, 0.07);
box-sizing: border-box;
overflow: hidden;
}

#adminResults .positionhead {
display: flex;
justify-content: space-between;
align-items: center;
gap: 10px;
padding-bottom: 14px;
margin-bottom: 14px;
border-bottom: 2px solid #e7edf3;
}

#adminResults .result-eyebrow {
display: block;
margin-bottom: 5px;
color: #198754;
font-size: 10px;
font-weight: 800;
letter-spacing: 1.2px;
}

#adminResults .positionhead h3 {
margin: 0;
color: #102a43;
font-size: 19px;
overflow-wrap: anywhere;
}

#adminResults .result-total {
flex-shrink: 0;
padding: 7px 10px;
color: #102a43;
background: #edf4f8;
border-radius: 20px;
font-size: 11px;
font-weight: 700;
}

#adminResults .result-candidate {
padding: 12px;
margin-bottom: 10px;
background: #f8fafc;
border: 1px solid #e5ebf2;
border-radius: 10px;
box-sizing: border-box;
}

#adminResults .result-candidate.winner {
background: #f0fdf4;
border-color: #a7e4bd;
}

#adminResults .result-label {
display: flex;
justify-content: space-between;
align-items: center;
gap: 8px;
margin-bottom: 12px;
}

#adminResults .result-candidate-name {
display: flex;
align-items: center;
gap: 10px;
min-width: 0;
}

#adminResults .result-photo,
#adminResults .result-avatar {
width: 43px;
height: 43px;
flex-shrink: 0;
border-radius: 50%;
object-fit: cover;
}

#adminResults .result-avatar {
display: flex;
align-items: center;
justify-content: center;
color: #ffffff;
background: #102a43;
font-size: 13px;
font-weight: 800;
}

#adminResults .result-name-details {
display: flex;
flex-direction: column;
gap: 5px;
min-width: 0;
}

#adminResults .result-name-details b {
color: #102a43;
font-size: 13px;
overflow-wrap: anywhere;
}

#adminResults .leader-badge {
display: inline-block;
width: fit-content;
padding: 4px 7px;
color: #166534;
background: #dcfce7;
border-radius: 5px;
font-size: 10px;
font-weight: 800;
}

#adminResults .result-vote-count {
display: flex;
flex-direction: column;
align-items: flex-end;
gap: 3px;
flex-shrink: 0;
}

#adminResults .result-vote-count strong {
color: #102a43;
font-size: 20px;
}

#adminResults .result-vote-count span {
display: inline-block;
color: #198754;
font-size: 14px;
font-weight: 800;
visibility: visible;
opacity: 1;
}

#adminResults .result-track {
width: 100%;
height: 8px;
overflow: hidden;
background: #e2e8f0;
border-radius: 20px;
}

#adminResults .result-fill {
height: 100%;
background: #8ba3b8;
border-radius: 20px;
transition: width 0.5s ease;
}

#adminResults .result-fill.leader-fill {
background: #198754;
}

#adminResults .result-card-footer {
display: flex;
justify-content: space-between;
gap: 10px;
margin-top: 14px;
padding-top: 12px;
border-top: 1px solid #e5ebf2;
color: #64748b;
font-size: 12px;
}

#adminResults .result-card-footer strong {
color: #102a43;
}

/* Tablet layout */
@media screen and (max-width: 900px) {
#adminResults {
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: 12px;
}
#adminResults .result-card {
    padding: 13px;
}
}

/* Mobile layout */
@media screen and (max-width: 600px) {
#adminResults {
grid-template-columns: minmax(0, 1fr);
gap: 12px;
}
#adminResults .result-card {
    padding: 12px;
    border-radius: 10px;
}
#adminResults .positionhead h3 {
    font-size: 16px;
}
#adminResults .result-candidate {
    padding: 10px;
}
#adminResults .result-photo,
#adminResults .result-avatar {
    width: 36px;
    height: 36px;
}

#adminResults .result-name-details b {
    font-size: 12px;
}

#adminResults .result-vote-count strong {
    font-size: 17px;
}
}
/* ========================================
   AMADIOUS COLLEGE ELECTION DESIGN
   Navy Blue, Gold and White
   ======================================== */

#ballotPositions {
    width: 100%;
    max-width: 1500px;
    margin: 0 auto;
    color: #142943;
}

/* Election banner */

.election-banner {
    padding: 28px;
    margin-bottom: 26px;
    color: #ffffff;
    background: linear-gradient(135deg, #061a33, #123b63);
    border: 1px solid #c7a052;
    border-radius: 14px;
    box-shadow: 0 8px 24px rgba(6, 26, 51, 0.15);
}

.college-brand {
    display: flex;
    align-items: center;
    gap: 15px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(226, 193, 121, 0.6);
}

.college-emblem {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 58px;
    height: 58px;
    flex-shrink: 0;
    color: #e7c477;
    border: 2px solid #e7c477;
    border-radius: 50%;
    font-family: Georgia, serif;
    font-size: 22px;
    font-weight: bold;
}

.college-brand h2 {
    margin: 0;
    color: #ffffff;
    font-family: Georgia, serif;
    font-size: 23px;
}

.college-brand p {
    margin: 5px 0 0;
    color: #e7c477;
    font-size: 10px;
    font-weight: bold;
    letter-spacing: 3px;
}

.election-heading {
    padding: 30px 10px;
    text-align: center;
}

.election-heading > span {
    color: #e7c477;
    font-size: 12px;
    font-weight: bold;
    letter-spacing: 3px;
}

.election-heading h1 {
    margin: 12px 0;
    color: #ffffff;
    font-family: Georgia, serif;
    font-size: clamp(28px, 4vw, 48px);
}

.election-heading p {
    margin: 0;
    color: #e1e8f0;
    font-size: 14px;
    line-height: 1.7;
}

.election-values {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px 30px;
    padding-top: 18px;
    color: #e7c477;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    font-size: 12px;
    font-weight: bold;
}

/* Position sections */

#ballotPositions .presidential-position {
    margin-bottom: 24px;
    padding: 0;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid #e1e6ed;
    border-radius: 12px;
    box-shadow: 0 5px 18px rgba(20, 41, 67, 0.08);
}

.presidential-position-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding: 18px 22px;
    color: #ffffff;
    background: #092543;
    border-bottom: 3px solid #c7a052;
}

.presidential-position-header h3 {
    margin: 0;
    color: #ffffff;
    font-family: Georgia, serif;
    font-size: 21px;
    text-transform: uppercase;
}

.presidential-position-header p {
    margin: 5px 0 0;
    color: #e7c477;
    font-size: 12px;
}

.position-count {
    color: #e7c477;
    font-size: 12px;
}

/* Candidate grid */

.presidential-candidates {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    padding: 16px;
}

#ballotPositions .presidential-candidate {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    min-width: 0;
    padding: 14px;
    background: #ffffff;
    border: 1px solid #dce3eb;
    border-radius: 10px;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
}

#ballotPositions .presidential-candidate:hover {
    border-color: #c7a052;
    box-shadow: 0 5px 14px rgba(20, 41, 67, 0.08);
}

#ballotPositions .presidential-candidate.selected {
    background: #f1faf5;
    border: 2px solid #198754;
}

.presidential-candidate input[type="radio"] {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    margin: 4px 0 0;
    accent-color: #198754;
}

.presidential-photo,
.presidential-avatar {
    width: 90px;
    height: 115px;
    flex-shrink: 0;
    object-fit: cover;
    object-position: center top;
    border-radius: 7px;
}

.presidential-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #e7c477;
    background: #092543;
    font-family: Georgia, serif;
    font-size: 24px;
    font-weight: bold;
}

.presidential-details {
    min-width: 0;
}

.presidential-details h4 {
    margin: 2px 0 7px;
    color: #102746;
    font-family: Georgia, serif;
    font-size: 16px;
    overflow-wrap: anywhere;
}

.candidate-tag {
    color: #a57924;
    font-size: 9px;
    font-weight: bold;
    letter-spacing: 1px;
}

.presidential-details p {
    margin: 10px 0;
    color: #536174;
    font-size: 12px;
    line-height: 1.7;
    overflow-wrap: anywhere;
}

.candidate-choice {
    display: inline-block;
    padding: 6px 9px;
    color: #946d20;
    border: 1px solid #c7a052;
    border-radius: 5px;
    font-size: 10px;
    font-weight: bold;
}

.presidential-candidate.selected .candidate-choice {
    color: #ffffff;
    background: #198754;
    border-color: #198754;
}

.ballot-footer {
    padding: 5px 10px 20px;
    color: #64748b;
    font-size: 13px;
    text-align: center;
}

/* Submit button */

#castBtn {
    display: block;
    width: fit-content;
    max-width: 100%;
    margin: 15px auto 25px;
    padding: 14px 25px;
    color: #ffffff;
    background: #092543;
    border: 2px solid #c7a052;
    border-radius: 8px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
}

#castBtn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

#castBtn:not(:disabled):hover {
    background: #17466f;
}

/* Tablet */

@media (max-width: 1100px) {
    .presidential-candidates {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .presidential-photo,
    .presidential-avatar {
        width: 75px;
        height: 100px;
    }
}

/* Mobile */

@media (max-width: 600px) {
    .election-banner {
        padding: 18px 14px;
    }

    .college-emblem {
        width: 45px;
        height: 45px;
        font-size: 17px;
    }

    .college-brand h2 {
        font-size: 17px;
    }

    .college-brand p {
        font-size: 9px;
        letter-spacing: 1.5px;
    }

    .election-heading {
        padding: 25px 0;
    }

    .election-heading h1 {
        font-size: 30px;
    }

    .election-values {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }

    .presidential-position-header {
        align-items: flex-start;
        flex-direction: column;
        padding: 15px;
    }

    .presidential-position-header h3 {
        font-size: 18px;
    }

    .presidential-candidates {
        grid-template-columns: minmax(0, 1fr);
        gap: 10px;
        padding: 10px;
    }

    #ballotPositions .presidential-candidate {
        gap: 9px;
        padding: 10px;
    }

    .presidential-photo,
    .presidential-avatar {
        width: 75px;
        height: 100px;
    }

    .presidential-details h4 {
        font-size: 14px;
    }

    #castBtn {
        width: 100%;
        font-size: 13px;
    }
}
