/* ============================================================================
   GU Result Analyzer — Website Dashboard Stylesheet
   AdminLTE 2015-inspired Bootstrap admin aesthetic
   ============================================================================ */

/* Reset and Base */
body {
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    background-color: #ecf0f5;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    color: #333;
}

/* Wrapper and Layout */
.wrapper {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

.content-wrapper {
    flex: 1;
    min-width: 0;
    transition: margin-left 0.3s;
    background-color: #ecf0f5;
    display: flex;
    flex-direction: column;
}

/* Main Header */
.main-header {
    background-color: #3c8dbc;
    height: 50px;
    display: flex;
    align-items: center;
    color: #fff;
    padding: 0;
    box-shadow: 0 1px 1px rgba(0,0,0,0.1);
}

.header-nav {
    display: flex;
    width: 100%;
    justify-content: space-between;
    align-items: center;
    padding: 0 15px;
}

.sidebar-toggle {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    padding: 5px 15px;
}
.sidebar-toggle:hover {
    background-color: #367fa9;
}

/* Sidebar */
.main-sidebar {
    width: 230px;
    background-color: #222d32;
    color: #fff;
    flex-shrink: 0;
    transition: transform 0.3s ease-in-out, width 0.3s ease-in-out;
    overflow-y: auto;
}

.sidebar-brand {
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 300;
    background-color: #367fa9;
    color: #fff;
    gap: 8px;
}

.sidebar-menu {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sidebar-menu .header {
    color: #4b646f;
    background: #1a2226;
    padding: 10px 25px 10px 15px;
    font-size: 12px;
}

.sidebar-menu li > a {
    display: block;
    padding: 12px 15px;
    color: #b8c7ce;
    text-decoration: none;
    border-left: 3px solid transparent;
    transition: background 0.15s, border-left-color 0.15s;
}

.sidebar-menu li > a:hover {
    background: #1e282c;
    color: #fff;
    border-left-color: #3c8dbc;
}

.sidebar-menu li.active > a {
    background: #1e282c;
    color: #fff;
    border-left-color: #3c8dbc;
}

.sidebar-menu li > a > i {
    width: 20px;
    margin-right: 5px;
    text-align: center;
}

/* Content Area */
.content {
    padding: 15px;
    flex: 1;
}

/* Boxes / Cards (AdminLTE 2015 Style) */
.card {
    background: #fff;
    border-radius: 3px;
    box-shadow: 0 1px 1px rgba(0,0,0,0.1);
    margin-bottom: 20px;
    border: 0;
    border-top: 3px solid #d2d6de;
}

.card.box-primary { border-top-color: #3c8dbc; }
.card.box-success { border-top-color: #00a65a; }
.card.box-info { border-top-color: #00c0ef; }
.card.box-warning { border-top-color: #f39c12; }
.card.box-danger { border-top-color: #dd4b39; }

.card-header {
    background: transparent;
    color: #444;
    padding: 10px 10px;
    border-bottom: 1px solid #f4f4f4;
    display: flex;
    align-items: center;
}

.card-title {
    font-size: 18px;
    margin: 0;
    font-weight: 400;
}

/* Small Stat Boxes */
.small-box {
    border-radius: 2px;
    position: relative;
    display: block;
    margin-bottom: 20px;
    box-shadow: 0 1px 1px rgba(0,0,0,0.1);
    color: #fff;
    overflow: hidden;
}

.small-box > .inner {
    padding: 10px;
}

.small-box h3 {
    font-size: 38px;
    font-weight: bold;
    margin: 0 0 10px 0;
    white-space: nowrap;
    padding: 0;
}

.small-box p {
    font-size: 15px;
    margin-bottom: 0;
}

.small-box .icon {
    transition: all 0.3s linear;
    position: absolute;
    top: -10px;
    right: 10px;
    z-index: 0;
    font-size: 90px;
    color: rgba(0,0,0,0.15);
}

.bg-aqua { background-color: #00c0ef !important; }
.bg-green { background-color: #00a65a !important; }
.bg-yellow { background-color: #f39c12 !important; }
.bg-red { background-color: #dd4b39 !important; }

/* Tables */
.table > thead > tr > th {
    border-bottom: 2px solid #f4f4f4;
    background-color: #f8f9fa;
    color: #333;
    font-weight: 600;
    font-size: 13px;
}

.table > tbody > tr > td {
    font-size: 13px;
    vertical-align: middle;
}

/* Buttons */
.btn-primary { background-color: #3c8dbc; border-color: #367fa9; }
.btn-primary:hover { background-color: #367fa9; border-color: #204d74; }
.btn-default { background-color: #f4f4f4; color: #444; border-color: #ddd; }
.btn-default:hover { background-color: #e7e7e7; border-color: #adadad; }

/* ---- Bell Curve Histogram ---- */
.bell-curve-container {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 3px;
    height: 220px;
    padding: 10px 5px;
}

.bar-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    max-width: 50px;
    height: 100%;
    justify-content: flex-end;
}

.bar {
    width: 100%;
    background: linear-gradient(180deg, #3c8dbc 0%, #00c0ef 100%);
    border-radius: 3px 3px 0 0;
    position: relative;
    cursor: pointer;
    transition: opacity 0.2s;
    min-height: 2px;
}

.bar:hover {
    opacity: 0.85;
}

.bar-tooltip {
    display: none;
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #222d32;
    color: #fff;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 11px;
    white-space: nowrap;
    z-index: 100;
    margin-bottom: 5px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.bar:hover .bar-tooltip {
    display: block;
}

.bar-label {
    margin-top: 4px;
    font-size: 9px;
    color: #888;
    text-align: center;
}

/* ---- Stats Distribution Band Cards ---- */
.stat-band {
    border: 1px solid #e0e0e0;
    transition: transform 0.15s;
}

.stat-band:hover {
    transform: translateY(-2px);
}

/* ---- College Link Hover ---- */
.college-link:hover {
    text-decoration: underline !important;
}

/* ---- Scrollbar ---- */
.table-responsive::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
.table-responsive::-webkit-scrollbar-thumb {
    background: #bbb;
    border-radius: 3px;
}

/* ---- Mobile Responsiveness ---- */
@media (max-width: 767px) {
    .main-sidebar {
        transform: translate(-230px, 0);
        position: fixed;
        z-index: 1000;
        height: 100vh;
        top: 0;
        left: 0;
    }
    .sidebar-open .main-sidebar {
        transform: translate(0, 0);
    }
    .content-wrapper {
        margin-left: 0;
    }
    .small-box h3 {
        font-size: 24px;
    }
    .small-box .icon {
        display: none;
    }
    .card-title {
        font-size: 15px;
    }
    .bell-curve-container {
        height: 160px;
    }
    .bar-label {
        font-size: 7px;
    }
}

/* ---- Print Styles ---- */
@media print {
    .main-sidebar,
    .main-header,
    .sidebar-toggle,
    #section-upload,
    #section-export {
        display: none !important;
    }
    .content-wrapper {
        margin: 0;
    }
    .content {
        padding: 0;
    }
    .card {
        box-shadow: none;
        border-top: 2px solid #ddd;
        page-break-inside: avoid;
    }
    .small-box {
        box-shadow: none;
    }
}
