/* ============================================================
   School 4 Departments — style.css  (Final Fixed)
   Bootstrap 3.4 compatible | Hardcoded layout values
   ============================================================ */

/* ---- BASE ---- */
*, *:before, *:after { box-sizing: border-box; }
body {
    font-family: 'Sarabun', 'Helvetica Neue', Arial, sans-serif;
    font-size: 15px;
    background: #f0f2f5;
    color: #333;
    margin: 0; padding: 0;
    padding-top: 54px;   /* push content below fixed navbar */
}
a { color: #1a3a6b; }
a:hover { color: #2d5fa6; text-decoration: none; }

/* ============================================================
   NAVBAR  (fixed top, full width, z-index above sidebar)
   ============================================================ */
.s4-navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 54px;
    background: #1a3a6b;
    z-index: 1050;
    display: -webkit-flex;
    display: flex;
    -webkit-align-items: center;
    align-items: center;
    -webkit-justify-content: space-between;
    justify-content: space-between;
    padding: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.35);
}

/* Left section */
.s4-navbar-left {
    display: -webkit-flex;
    display: flex;
    -webkit-align-items: center;
    align-items: center;
    overflow: hidden;
    -webkit-flex: 1;
    flex: 1;
    min-width: 0;
}

/* Right section */
.s4-navbar-right {
    display: -webkit-flex;
    display: flex;
    -webkit-align-items: center;
    align-items: center;
    -webkit-flex-shrink: 0;
    flex-shrink: 0;
    padding-right: 8px;
}

/* Hamburger toggle */
.sidebar-toggle-btn {
    background: none;
    border: none;
    color: rgba(255,255,255,0.85);
    font-size: 20px;
    width: 50px;
    height: 54px;
    cursor: pointer;
    -webkit-flex-shrink: 0;
    flex-shrink: 0;
    transition: background 0.15s;
}
.sidebar-toggle-btn:hover,
.sidebar-toggle-btn:focus {
    background: rgba(255,255,255,0.12);
    color: #fff;
    outline: none;
}

/* Brand */
.s4-brand {
    display: -webkit-flex;
    display: flex;
    -webkit-align-items: center;
    align-items: center;
    gap: 8px;
    padding: 0 6px;
    color: #fff !important;
    font-size: 17px;
    font-weight: 700;
    text-decoration: none !important;
    white-space: nowrap;
    max-width: 320px;
    overflow: hidden;
}
.s4-brand:hover { color: rgba(255,255,255,0.9) !important; }
.s4-brand .fa { font-size: 20px; opacity: 0.9; -webkit-flex-shrink: 0; flex-shrink: 0; }
.s4-brand img.s4-brand-logo { height: 30px; border-radius: 3px; -webkit-flex-shrink: 0; flex-shrink: 0; }
.s4-brand span { overflow: hidden; text-overflow: ellipsis; }

.s4-brand-year {
    font-size: 12px;
    color: rgba(255,255,255,0.6);
    padding-left: 12px;
    margin-left: 4px;
    border-left: 1px solid rgba(255,255,255,0.2);
    white-space: nowrap;
}

/* Navbar icon buttons */
.s4-nav-dropdown { position: relative; }
.s4-nav-btn {
    background: none;
    border: none;
    color: rgba(255,255,255,0.85);
    height: 54px;
    padding: 0 12px;
    font-size: 16px;
    cursor: pointer;
    display: -webkit-flex;
    display: flex;
    -webkit-align-items: center;
    align-items: center;
    gap: 5px;
    position: relative;
    transition: background 0.15s, color 0.15s;
    border-radius: 0;
}
.s4-nav-btn:hover,
.s4-nav-btn:focus,
.open > .s4-nav-btn {
    background: rgba(255,255,255,0.15);
    color: #fff;
    outline: none;
}

/* Badge on bell */
.s4-badge {
    position: absolute;
    top: 8px;
    right: 4px;
    background: #e8a020;
    color: #fff;
    border-radius: 10px;
    padding: 0 5px;
    font-size: 10px;
    font-weight: 700;
    min-width: 17px;
    height: 17px;
    line-height: 17px;
    text-align: center;
    border: 2px solid #1a3a6b;
}

/* User avatar in navbar */
.s4-avatar {
    width: 28px; height: 28px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255,255,255,0.3);
}

