﻿/* ===== Horviwo Portal — Shared Styles ===== */

* {
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Arial, sans-serif;
    background: linear-gradient(160deg, #EAEFFA 0%, #FBF6EA 100%);
    background-attachment: fixed;
    color: #2B2D42;
    margin: 0;
    padding: 0;
}

/* Page wrapper / card */
.page-wrapper {
    max-width: 950px;
    margin: 30px auto;
    padding: 0 15px;
}

.card {
    background: #FFFFFF;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(20, 33, 61, 0.08);
    padding: 25px 30px;
    margin-bottom: 25px;
}

/* Top bar */
.top-bar {
    background-color: #14213D;
    color: #FFFFFF;
    padding: 16px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

    .top-bar h1 {
        margin: 0;
        font-size: 20px;
        color: #FFFFFF;
        letter-spacing: 0.5px;
    }

    .top-bar .welcome-text {
        font-size: 14px;
        color: #D4A017;
    }

/* Headings */
h2 {
    color: #14213D;
    border-bottom: 2px solid #D4A017;
    padding-bottom: 8px;
    margin-top: 0;
}

h3 {
    color: #14213D;
    margin-top: 25px;
}

/* Form layout */
.form-row {
    margin-bottom: 14px;
}

    .form-row label {
        display: block;
        font-weight: 600;
        font-size: 13px;
        color: #14213D;
        margin-bottom: 4px;
    }

/* Inputs */
input[type="text"],
input[type="password"],
input[type="date"],
textarea,
select {
    width: 100%;
    max-width: 380px;
    padding: 9px 12px;
    border: 1px solid #D0D3DC;
    border-radius: 5px;
    font-size: 14px;
    background-color: #FBFBFD;
    transition: border-color 0.2s, box-shadow 0.2s;
}

    input[type="text"]:focus,
    input[type="password"]:focus,
    input[type="date"]:focus,
    textarea:focus,
    select:focus {
        outline: none;
        border-color: #D4A017;
        box-shadow: 0 0 0 3px rgba(212, 160, 23, 0.15);
    }

/* Buttons */
input[type="submit"],
.btn,
a.btn {
    background-color: #14213D;
    color: #FFFFFF !important;
    border: none;
    padding: 10px 22px;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: background-color 0.2s;
}

    input[type="submit"]:hover,
    .btn:hover,
    a.btn:hover {
        background-color: #D4A017;
        color: #14213D !important;
    }

/* Secondary / logout link style */
.link-muted {
    color: #6B7280;
    font-size: 13px;
    text-decoration: none;
}

    .link-muted:hover {
        color: #C62828;
        text-decoration: underline;
    }

/* Result / status messages */
.msg-success {
    color: #2E7D32;
    font-weight: 600;
}

.msg-error {
    color: #C62828;
    font-weight: 600;
}

/* Tables / GridView */
table.grid, .aspNetDisabled, table {
    border-collapse: collapse;
    width: 100%;
}

.grid th, .grid td,
table[id*="gv"] th, table[id*="gv"] td {
    padding: 10px 12px;
    border-bottom: 1px solid #EBEDF2;
    font-size: 13px;
    text-align: left;
}

table[id*="gv"] th {
    background-color: #14213D;
    color: #FFFFFF;
    font-weight: 600;
}

table[id*="gv"] tr:nth-child(even) td {
    background-color: #FAFAFC;
}

/* Executive cards */
.exec-card {
    display: inline-block;
    text-align: center;
    margin: 12px;
    width: 130px;
    vertical-align: top;
}

    .exec-card img {
        width: 100px;
        height: 100px;
        object-fit: cover;
        border-radius: 50%;
        border: 3px solid #D4A017;
    }

    .exec-card b {
        display: block;
        margin-top: 8px;
        color: #14213D;
        font-size: 13px;
    }

    .exec-card i {
        color: #6B7280;
        font-size: 12px;
    }

/* Announcements */
.announcement {
    border-left: 4px solid #14213D;
    background: #FAFAFC;
    padding: 12px 15px;
    margin-bottom: 10px;
    border-radius: 4px;
    font-size: 14px;
}

    .announcement.exec-only {
        border-left-color: #D4A017;
        background: #FFF9EC;
    }

    .announcement b {
        color: #14213D;
        font-size: 12px;
    }

hr {
    border: none;
    border-top: 1px solid #E5E7EB;
    margin: 25px 0;
}

.search-box {
    width: 100%;
    max-width: 320px;
    padding: 9px 14px;
    border: 1px solid #D0D3DC;
    border-radius: 20px;
    font-size: 14px;
    background-color: #FBFBFD;
    margin-bottom: 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

    .search-box:focus {
        outline: none;
        border-color: #D4A017;
        box-shadow: 0 0 0 3px rgba(212, 160, 23, 0.15);
    }

/* ===== Sidebar / App Shell Layout ===== */

.app-shell {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 230px;
    flex-shrink: 0;
    background-color: #14213D;
    color: #FFFFFF;
    display: flex;
    flex-direction: column;
    padding: 25px 18px;
    position: sticky;
    top: 0;
    height: 100vh;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.logo-badge {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background-color: #D4A017;
    color: #14213D;
    font-weight: 700;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.logo-badge img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.sidebar-group-name {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.2;
}

.sidebar-role {
    font-size: 12px;
    color: #D4A017;
    margin-bottom: 25px;
}

.sidebar-user {
    font-size: 13px;
    color: #B9C0D4;
    margin-bottom: 20px;
    padding-bottom: 18px;
    border-bottom: 1px solid rgba(255,255,255,0.12);
}

.sidebar nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

    .sidebar nav a {
        color: #E7E9F1;
        text-decoration: none;
        font-size: 14px;
        padding: 10px 12px;
        border-radius: 6px;
        transition: background-color 0.15s;
    }

        .sidebar nav a:hover {
            background-color: rgba(255,255,255,0.08);
        }

        .sidebar nav a.active {
            background-color: #D4A017;
            color: #14213D;
            font-weight: 600;
        }

.sidebar-logout {
    margin-top: 14px;
    padding-top: 15px;
    border-top: 1px solid rgba(255,255,255,0.12);
}

    .sidebar-logout .link-muted {
        display: block;
        color: #E7E9F1 !important;
        text-decoration: none !important;
        font-size: 14px;
        padding: 10px 12px;
        border-radius: 6px;
        border: 1px solid rgba(255,255,255,0.18);
        text-align: center;
        transition: background-color 0.15s, border-color 0.15s;
    }

        .sidebar-logout .link-muted:hover {
            background-color: rgba(255, 138, 138, 0.15) !important;
            border-color: #FF8A8A;
            color: #FF8A8A !important;
        }

.main-content {
    flex-grow: 1;
    padding: 30px 35px;
    max-width: 1000px;
}

/* ===== Mobile top bar + hamburger toggle ===== */

.mobile-topbar {
    display: none;
}

.sidebar-overlay {
    display: none;
}

@media (max-width: 800px) {
    .app-shell {
        flex-direction: column;
    }

    .mobile-topbar {
        display: flex;
        align-items: center;
        gap: 12px;
        background-color: #14213D;
        color: #FFFFFF;
        padding: 14px 18px;
        position: sticky;
        top: 0;
        z-index: 1001;
    }

        .mobile-topbar .sidebar-group-name {
            font-size: 15px;
        }

    .hamburger-btn {
        background: none;
        border: none;
        color: #FFFFFF;
        font-size: 24px;
        line-height: 1;
        cursor: pointer;
        padding: 4px 6px;
    }

    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        width: 240px;
        transform: translateX(-100%);
        transition: transform 0.25s ease;
        z-index: 1002;
    }

        .sidebar.sidebar-open {
            transform: translateX(0);
        }

    .sidebar-overlay.active {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(20, 33, 61, 0.45);
        z-index: 1000;
    }

    .main-content {
        padding: 20px 18px;
    }
}

@media (min-width: 801px) {
    .sidebar-overlay {
        display: none !important;
    }
}

/* ===== Sidebar scrolling ===== */

.sidebar {
    overflow-y: auto;
}

/* ===== Scrollable tables ===== */

.table-scroll {
    max-height: 420px;
    overflow-y: auto;
    overflow-x: auto;
    border: 1px solid #EBEDF2;
    border-radius: 6px;
    margin-bottom: 10px;
}

    .table-scroll table {
        margin: 0;
    }

    .table-scroll th {
        position: sticky;
        top: 0;
        z-index: 1;
    }

/* ===== Single-section view (sidebar acts as page switcher) ===== */

.page-section {
    display: none;
}

    .page-section.active-section {
        display: block;
    }
    .modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(20, 33, 61, 0.6);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

    .modal-overlay.active {
        display: flex;
    }

.modal-box {
    background: #FFFFFF;
    border-radius: 8px;
    width: 100%;
    max-width: 900px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.modal-header {
    background-color: #14213D;
    color: #FFFFFF;
    padding: 12px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

    .modal-header button {
        background: none;
        border: none;
        color: #FFFFFF;
        font-size: 18px;
        cursor: pointer;
    }

.modal-iframe {
    flex-grow: 1;
    width: 100%;
    height: 75vh;
    border: none;
}

/* ===== Sidebar resource links (Constitution, Terms) ===== */

.sidebar-resources {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(255,255,255,0.12);
}

    .sidebar-resources a {
        color: #E7E9F1;
        text-decoration: none;
        font-size: 13px;
        padding: 8px 12px;
        border-radius: 6px;
        cursor: pointer;
        transition: background-color 0.15s;
    }

        .sidebar-resources a:hover {
            background-color: rgba(255,255,255,0.08);
        }
