/* ===== Global ===== */
@font-face {
    font-family: 'Anuphan';
    src: url('../fonts/Anuphan/Anuphan-VariableFont_wght.woff2') format('woff2');;
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

body {
    background-color: #f4f6f9;
    font-family: "Anuphan", sans-serif !important;
}

/* ===== Topbar ===== */
.topbar {
    background-color: #0f2c5c;
    border: none;
    border-radius: 0;
}

.topbar .navbar-brand {
    color: #fff !important;
    font-weight: bold;
    font-size: 20px;
}

/* ===== Sidebar ===== */
.sidebar {
    background-color: #ffffff;
    min-height: 100vh;
    border-right: 1px solid #ddd;
    padding: 20px 10px;
}

.profile-box {
    margin-bottom: 20px;
}

.profile-img {
    width: 80px;
    height: 80px;
    margin-bottom: 10px;
}

.menu li a {
    color: #333;
    padding: 10px 15px;
    border-radius: 6px;
}

.menu li a:hover {
    background-color: #e9eef5;
}

.menu li.active a {
    background-color: #0f2c5c;
    color: #fff;
}

/* ===== Content ===== */
.main-content {
    padding: 30px;
}

/* ===== Card Style ===== */
.card-box {
    background-color: #ffffff;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

/* ===== Responsive ===== */
@media (max-width: 768px) {

    .sidebar {
        min-height: auto;
    }

    .main-content {
        padding: 15px;
    }

    .navbar-brand {
        font-size: 16px;
    }
}

.top-banner {
    height: 90px;
    background: #0f2c5c;
    color: #fff;
    display: flex;
    align-items: center;
    padding-left: 30px;
    font-size: 20px;
    font-weight: bold;
    letter-spacing: 0.3px;    
}

/* Wrapper */
.layout-wrapper {
    display: flex;
}

/* ===== Wrapper ===== */
.wrapper {
    display: flex;
}

/* ===== Sidebar Fixed ===== */
.sidebar-fixed {
    width: 260px;
    height: 100vh;
    background: #0f2c5c;
    color: #fff;
    position: sticky;
    top: 0;
    left: 0;
    overflow-y: auto;
    padding: 20px 15px;
}



/* ===== Profile ===== */
.sidebar-profile {
    margin-bottom: 30px;
}

.profile-img {
    width: 80px;
    height: 80px;
    margin-bottom: 10px;
}

.student-id {
    font-weight: bold;
}

.student-name {
    font-size: 13px;
    opacity: 0.8;
}

/* ===== SIDEBAR BASE ===== */
.sidebar {
    width: 250px;
    height: 100vh;
    position: fixed;
    background: #0f2c54;
    color: #fff;
    padding-top: 20px;
    transition: 0.3s;
}

/* ===== USER PANEL ===== */
.user-panel {
    display: flex;
    align-items: center;
    padding: 15px;
    margin-bottom: 20px;
}

.user-avatar {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    margin-right: 12px;
}

.user-code {
    font-weight: 600;
    font-size: 14px;
}

.user-name {
    font-size: 13px;
    opacity: 0.9;
}

/* ===== Menu ===== */

/* ===== MENU RESET ===== */
.sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* ===== MENU ITEM ===== */
.sidebar-menu li {
    position: relative;
    list-style: none;
}

/* เมนู */
.sidebar-menu li a {
    display: flex;
    align-items: center;
    height: 48px;              /* ความสูงตายตัว */
    padding: 0 10px;           /* ซ้ายขวาเท่ากัน */
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.3px;
    text-decoration: none;
    color: #fff;
    transition: all .2s ease;
}


.sidebar-menu li + li {
    border-top: 1px solid rgba(255,255,255,0.04);
}

.icon-home { color: #4a90e2; }
.icon-user { color: #2ecc71; }
.icon-health { color: #e74c3c; }
.icon-report { color: #f39c12; }
.icon-setting { color: #9b59b6; }

@media (max-width: 768px) {
    .sidebar-menu li a {
        height: 52px;
        font-size: 15px;
    }

    .sidebar {
        left: -250px;
    }

    .sidebar.active {
        left: 0;
    }

    .content-wrapper {
        margin-left: 0;
    }

    .sidebar-toggle {
        position: fixed;
        top: 15px;
        left: 15px;
        background: #0f2c54;
        color: #fff;
        border: none;
        padding: 8px 10px;
        border-radius: 4px;
        z-index: 9999;
    }
}

/* ===== ICON ALIGN ===== */
/* icon */
.sidebar-menu li a i {
    width: auto;         /* ไม่ fix 24px แล้ว */
    margin-right: 8px;   /* ชิดข้อความมากขึ้น */
    font-size: 16px;
    margin-right: 15px;
}

/* ===== HOVER ===== */
.sidebar-menu li a:hover {
    background: rgba(255,255,255,0.06);
}

/* ===== ACTIVE ===== */
.sidebar-menu li.active a {
    background: rgba(255,255,255,0.10);
}

.sidebar-menu li.active::before {
    content: "";
    position: absolute;
    left: 0;
    top: 8px;
    height: 32px;              /* ไม่เต็มทั้งแถว ดูสุภาพกว่า */
    width: 4px;
    border-radius: 3px;
    background: #2ecc71;
}

/* ===== Content ===== */
.content-area {
    flex: 1;
    padding: 30px;
}

/* ===================================================
   TYPOGRAPHY STANDARD – Government UI 2026
   Font: Anuphan
=================================================== */

body {
    font-family: 'Anuphan', sans-serif;
    font-size: 15px;
    line-height: 1.75;
    color: #2c3e50;
    background-color: #f4f6f9;
    -webkit-font-smoothing: antialiased;
}

/* ===== Headings ===== */

h1 {
    font-size: 30px;
    font-weight: 600;
    margin-bottom: 20px;
}

h2 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 18px;
}

h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 15px;
}

h4 {
    font-size: 18px;
    font-weight: 500;
    margin-bottom: 12px;
}

h5 {
    font-size: 16px;
    font-weight: 500;
}

h6 {
    font-size: 14px;
    font-weight: 500;
    color: #6c757d;
}

/* ===== Paragraph ===== */

p {
    margin-bottom: 12px;
}

/* ===== Navbar ===== */

.navbar-brand {
    font-weight: 600;
    font-size: 18px;
    letter-spacing: 0.3px;
}

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

.sidebar-menu li a {
    font-size: 14px;
    font-weight: 500;
}

/* ===== Table ===== */

.table {
    font-size: 14px;
}

.table thead {
    font-weight: 600;
    background-color: #f1f3f5;
}

.table th,
.table td {
    vertical-align: middle !important;
    padding: 10px 12px;
}

/* ===== Form ===== */

.form-control {
    font-size: 14px;
    height: 38px;
    border-radius: 6px;
}

label {
    font-weight: 500;
    font-size: 14px;
}

/* ===== Button ===== */

.btn {
    font-size: 14px;
    font-weight: 500;
    border-radius: 6px;
    padding: 6px 16px;
}

/* ===== Card / Panel ===== */

.card-box, .panel {
    font-size: 15px;
}

/* ===== Report Section ===== */

.report-title {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 15px;
}

.report-subtitle {
    font-size: 16px;
    font-weight: 500;
    color: #6c757d;
}

/* ===== Small text ===== */

.small-text {
    font-size: 13px;
    color: #6c757d;
}

/* ===== Mobile Optimization ===== */

@media (max-width: 768px) {

    body {
        font-size: 14px;
    }

    h1 {
        font-size: 22px;
    }

    h2 {
        font-size: 20px;
    }

    h3 {
        font-size: 18px;
    }

    .navbar-brand {
        font-size: 16px;
    }

}

/* ===== SIDEBAR BASE ===== */
.sidebar {
    width: 260px;
    height: 100vh;
    position: fixed;
    /* background: #0f2c54; */
    background: linear-gradient(180deg, #102f5e 0%, #0b2447 100%);
    color: #fff;
    display: flex;
    flex-direction: column;
}

/* ===== LOGO ===== */
.sidebar-logo {
    text-align: center;
    padding: 20px 15px 10px;
}

.sidebar-logo img {
    width: 100px;
    margin-bottom: 10px;
}

.system-title {
    font-size: 13px;
    line-height: 1.4;
    font-weight: 600;
}

/* ===== USER PANEL ===== */
.user-panel {
    text-align: center;
    padding: 15px 10px;
}

.user-avatar {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    margin-bottom: 10px;
}

.user-code {
    font-weight: 600;
    font-size: 14px;
}

.user-name {
    font-size: 13px;
    opacity: 0.9;
}

/* ===== DIVIDER ===== */
.sidebar-divider {
    height: 1px;
    background: rgba(255,255,255,0.15);
    margin: 10px 20px;
}

/* ===== MENU ===== */
.sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-menu li a {
    display: flex;
    align-items: center;
    height: 48px;
    padding: 0 18px;
    font-size: 14px;
    color: #fff;
    text-decoration: none;
    transition: .2s;
}

.sidebar-menu li a i {
    margin-right: 10px;
    font-size: 16px;
}

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

.sidebar-menu li.active a {
    background: rgba(255,255,255,0.12);
}

.sidebar-menu li.active::before {
    content: "";
    position: absolute;
    left: 0;
    height: 48px;
    width: 4px;
    background: #2ecc71;
}

/* ===== LOGO SIZE CONTROL ===== */
.sidebar-logo-img {
    width: 100px;      /* ปรับขนาดตามต้องการ */
    height: auto;     /* รักษาสัดส่วน */
}


/* hide body */
.visit-body{
    display:none;
}

/* show when open */
.visit-item.open .visit-body{
    display:block;
}

/* pointer cursor */
.visit-card{
    cursor:pointer;
}

.visit-card:hover{
    background:#f7f9fc;
}