/* ---- Bootstrap dropdown overrides for navbar ---- */
.s4-navbar .dropdown-menu {
    border-radius: 6px;
    box-shadow: 0 6px 24px rgba(0,0,0,0.18);
    border: 1px solid #e0e0e0;
    margin-top: 0;
    padding: 4px 0;
    min-width: 200px;
}
.s4-navbar .dropdown-menu > li > a {
    padding: 9px 16px;
    font-size: 14px;
    color: #333;
    font-family: 'Sarabun', sans-serif;
}
.s4-navbar .dropdown-menu > li > a:hover {
    background: #f0f4ff;
    color: #1a3a6b;
}
.s4-navbar .dropdown-menu > .dropdown-header {
    font-size: 13px;
    color: #1a3a6b;
    font-weight: 600;
    padding: 10px 14px 8px;
    background: #f5f7fb;
    border-bottom: 1px solid #eee;
}

/* Notification dropdown wider */
.s4-notif-dropdown {
    min-width: 300px;
    max-height: 420px;
    overflow-y: auto;
}
.s4-notif-dropdown > li > a {
    white-space: normal !important;
    padding: 9px 12px !important;
    border-bottom: 1px solid #f5f5f5;
}

/* ============================================================
   SIDEBAR  (fixed left)
   ============================================================ */
#sidebar {
    position: fixed;
    top: 54px;
    left: 0;
    width: 240px;
    height: calc(100vh - 54px);
    background: #1c2a42;
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 1040;
    transition: left 0.28s ease, width 0.28s ease;
    -webkit-overflow-scrolling: touch;
}
#sidebar::-webkit-scrollbar { width: 4px; }
#sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 2px; }

/* User mini card at top */
.sidebar-user {
    display: -webkit-flex;
    display: flex;
    -webkit-align-items: center;
    align-items: center;
    gap: 10px;
    padding: 14px 14px;
    border-bottom: 1px solid rgba(255,255,255,0.07);
    background: rgba(0,0,0,0.15);
}
.sidebar-avatar {
    width: 36px; height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255,255,255,0.2);
    -webkit-flex-shrink: 0;
    flex-shrink: 0;
}
.sidebar-avatar-icon {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.55);
    font-size: 22px;
    display: -webkit-flex;
    display: flex;
    -webkit-align-items: center;
    align-items: center;
    -webkit-justify-content: center;
    justify-content: center;
    -webkit-flex-shrink: 0;
    flex-shrink: 0;
}
.sidebar-user-info { -webkit-flex: 1; flex: 1; min-width: 0; }
.sidebar-user-name {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sidebar-user-role { display: block; font-size: 11px; color: rgba(255,255,255,0.45); }

/* Section headers */
.sidebar-header {
    padding: 16px 14px 4px;
    pointer-events: none;
}
.sidebar-header span {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.3);
}

/* Menu list */
.sidebar-menu {
    list-style: none;
    margin: 4px 0 30px;
    padding: 0;
}
.sidebar-menu > li { margin: 0; }

/* Top-level menu links */
.sidebar-menu > li > a {
    display: -webkit-flex;
    display: flex;
    -webkit-align-items: center;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    color: rgba(255,255,255,0.7);
    text-decoration: none !important;
    font-size: 14px;
    border-left: 3px solid transparent;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.sidebar-menu > li > a:hover {
    background: rgba(255,255,255,0.09);
    color: #fff;
}
.sidebar-menu > li.active > a {
    background: rgba(45,95,166,0.5);
    color: #fff;
    border-left-color: #e8a020;
}
.sidebar-menu > li > a .fa {
    width: 18px;
    text-align: center;
    -webkit-flex-shrink: 0;
    flex-shrink: 0;
    font-size: 14px;
}
.sidebar-menu > li > a .sub-arrow {
    margin-left: auto;
    font-size: 11px;
    transition: transform 0.2s;
}
.sidebar-menu > li.has-sub.sub-open > a .sub-arrow {
    -webkit-transform: rotate(90deg);
    transform: rotate(90deg);
}

/* Badge in menu */
.sidebar-badge {
    background: #e8a020;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 10px;
    margin-left: auto;
    line-height: 15px;
    min-width: 18px;
    text-align: center;
}
.sidebar-badge-mini {
    display: inline-block;
    background: #e74c3c;
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    padding: 0 5px;
    border-radius: 8px;
    line-height: 15px;
    min-width: 16px;
    text-align: center;
    margin-left: 4px;
    vertical-align: middle;
}

/* Submenu */
.sidebar-submenu {
    display: none;
    list-style: none;
    margin: 0;
    padding: 0;
    background: rgba(0,0,0,0.2);
}
.has-sub.sub-open > .sidebar-submenu { display: block; }

.sidebar-submenu > li > a {
    display: -webkit-flex;
    display: flex;
    -webkit-align-items: center;
    align-items: center;
    gap: 8px;
    padding: 8px 14px 8px 44px;
    color: rgba(255,255,255,0.55);
    font-size: 13px;
    text-decoration: none !important;
    transition: background 0.12s, color 0.12s;
}
.sidebar-submenu > li > a:hover,
.sidebar-submenu > li.active > a {
    background: rgba(255,255,255,0.07);
    color: #fff;
}
.sidebar-submenu > li > a .fa { font-size: 12px; width: 14px; text-align: center; }

/* ============================================================
   MAIN CONTENT
   ============================================================ */
#main-content {
    margin-left: 240px;
    min-height: calc(100vh - 54px - 44px);
    background: #f0f2f5;
    transition: margin-left 0.28s ease;
}

/* Footer */
#main-footer {
    margin-left: 240px;
    background: #fff;
    border-top: 1px solid #e2e5ea;
    padding: 11px 20px;
    font-size: 12px;
    color: #999;
    display: -webkit-flex;
    display: flex;
    -webkit-justify-content: space-between;
    justify-content: space-between;
    -webkit-align-items: center;
    align-items: center;
    transition: margin-left 0.28s ease;
}

/* Mobile overlay */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1035;
}
.sidebar-overlay.active { display: block; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 991px) {
    #sidebar { left: -240px; }
    #sidebar.open { left: 0; box-shadow: 4px 0 20px rgba(0,0,0,0.3); }
    #main-content  { margin-left: 0 !important; }
    #main-footer   { margin-left: 0 !important; }
    .s4-brand span { max-width: 160px; font-size: 15px; }
    .s4-brand-year { display: none !important; }
}
@media (max-width: 480px) {
    .s4-brand span { max-width: 110px; font-size: 14px; }
}

/* ============================================================
   PAGE STRUCTURE
   ============================================================ */
.content-header {
    background: #fff;
    border-bottom: 1px solid #e3e6ea;
    padding: 13px 20px 10px;
    display: -webkit-flex;
    display: flex;
    -webkit-align-items: center;
    align-items: center;
    -webkit-justify-content: space-between;
    justify-content: space-between;
    -webkit-flex-wrap: wrap;
    flex-wrap: wrap;
    gap: 8px;
}
.content-header h1 {
    font-size: 20px;
    font-weight: 700;
    color: #1a3a6b;
    margin: 0;
}
.content-header h1 .fa { color: #2d5fa6; margin-right: 6px; }
.content-header .breadcrumb {
    background: none;
    padding: 0; margin: 0;
    font-size: 13px;
    color: #888;
}
.content-header .breadcrumb > .active { color: #555; }
.content-body { padding: 18px 20px; }

/* ============================================================
   PANELS
   ============================================================ */
.panel {
    border: 1px solid #dde1e8;
    border-radius: 6px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.07);
    margin-bottom: 20px;
    background: #fff;
}
.panel-heading {
    background: #f7f8fb;
    border-bottom: 1px solid #dde1e8;
    border-radius: 6px 6px 0 0;
    padding: 11px 16px;
}
.panel-heading h3,
.panel-title {
    font-size: 15px;
    font-weight: 600;
    color: #1a3a6b;
    margin: 0;
    line-height: 1.4;
}
.panel-heading h3 .fa,
.panel-title .fa { color: #2d5fa6; margin-right: 6px; }
.panel-footer {
    background: #f7f8fb;
    border-top: 1px solid #dde1e8;
    border-radius: 0 0 6px 6px;
    padding: 9px 16px;
}

/* Panel color variants */
.panel-primary > .panel-heading { background: #1a3a6b; }
.panel-primary > .panel-heading .panel-title,
.panel-primary > .panel-heading h3 { color: #fff; }
.panel-primary > .panel-heading .panel-title .fa { color: rgba(255,255,255,0.65); }

.panel-warning > .panel-heading { background: #e67e22; }
.panel-warning > .panel-heading .panel-title { color: #fff; }

.panel-filter { background: #f8f9fc; }
.panel-filter .panel-body { padding: 11px 14px; }

/* ============================================================
   STAT CARDS (Dashboard)
   ============================================================ */
.stat-card {
    display: -webkit-flex;
    display: flex;
    -webkit-align-items: center;
    align-items: center;
    gap: 14px;
    padding: 18px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.12);
    text-decoration: none !important;
    position: relative;
    overflow: hidden;
    transition: -webkit-transform 0.15s, transform 0.15s, box-shadow 0.15s;
}
.stat-card:hover {
    -webkit-transform: translateY(-2px);
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0,0,0,0.18);
}
.stat-card::after {
    content: '';
    position: absolute;
    right: -14px; bottom: -14px;
    width: 80px; height: 80px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    pointer-events: none;
}
.stat-blue   { background: #1a3a6b; }
.stat-green  { background: #1b7a4e; }
.stat-orange { background: #c0710f; }
.stat-red    { background: #9b2335; }
.stat-teal   { background: #1a6b6b; }
.stat-purple { background: #5a2d82; }

.stat-icon { font-size: 32px; color: rgba(255,255,255,0.75); -webkit-flex-shrink: 0; flex-shrink: 0; }
.stat-info { -webkit-flex: 1; flex: 1; }
.stat-number { display: block; font-size: 30px; font-weight: 700; color: #fff; line-height: 1.05; }
.stat-label  { display: block; font-size: 12px; color: rgba(255,255,255,0.72); margin-top: 3px; }

/* Welcome banner */
.welcome-banner {
    background: #1a3a6b;
    border-radius: 8px;
    padding: 22px 24px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: relative;
    overflow: hidden;
}
.welcome-banner::after {
    content: '';
    position: absolute;
    right: -20px; top: -20px;
    width: 140px; height: 140px;
    border-radius: 50%;
    background: rgba(255,255,255,0.06);
    pointer-events: none;
}
.welcome-banner h2 { font-size: 20px; font-weight: 700; color: #fff; margin: 0 0 5px; }
.welcome-banner p  { margin: 0; font-size: 13px; color: rgba(255,255,255,0.78); }
.welcome-icon {
    position: absolute; right: 24px; top: 50%;
    -webkit-transform: translateY(-50%);
    transform: translateY(-50%);
    font-size: 56px; color: rgba(255,255,255,0.1);
    pointer-events: none;
}

/* ============================================================
   TABLES
   ============================================================ */
.table { font-size: 14px; }
.table-header th {
    background: #1a3a6b !important;
    color: #fff !important;
    font-weight: 600;
    font-size: 13px;
    border: none !important;
    padding: 10px 12px !important;
    white-space: nowrap;
}
.table > tbody > tr > td { vertical-align: middle; padding: 9px 12px; }
.table-striped > tbody > tr:nth-of-type(odd) { background-color: #f8f9fc; }
.table-hover > tbody > tr:hover { background-color: #eef3ff !important; }

/* ============================================================
   FORMS
   ============================================================ */
.form-control {
    font-family: 'Sarabun', sans-serif;
    font-size: 14px;
    border: 1px solid #ccd1da;
    border-radius: 4px;
    height: 36px;
    padding: 6px 10px;
    color: #333;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.form-control:focus {
    border-color: #2d5fa6;
    box-shadow: 0 0 0 3px rgba(45,95,166,0.13);
    outline: none;
}
textarea.form-control { height: auto; }
select.form-control { height: 36px; }
.form-group.required > label::after { content: ' *'; color: #dc2626; }
.form-section-title {
    font-size: 14px;
    font-weight: 700;
    color: #1a3a6b;
    border-bottom: 2px solid #1a3a6b;
    padding-bottom: 5px;
    margin: 4px 0 14px;
}
.form-actions { margin-top: 6px; }
.form-actions .btn { margin-right: 8px; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn { font-family: 'Sarabun', sans-serif; }
.btn-primary { background-color: #1a3a6b; border-color: #132d54; }
.btn-primary:hover,
.btn-primary:focus { background-color: #2d5fa6; border-color: #1a3a6b; }
.btn-xs { padding: 3px 8px; font-size: 12px; }

/* ============================================================
   ALERTS
   ============================================================ */
.alert {
    border-radius: 5px;
    font-size: 14px;
    border: none;
    border-left: 4px solid transparent;
    padding: 11px 14px;
}
.alert-success { background: #f0fdf4; border-left-color: #22c55e; color: #15803d; }
.alert-danger  { background: #fff1f1; border-left-color: #ef4444; color: #b91c1c; }
.alert-warning { background: #fffbeb; border-left-color: #f59e0b; color: #92400e; }
.alert-info    { background: #eff6ff; border-left-color: #3b82f6; color: #1d4ed8; }

/* ============================================================
   STATUS LABELS
   ============================================================ */
.status-active, .status-approved   { background:#dcfce7; color:#15803d; padding:2px 9px; border-radius:12px; font-size:12px; font-weight:600; }
.status-inactive, .status-rejected, .status-cancelled { background:#fee2e2; color:#b91c1c; padding:2px 9px; border-radius:12px; font-size:12px; font-weight:600; }
.status-pending   { background:#fef9c3; color:#854d0e; padding:2px 9px; border-radius:12px; font-size:12px; font-weight:600; }
.status-done, .status-completed  { background:#dbeafe; color:#1d4ed8; padding:2px 9px; border-radius:12px; font-size:12px; font-weight:600; }
.status-in_progress { background:#ffedd5; color:#9a3412; padding:2px 9px; border-radius:12px; font-size:12px; font-weight:600; }

.priority-low    { background:#dcfce7; color:#15803d; padding:2px 8px; border-radius:10px; font-size:12px; font-weight:600; }
.priority-normal { background:#dbeafe; color:#1d4ed8; padding:2px 8px; border-radius:10px; font-size:12px; font-weight:600; }
.priority-high   { background:#fef9c3; color:#854d0e; padding:2px 8px; border-radius:10px; font-size:12px; font-weight:600; }
.priority-urgent { background:#fee2e2; color:#b91c1c; padding:2px 8px; border-radius:10px; font-size:12px; font-weight:600; }

/* ============================================================
   PAGINATION
   ============================================================ */
.pagination { margin: 0; }
.pagination > li > a {
    color: #1a3a6b; font-size: 13px;
    padding: 5px 10px;
    border: 1px solid #ddd;
    border-radius: 4px !important;
    margin: 0 2px;
}
.pagination > li > a:hover { background: #f0f4ff; }
.pagination > .active > a,
.pagination > .active > a:hover { background: #1a3a6b; border-color: #132d54; color: #fff !important; }
.pagination > .disabled > a { color: #ccc; }

/* ============================================================
   MODALS
   ============================================================ */
.modal-content { border-radius: 8px; border: none; box-shadow: 0 12px 40px rgba(0,0,0,0.22); }
.modal-header  { border-radius: 8px 8px 0 0; padding: 13px 18px; }
.modal-footer  { background: #f9f9f9; border-top: 1px solid #eee; border-radius: 0 0 8px 8px; }
.bg-danger  { background-color: #dc2626 !important; }
.bg-success { background-color: #16a34a !important; }
.bg-primary { background-color: #1a3a6b !important; }
.text-white { color: #fff !important; }

/* ============================================================
   TABS
   ============================================================ */
.nav-tabs-styled { border-bottom: 2px solid #1a3a6b; margin-bottom: 0; }
.nav-tabs-styled > li > a {
    border-radius: 6px 6px 0 0;
    color: #555; padding: 9px 16px; font-size: 14px;
    border: 1px solid transparent !important;
}
.nav-tabs-styled > li > a:hover { background: #eef3ff; color: #1a3a6b; }
.nav-tabs-styled > li.active > a,
.nav-tabs-styled > li.active > a:hover {
    background: #1a3a6b; color: #fff;
    border-color: #1a3a6b !important;
}
.nav-tabs-styled .badge { background: #e8a020; }

/* ============================================================
   NOTIFICATIONS PAGE
   ============================================================ */
.notif-item {
    display: -webkit-flex; display: flex;
    -webkit-align-items: flex-start; align-items: flex-start;
    gap: 12px; padding: 13px 16px !important;
    border-bottom: 1px solid #f0f0f0;
    text-decoration: none !important;
    color: #333;
    transition: background 0.1s;
}
.notif-item:hover { background: #f5f8ff; }
.notif-item-unread { background: #eef3ff !important; }
.notif-icon { color: #2d5fa6; font-size: 17px; margin-top: 2px; -webkit-flex-shrink: 0; flex-shrink: 0; }
.notif-content { -webkit-flex: 1; flex: 1; }
.notif-content strong { font-size: 14px; display: block; color: #1a3a6b; }
.notif-content p { font-size: 13px; color: #555; margin: 2px 0 0; }

/* ============================================================
   PROFILE
   ============================================================ */
.profile-avatar-img { width: 100px; height: 100px; border-radius: 50%; object-fit: cover; border: 3px solid #1a3a6b; }

/* ============================================================
   PROGRESS
   ============================================================ */
.progress { border-radius: 10px; background: #e8eaed; overflow: hidden; }
.progress-xs { height: 6px; margin-bottom: 2px; }
.progress-bar { border-radius: 10px; }

/* ============================================================
   PASSWORD STRENGTH
   ============================================================ */
.strength-bar { height: 6px; border-radius: 3px; transition: width 0.3s, background 0.3s; margin-bottom: 4px; }

/* ============================================================
   LOGIN PAGE
   ============================================================ */
body.login-body {
    background: #1a3a6b;
    padding-top: 0;
    min-height: 100vh;
    display: -webkit-flex;
    display: flex;
    -webkit-align-items: center;
    align-items: center;
    -webkit-justify-content: center;
    justify-content: center;
}
.login-box {
    background: #fff;
    border-radius: 10px;
    padding: 34px 34px 26px;
    max-width: 400px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0,0,0,0.35);
}
.login-logo { text-align: center; margin-bottom: 22px; }
.login-logo .fa { font-size: 52px; color: #1a3a6b; }
.login-logo h2 { font-size: 20px; font-weight: 700; color: #1a3a6b; margin: 8px 0 2px; }
.login-logo p { color: #888; font-size: 13px; }

/* ============================================================
   MISC
   ============================================================ */
code { background: #f1f3f5; padding: 2px 6px; border-radius: 3px; font-size: 12px; color: #c0392b; }
.list-group-flush .list-group-item { border-left: none; border-right: none; border-radius: 0 !important; }
.list-group-flush .list-group-item:first-child { border-top: none; }
.clearfix::after { content: ''; display: table; clear: both; }

/* Back to top */
#back-to-top {
    position: fixed;
    bottom: 22px; right: 22px;
    width: 38px; height: 38px;
    background: #1a3a6b; color: #fff;
    border-radius: 50%;
    text-align: center; line-height: 38px;
    font-size: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.22);
    display: none; z-index: 999;
    text-decoration: none !important;
    transition: background 0.15s;
}
#back-to-top:hover { background: #2d5fa6; }

/* Mobile tweaks */
@media (max-width: 767px) {
    .content-header { padding: 10px 12px; }
    .content-body   { padding: 10px; }
    .content-header h1 { font-size: 17px; }
    .welcome-banner { padding: 16px; }
    .welcome-icon   { display: none; }
    .stat-number { font-size: 22px; }
    .stat-icon   { font-size: 24px; }
    .table-responsive { border: none; }
}


/* Force clean print layout: hide system header/sidebar and Bootstrap printed hrefs */
@media print {
  .s4-navbar, #sidebar, #sidebarOverlay, .sidebar-overlay, #main-footer,
  .main-sidebar, .main-header, .navbar, .sidebar, .content-header,
  .breadcrumb, .no-print, .btn, button, form, .alert {
    display: none !important;
    visibility: hidden !important;
  }
  html, body {
    margin: 0 !important;
    padding: 0 !important;
    background: #fff !important;
    width: 100% !important;
  }
  #main-content, .content-wrapper, .content, .content-body, .container, .container-fluid {
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    max-width: none !important;
    min-height: auto !important;
    background: #fff !important;
  }
  a[href]:after, abbr[title]:after {
    content: "" !important;
  }
}
