/*
 * modern.css - shared look for the JustSMS RCS panel and admin panel.
 * Loaded last from Session::commonCSS(), so it layers over Bootstrap 3 +
 * the FlatLab theme (style.css / style-responsive.css) without replacing them.
 * The same file lives in theme/css/ and adminpanel/theme/css/ - keep them identical.
 *
 * Layout notes (driven by theme/js/common-scripts.js, do not change widths):
 *   - header is 60px tall, sidebar is 210px wide; the toggle JS writes
 *     margin-left 0/210px inline on #main-content and #sidebar.
 *   - component rules are scoped under #main-content so they win over the
 *     <style> blocks that AJAX-loaded pages inject.
 */

:root {
    --brand: #4f46e5;
    --brand-600: #4338ca;
    --brand-700: #3730a3;
    --brand-50: #eef2ff;
    --brand-100: #e0e7ff;
    --success: #16a34a;
    --success-600: #15803d;
    --success-50: #f0fdf4;
    --danger: #dc2626;
    --danger-600: #b91c1c;
    --danger-50: #fef2f2;
    --warning: #d97706;
    --warning-600: #b45309;
    --warning-50: #fffbeb;
    --info: #0891b2;
    --info-600: #0e7490;
    --info-50: #ecfeff;
    --ink: #0f172a;
    --text: #334155;
    --muted: #64748b;
    --faint: #94a3b8;
    --line: #e2e8f0;
    --line-soft: #f1f5f9;
    --bg: #f4f6fb;
    --card: #ffffff;
    --nav-bg: #111827;
    --nav-bg-2: #1f2937;
    --nav-text: #cbd5e1;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06);
    --shadow: 0 1px 3px rgba(15, 23, 42, .06), 0 6px 16px rgba(15, 23, 42, .06);
    --shadow-lg: 0 20px 45px rgba(15, 23, 42, .14);
    --font: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* ---------- Base & typography ---------- */

html { -webkit-text-size-adjust: 100%; }

body {
    font-family: var(--font);
    font-size: 14px;
    line-height: 1.55;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
    font-family: var(--font);
    color: var(--ink);
    font-weight: 600;
    letter-spacing: -.01em;
}

a { color: var(--brand); transition: color .15s ease; }
a:hover, a:focus { color: var(--brand-700); }

hr { border-color: var(--line); }

::-webkit-input-placeholder { color: var(--faint); }
::-moz-placeholder { color: var(--faint); opacity: 1; }
:-ms-input-placeholder { color: var(--faint); }
::placeholder { color: var(--faint); }

::selection { background: var(--brand); color: #fff; }

.text-muted { color: var(--muted) !important; }
.text-danger { color: var(--danger); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }

/* NProgress bar used by setState/setStateGet */
#nprogress .bar { background: var(--brand) !important; height: 3px !important; }
#nprogress .peg { box-shadow: 0 0 10px var(--brand), 0 0 5px var(--brand) !important; }
#nprogress .spinner-icon { border-top-color: var(--brand) !important; border-left-color: var(--brand) !important; }

/* ---------- App shell: header ---------- */

.header.app-header {
    top: 0;
    height: 60px;
    min-height: 60px;
    padding: 0 20px 0 0;
    display: flex;
    align-items: center;
    background: var(--card);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
}

.app-header .app-brand {
    width: 210px;
    flex: 0 0 210px;
    height: 60px;
    display: flex;
    align-items: center;
    padding: 0 14px 0 18px;
    background: var(--nav-bg);
}

.app-header .sidebar-toggle-box {
    float: none;
    margin: 0 0 0 14px;
    padding: 0;
    order: 2;
}

.app-header .sidebar-toggle-box .fa-bars {
    width: 38px;
    height: 38px;
    line-height: 38px;
    text-align: center;
    font-size: 17px;
    color: var(--muted);
    border-radius: var(--radius-sm);
    transition: background .15s ease, color .15s ease;
}

.app-header .sidebar-toggle-box .fa-bars:hover {
    background: var(--line-soft);
    color: var(--ink);
}

.app-header a.logo {
    float: none;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 17px;
    font-weight: 700;
    letter-spacing: .01em;
    color: #fff;
    text-transform: none;
    white-space: nowrap;
}

.app-header a.logo:hover, .app-header a.logo:focus { color: #fff; }

.app-header a.logo .logo-text { color: inherit; }
.app-header a.logo .logo-text span { color: #a5b4fc; }

.logo-mark {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    font-size: 16px;
    box-shadow: 0 4px 12px rgba(99, 102, 241, .45);
}

.app-header .app-notice {
    flex: 1 1 auto;
    min-width: 0;
    margin: 0 20px;
    order: 3;
}

.app-header .top-nav {
    order: 4;
    margin: 0 0 0 auto;
    float: none;
}

.app-header .top-nav ul.top-menu { margin: 0; padding: 0; }
.app-header .top-nav ul.top-menu > li { margin: 0; }

.app-header .top-nav ul.top-menu > li > a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px 10px 5px 5px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--card);
    color: var(--text);
}

.app-header .top-nav ul.top-menu > li > a:hover,
.app-header .top-nav ul.top-menu > li > a:focus,
.app-header .top-nav ul.top-menu > li.open > a {
    background: var(--line-soft);
    border-color: var(--line);
}

.app-header .avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--brand-50);
    color: var(--brand);
    font-weight: 700;
    font-size: 13px;
}

.app-header .top-nav .username {
    font-size: 13px;
    font-weight: 600;
    color: var(--ink);
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.app-header .top-nav .dropdown-menu.extended.logout {
    top: 48px;
    width: 220px !important;
    padding: 6px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
}

.app-header .dropdown-menu.extended.logout > li,
.app-header .dropdown-menu.extended.logout > li:last-child {
    float: none;
    width: 100%;
    text-align: left;
    background: none;
    border-radius: 0;
}

.app-header .dropdown-menu.extended.logout > li > a,
.app-header .dropdown-menu.extended.logout > li:last-child > a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 13px;
    font-weight: 500;
    text-transform: none;
}

.app-header .dropdown-menu.extended.logout > li > a > i {
    display: inline-block;
    width: 16px;
    font-size: 14px;
    color: var(--muted);
}

.app-header .dropdown-menu.extended.logout > li > a:hover {
    background: var(--line-soft) !important;
    color: var(--ink);
}

.app-header .dropdown-menu.extended.logout > li.menu-danger > a,
.app-header .dropdown-menu.extended.logout > li.menu-danger > a > i { color: var(--danger); }

.app-header .dropdown-menu.extended.logout > li.menu-danger > a:hover { background: var(--danger-50) !important; }

.app-header .dropdown-menu .menu-head {
    padding: 8px 12px 10px;
    margin-bottom: 4px;
    border-bottom: 1px solid var(--line-soft);
    font-size: 12px;
    color: var(--muted);
}

.app-header .dropdown-menu .menu-head strong { display: block; color: var(--ink); font-size: 13px; }

.app-header .log-arrow-up { display: none; }

/* notification ticker (add_notification) */
.marquee {
    position: relative;
    margin: 0;
    height: 34px;
    line-height: 34px;
    padding: 0 14px 0 40px;
    border-radius: 999px;
    background: var(--brand-50);
    color: var(--brand-700) !important;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    box-sizing: border-box;
}

.marquee:before {
    content: "\f0a1"; /* fa-bullhorn */
    font-family: FontAwesome;
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 34px;
    text-align: center;
    background: var(--brand-50);
    color: var(--brand);
    z-index: 1;
}

.marquee p {
    display: inline-block;
    margin: 0;
    padding-left: 100%;
    animation: marquee 22s linear infinite;
}

@keyframes marquee {
    0%   { transform: translate(0, 0); }
    100% { transform: translate(-100%, 0); }
}

/* ---------- App shell: sidebar ---------- */

#sidebar {
    top: 60px;
    bottom: 0;
    height: auto;
    width: 210px;
    background: var(--nav-bg);
    overflow-y: auto !important;
    overflow-x: hidden !important;
    z-index: 1001;
    transition: margin-left .2s ease;
}

#sidebar::-webkit-scrollbar { width: 6px; }
#sidebar::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .12); border-radius: 6px; }

#sidebar .nav-label {
    display: block;
    padding: 18px 12px 8px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #6b7280;
}

ul.sidebar-menu { margin: 0 0 24px; padding: 0; }

ul.sidebar-menu li {
    margin: 0 10px 2px;
    line-height: normal;
}

ul.sidebar-menu li a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    color: var(--nav-text);
    font-size: 13.5px;
    font-weight: 500;
    transition: background .15s ease, color .15s ease;
}

ul.sidebar-menu li a i {
    width: 20px;
    padding: 0;
    text-align: center;
    font-size: 15px;
    color: #9ca3af;
    transition: color .15s ease;
}

ul.sidebar-menu li a:hover,
ul.sidebar-menu li a:focus {
    display: flex;
    background: var(--nav-bg-2);
    color: #fff;
    border-radius: var(--radius-sm);
}

ul.sidebar-menu li a:hover i,
ul.sidebar-menu li a:focus i { color: #fff; }

ul.sidebar-menu li a.active,
ul.sidebar-menu li.active > a {
    display: flex;
    background: var(--brand);
    color: #fff;
    border-radius: var(--radius-sm);
    box-shadow: 0 4px 12px rgba(79, 70, 229, .35);
}

ul.sidebar-menu li a.active i,
ul.sidebar-menu li.active > a i { color: #fff; }

ul.sidebar-menu li ul.sub li { background: transparent; }
ul.sidebar-menu li ul.sub li a { padding: 8px 12px 8px 42px; height: auto; line-height: normal; font-size: 13px; }

/* ---------- App shell: content & footer ---------- */

#main-content {
    margin-left: 210px;
    min-height: calc(100vh - 52px);
    transition: margin-left .2s ease;
}

#main-content .wrapper {
    display: inline-block; /* block would let margin-top collapse and push the fixed header down */
    vertical-align: top;
    margin-top: 60px;
    padding: 24px 24px 8px;
    width: 100%;
}

#main-content .wrapper.white-bg { background: transparent; border: 0; }

.site-footer {
    position: static;
    margin-left: 210px;
    padding: 16px 24px;
    background: transparent;
    color: var(--muted);
    font-size: 12.5px;
    border-top: 1px solid var(--line);
    transition: margin-left .2s ease;
}

.site-footer a, .site-footer a:hover { color: var(--text); font-weight: 600; }
.site-footer .go-top { display: none; }

#container.sidebar-closed .site-footer { margin-left: 0; }

/* page heading inserted at the top of every tab */
.page-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0 0 20px;
}

.page-head .page-title {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 21px;
    font-weight: 700;
    color: var(--ink);
}

.page-head .page-icon {
    width: 40px;
    height: 40px;
    border-radius: 11px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--brand-50);
    color: var(--brand);
    font-size: 17px;
}

.page-head .page-sub {
    margin: 4px 0 0 52px;
    color: var(--muted);
    font-size: 13px;
}

/* full-page loader on the home pages */
.formLoader.app-loader {
    position: fixed;
    inset: 0;
    margin: 0;
    width: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    background: var(--bg);
    z-index: 3000;
    color: var(--muted);
    font-size: 13px;
}

.app-loader .spinner {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 3px solid var(--brand-100);
    border-top-color: var(--brand);
    animation: app-spin .8s linear infinite;
}

.app-loader .loader-brand { font-size: 18px; font-weight: 700; color: var(--ink); }

@keyframes app-spin { to { transform: rotate(360deg); } }

/* ---------- Cards: .panel (Bootstrap/FlatLab) and .box (AdminLTE style) ---------- */

#main-content .panel {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--card);
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}

#main-content .panel:empty { display: none; }

#main-content .panel-heading {
    padding: 14px 20px;
    background: var(--card);
    border-bottom: 1px solid var(--line);
    border-radius: var(--radius) var(--radius) 0 0;
    font-size: 15px;
    font-weight: 600;
    color: var(--ink);
    text-transform: none;
}

#main-content .panel-heading b,
#main-content .panel-heading strong { color: var(--ink) !important; font-weight: 600; }

#main-content .panel-body { padding: 20px; }

#main-content .panel-footer {
    background: #f8fafc;
    border-top: 1px solid var(--line);
    border-radius: 0 0 var(--radius) var(--radius);
}

#main-content .box {
    background: var(--card);
    border: 1px solid var(--line);
    border-top: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    margin-bottom: 20px;
    overflow: hidden;
}

#main-content .box.box-primary { border-top: 3px solid var(--brand); }

#main-content .box-header {
    padding: 13px 18px;
    background: #f8fafc;
    color: var(--ink);
    border-bottom: 1px solid var(--line);
}

#main-content .box-solid.box-primary > .box-header { background: var(--brand-50); }

#main-content .box-title {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: var(--ink);
}

#main-content .box-solid.box-primary > .box-header .box-title { color: var(--brand-700); }

#main-content .box-body { padding: 18px; }

#main-content .card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

#main-content .well {
    background: #f8fafc;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    box-shadow: none;
}

/* ---------- Buttons ---------- */

.btn {
    font-family: var(--font);
    font-weight: 600;
    font-size: 13.5px;
    line-height: 1.4;
    padding: 8px 15px;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    box-shadow: none;
    transition: background .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease, transform .05s ease;
}

.btn:active, .btn.active { transform: translateY(1px); box-shadow: none; }
.btn:focus, .btn.focus, .btn:active:focus { outline: 0; box-shadow: 0 0 0 3px rgba(79, 70, 229, .25); }

.btn .fa { margin-right: 2px; }

.btn-sm, .btn-group-sm > .btn { padding: 6px 11px; font-size: 12.5px; border-radius: 7px; }
.btn-xs, .btn-group-xs > .btn { padding: 3px 8px; font-size: 12px; border-radius: 6px; }
.btn-lg, .btn-group-lg > .btn { padding: 11px 20px; font-size: 15px; border-radius: 10px; }
.btn-rounded { border-radius: 999px; }

.btn-default {
    background: var(--card);
    border-color: var(--line);
    color: var(--text);
}
.btn-default:hover, .btn-default:focus, .btn-default:active, .btn-default.active, .open > .dropdown-toggle.btn-default {
    background: var(--line-soft);
    border-color: #cbd5e1;
    color: var(--ink);
}

.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover, .btn-primary:focus, .btn-primary:active, .btn-primary.active, .open > .dropdown-toggle.btn-primary {
    background: var(--brand-600); border-color: var(--brand-600); color: #fff;
}

.btn-success { background: var(--success); border-color: var(--success); color: #fff; }
.btn-success:hover, .btn-success:focus, .btn-success:active, .btn-success.active {
    background: var(--success-600); border-color: var(--success-600); color: #fff;
}
.btn-success:focus { box-shadow: 0 0 0 3px rgba(22, 163, 74, .25); }

.btn-info { background: var(--info); border-color: var(--info); color: #fff; }
.btn-info:hover, .btn-info:focus, .btn-info:active, .btn-info.active {
    background: var(--info-600); border-color: var(--info-600); color: #fff;
}

.btn-warning { background: var(--warning); border-color: var(--warning); color: #fff; }
.btn-warning:hover, .btn-warning:focus, .btn-warning:active, .btn-warning.active {
    background: var(--warning-600); border-color: var(--warning-600); color: #fff;
}

.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-danger:hover, .btn-danger:focus, .btn-danger:active, .btn-danger.active {
    background: var(--danger-600); border-color: var(--danger-600); color: #fff;
}
.btn-danger:focus { box-shadow: 0 0 0 3px rgba(220, 38, 38, .25); }

.btn-link { color: var(--brand); font-weight: 600; }
.btn-link:hover, .btn-link:focus { color: var(--brand-700); text-decoration: none; }

.btn.disabled, .btn[disabled], fieldset[disabled] .btn { opacity: .55; }

/* buttons placed side by side in a tab toolbar */
#main-content .panel-body > .btn,
#main-content .panel-body > a.btn { margin: 0 6px 8px 0; }

/* ---------- Forms ---------- */

#main-content label,
#main-content .control-label,
#main-content .form-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 6px;
}

#main-content .form-group { margin-bottom: 16px; }

.form-control,
#main-content .form-control {
    height: 40px;
    padding: 8px 12px;
    font-family: var(--font);
    font-size: 14px;
    color: var(--ink) !important; /* bootstrap-reset.css forces #777 !important */
    background-color: var(--card);
    border: 1px solid #cbd5e1;
    border-radius: var(--radius-sm);
    box-shadow: none;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.form-control:focus,
#main-content .form-control:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, .15);
    outline: 0;
}

textarea.form-control,
#main-content textarea.form-control { height: auto; min-height: 90px; line-height: 1.5; }

select.form-control,
#main-content select.form-control { padding-right: 28px; }

select[multiple].form-control,
#main-content select[multiple].form-control { height: auto; }

input[type="file"].form-control,
#main-content input[type="file"].form-control { height: auto; padding: 7px 10px; }

.form-control[disabled], .form-control[readonly], fieldset[disabled] .form-control {
    background: #f8fafc;
    color: var(--muted);
}

#main-content .input-group-addon {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: var(--muted);
    border-radius: var(--radius-sm);
}

#main-content .input-group .form-control:first-child,
#main-content .input-group-addon:first-child { border-top-right-radius: 0; border-bottom-right-radius: 0; }
#main-content .input-group .form-control:last-child,
#main-content .input-group-addon:last-child { border-top-left-radius: 0; border-bottom-left-radius: 0; }

#main-content .help-block, #main-content .hint { color: var(--muted); font-size: 12.5px; }

#main-content .error, #main-content .has-error .help-block { color: var(--danger); font-size: 12.5px; }
#main-content .has-error .form-control { border-color: var(--danger); }

#main-content input[type="checkbox"], #main-content input[type="radio"] { accent-color: var(--brand); }

#main-content .form-inline .form-control { margin: 0 6px 8px 0; }

/* search / filter rows built as tables (credit_log, view pages) */
#main-content form .table-filter,
#main-content #searchForm table { margin: 0 auto 6px; border-collapse: separate; border-spacing: 8px 0; }

/* ---------- Tables ---------- */

#unseen, .table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; }

#main-content .table {
    margin-bottom: 16px;
    background: var(--card);
    color: var(--text);
    font-size: 13.5px;
}

#main-content .table > thead > tr > th,
#main-content .table > tbody > tr > th,
#main-content .table > tr > th {
    padding: 11px 12px;
    background: #f8fafc;
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .03em;
    text-transform: uppercase;
    white-space: nowrap;
    border-bottom: 1px solid var(--line);
    vertical-align: middle;
}

#main-content .table > thead > tr > td,
#main-content .table > tbody > tr > td,
#main-content .table > tfoot > tr > td,
#main-content .table > tr > td {
    padding: 10px 12px;
    border-top: 1px solid var(--line-soft);
    vertical-align: middle;
}

#main-content .table-condensed > thead > tr > th,
#main-content .table-condensed > tbody > tr > th,
#main-content .table-condensed > tbody > tr > td { padding: 8px 10px; }

#main-content .table-bordered {
    border: 1px solid var(--line);
    border-radius: 10px;
    border-collapse: separate;
    border-spacing: 0;
    overflow: hidden;
}

#main-content .table-bordered > thead > tr > th,
#main-content .table-bordered > tbody > tr > th,
#main-content .table-bordered > tbody > tr > td,
#main-content .table-bordered > thead > tr > td {
    border: 0;
    border-bottom: 1px solid var(--line-soft);
}

#main-content .table-bordered > tbody > tr:last-child > td { border-bottom: 0; }

#main-content .table-striped > tbody > tr:nth-of-type(odd) { background: #fafbfd; }
#main-content .table-hover > tbody > tr:hover { background: var(--brand-50); }

#main-content .table .btn + .btn { margin-left: 4px; }

/* ---------- Alerts ---------- */

.alert {
    position: relative;
    padding: 12px 16px 12px 16px;
    border: 1px solid transparent;
    border-left-width: 4px;
    border-radius: 10px;
    font-size: 13.5px;
}

.alert-success { background: var(--success-50); border-color: #bbf7d0; border-left-color: var(--success); color: #14532d; }
.alert-info    { background: var(--info-50);    border-color: #a5f3fc; border-left-color: var(--info);    color: #164e63; }
.alert-warning { background: var(--warning-50); border-color: #fde68a; border-left-color: var(--warning); color: #78350f; }
.alert-danger  { background: var(--danger-50);  border-color: #fecaca; border-left-color: var(--danger);  color: #7f1d1d; }

.alert a, .alert .alert-link { font-weight: 600; color: inherit; text-decoration: underline; }
.alert .close { opacity: .45; }

/* ---------- Labels / badges ---------- */

.label {
    display: inline-block;
    padding: 4px 9px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: .01em;
}

.label-default { background: var(--line-soft); color: var(--text); }
.label-primary { background: var(--brand-50); color: var(--brand-700); }
.label-success { background: #dcfce7; color: #166534; }
.label-info    { background: #cffafe; color: #155e75; }
.label-warning { background: #fef3c7; color: #92400e; }
.label-danger  { background: #fee2e2; color: #991b1b; }

.badge { background: var(--brand); border-radius: 999px; font-weight: 600; }

/* ---------- Pagination (Session::showPagination* and Bootstrap) ---------- */

.pagination,
div.pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    height: auto;
    margin: 16px 0 6px;
    padding: 0;
    line-height: normal;
    font-size: 13px;
    background: none;
    border: 0;
}

div.pagination a,
div.pagination a:link,
div.pagination span.current,
div.pagination span.disabled {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    margin: 0;
    padding: 0 11px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--card);
    color: var(--text);
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: background .15s ease, border-color .15s ease, color .15s ease;
}

div.pagination a:hover {
    font-size: 13px;
    background: var(--brand-50);
    border-color: var(--brand-100);
    color: var(--brand-700);
}

div.pagination span.current {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
    font-weight: 600;
    cursor: default;
}

div.pagination span.disabled { color: var(--faint); background: #f8fafc; cursor: not-allowed; }

.pagination > li > a,
.pagination > li > span {
    margin: 0;
    border-radius: var(--radius-sm) !important;
    border-color: var(--line);
    color: var(--text);
}

.pagination > .active > a,
.pagination > .active > span,
.pagination > .active > a:hover { background: var(--brand); border-color: var(--brand); }

/* ---------- Modals, dropdowns, tabs ---------- */

.modal-content {
    border: 0;
    border-radius: 14px;
    box-shadow: var(--shadow-lg);
}

.modal-header { padding: 16px 20px; border-bottom: 1px solid var(--line); }
.modal-header .modal-title { font-weight: 600; color: var(--ink); }
.modal-body { padding: 20px; }
.modal-footer { padding: 14px 20px; border-top: 1px solid var(--line); background: #f8fafc; border-radius: 0 0 14px 14px; }
.modal-backdrop.in { opacity: .45; }

.dropdown-menu {
    border: 1px solid var(--line);
    border-radius: 10px;
    box-shadow: var(--shadow-lg);
    padding: 6px;
    font-size: 13.5px;
}

.dropdown-menu > li > a { padding: 8px 12px; border-radius: 6px; color: var(--text); }
.dropdown-menu > li > a:hover, .dropdown-menu > li > a:focus { background: var(--line-soft); color: var(--ink); }

#main-content .nav-tabs { border-bottom: 1px solid var(--line); }
#main-content .nav-tabs > li > a { border: 0; border-bottom: 2px solid transparent; border-radius: 0; color: var(--muted); font-weight: 600; }
#main-content .nav-tabs > li.active > a,
#main-content .nav-tabs > li.active > a:hover,
#main-content .nav-tabs > li.active > a:focus { border: 0; border-bottom: 2px solid var(--brand); color: var(--brand); background: transparent; }

/* ---------- Dashboard ---------- */

.dash-hero {
    position: relative;
    overflow: hidden;
    padding: 26px 28px;
    margin-bottom: 22px;
    border-radius: 16px;
    color: #fff;
    background: linear-gradient(120deg, #4f46e5 0%, #6d28d9 55%, #9333ea 100%);
    box-shadow: 0 12px 30px rgba(79, 70, 229, .28);
}

.dash-hero:after {
    content: "";
    position: absolute;
    right: -60px;
    top: -60px;
    width: 240px;
    height: 240px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .08);
}

.dash-hero h2 { margin: 0 0 6px; color: #fff; font-size: 24px; font-weight: 700; }
.dash-hero p { margin: 0; color: rgba(255, 255, 255, .85); font-size: 14px; }
.dash-hero .hero-date {
    display: inline-block;
    margin-top: 14px;
    padding: 5px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .16);
    font-size: 12.5px;
    font-weight: 500;
}

.section-title {
    margin: 4px 0 12px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--muted);
}

.quick-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.quick-card {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--card);
    box-shadow: var(--shadow-sm);
    color: var(--text);
    cursor: pointer;
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}

.quick-card:hover, .quick-card:focus {
    transform: translateY(-2px);
    border-color: var(--brand-100);
    box-shadow: var(--shadow);
    color: var(--text);
}

.quick-card .qc-icon {
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    border-radius: 11px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    background: var(--brand-50);
    color: var(--brand);
}

.quick-card .qc-icon.tone-green  { background: #dcfce7; color: var(--success); }
.quick-card .qc-icon.tone-cyan   { background: #cffafe; color: var(--info); }
.quick-card .qc-icon.tone-amber  { background: #fef3c7; color: var(--warning); }
.quick-card .qc-icon.tone-rose   { background: #ffe4e6; color: #e11d48; }
.quick-card .qc-icon.tone-violet { background: #ede9fe; color: #7c3aed; }

.quick-card .qc-title { display: block; margin-bottom: 3px; font-weight: 600; color: var(--ink); font-size: 14.5px; }
.quick-card .qc-desc { display: block; color: var(--muted); font-size: 12.5px; line-height: 1.45; }

/* stat tiles (admin home .small-box) */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 16px;
    margin-bottom: 22px;
}

#main-content .small-box {
    position: relative;
    display: block;
    overflow: hidden;
    min-height: 112px;
    padding: 0;
    border-radius: var(--radius);
    color: #fff;
    box-shadow: var(--shadow);
}

#main-content .small-box > .inner { position: relative; z-index: 1; padding: 18px 20px; }

#main-content .small-box h3,
#main-content .small-box .numberFont {
    margin: 0 0 6px;
    padding: 0;
    color: #fff;
    font-size: 28px !important;
    font-weight: 700;
    line-height: 1.1;
    white-space: nowrap;
    text-align: left;
}

#main-content .small-box p { margin: 0; color: rgba(255, 255, 255, .88); font-size: 13px; font-weight: 500; text-align: left; }

#main-content .small-box .icon { position: absolute; right: 14px; top: 14px; color: rgba(255, 255, 255, .22); z-index: 0; display: block !important; }
#main-content .small-box .icon > i,
#main-content .small-box .iconFont { position: static; font-size: 46px !important; }

#main-content .small-box.bg-info    { background: linear-gradient(135deg, #0891b2, #06b6d4) !important; }
#main-content .small-box.bg-success { background: linear-gradient(135deg, #16a34a, #22c55e) !important; }
#main-content .small-box.bg-warning { background: linear-gradient(135deg, #d97706, #f59e0b) !important; }
#main-content .small-box.bg-danger  { background: linear-gradient(135deg, #dc2626, #f43f5e) !important; }
#main-content .small-box.bg-primary { background: linear-gradient(135deg, #4f46e5, #7c3aed) !important; }

/* ---------- Login screen (admin/index.php + login_process.php) ---------- */

body.auth-body {
    min-height: 100vh;
    background: radial-gradient(1200px 600px at 10% -10%, #c7d2fe 0%, transparent 60%),
                radial-gradient(900px 500px at 110% 110%, #ddd6fe 0%, transparent 55%),
                var(--bg) !important;
}

body.auth-body .formLoader { display: none; }

.auth-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 16px 80px;
}

.auth-card {
    width: 100%;
    max-width: 410px;
    padding: 34px 32px 28px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--card);
    box-shadow: var(--shadow-lg);
    text-align: left;
}

.auth-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 26px; }
.auth-brand .logo-mark { width: 44px; height: 44px; border-radius: 12px; font-size: 20px; }
.auth-brand .brand-name { display: block; font-size: 20px; font-weight: 700; color: var(--ink); line-height: 1.2; }
.auth-brand .brand-tag { display: block; font-size: 12.5px; color: var(--muted); }

.auth-card h1 { margin: 0 0 4px; font-size: 22px; font-weight: 700; color: var(--ink); }
.auth-card .auth-lead { margin: 0 0 22px; color: var(--muted); font-size: 13.5px; }

.auth-field { position: relative; margin-bottom: 16px; }
.auth-field label { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 600; color: var(--ink); }
.auth-input { position: relative; }
.auth-input .fa {
    position: absolute;
    left: 15px;
    top: 50%;
    margin-top: -8px;
    line-height: 16px;
    color: var(--faint);
    font-size: 15px;
    pointer-events: none;
}
.auth-input .form-control:focus + .fa { color: var(--brand); }
.auth-wrap { width: 100%; max-width: 410px; }

.auth-card .form-control {
    height: 46px;
    padding-left: 40px;
    font-size: 14.5px;
    border-radius: 10px;
}

.auth-error { margin: 6px 0 0; color: var(--danger); font-size: 12.5px; font-weight: 500; }
.auth-error:empty { display: none; }

.auth-card .btn-login {
    display: block;
    width: 100%;
    height: 46px;
    margin-top: 6px;
    border-radius: 10px;
    font-size: 15px;
    line-height: 30px;
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    border: 0;
    color: #fff;
    box-shadow: 0 8px 20px rgba(79, 70, 229, .35);
}

.auth-card .btn-login:hover, .auth-card .btn-login:focus { color: #fff; filter: brightness(1.06); }

.auth-links { margin-top: 16px; text-align: center; font-size: 13px; }
.auth-links a { color: var(--brand); font-weight: 600; cursor: pointer; }

.auth-powered {
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid var(--line-soft);
    text-align: center;
    font-size: 11.5px;
    color: var(--faint);
    text-transform: uppercase;
    letter-spacing: .08em;
}

.auth-powered img { display: block; max-width: 150px; height: auto; margin: 8px auto 0; }

.auth-footer {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 12px 16px;
    text-align: center;
    font-size: 12px;
    color: var(--muted);
}

.auth-footer a, .auth-footer a:hover { color: var(--text); font-weight: 600; }

/* ---------- Responsive ---------- */

@media (max-width: 991px) {
    .app-header .app-notice { display: none; }
}

/* credit log filter row (form sits outside .panel-body) */
#main-content #searchForm { padding: 0 20px 4px; }
#main-content #searchForm > .row { margin: 0; text-align: left !important; }
#main-content #searchForm .form-group { display: block; margin: 0; }
#main-content #searchForm table, #main-content #searchForm tbody { display: block; margin: 0; }
#main-content #searchForm tr { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 10px; }
#main-content #searchForm td { display: block; padding: 0 0 8px; }
#main-content #searchForm td:empty { display: none; }
#main-content #searchForm td:last-child { white-space: nowrap; }
#main-content #searchForm .form-control { width: 180px; margin: 0; }
#main-content #searchForm .btn { margin: 0 6px 0 0; }
#main-content #searchForm + br, #main-content #searchForm + br + br { display: none; }

@media (max-width: 768px) {
    .header.app-header { position: fixed; padding-right: 12px; }

    .app-header .app-brand {
        width: auto;
        flex: 0 0 auto;
        padding: 0 12px;
        background: transparent;
        order: 1;
    }

    .app-header a.logo { color: var(--ink); font-size: 16px; }
    .app-header a.logo:hover, .app-header a.logo:focus { color: var(--ink); }
    .app-header a.logo .logo-text span { color: var(--brand); }
    .app-header .logo-mark { width: 30px; height: 30px; font-size: 14px; }
    .app-header .sidebar-toggle-box { order: 0; margin-left: 8px; }
    .app-header .top-nav { position: static; }
    .app-header .top-nav .username { display: none; }
    .app-header .top-nav ul.top-menu > li > a { padding: 4px; }
    .app-header .top-nav ul.top-menu > li > a .caret { display: none; }

    .sidebar-close #sidebar {
        position: fixed;
        top: 60px;
        bottom: auto;
        max-height: calc(100vh - 60px);
        width: 100%;
        box-shadow: var(--shadow-lg);
    }

    #sidebar > ul > li > a { height: auto; line-height: normal; padding: 11px 12px; }
    #sidebar > ul > li > a > span { line-height: normal; }

    #main-content { min-height: 0; }
    #main-content .wrapper { padding: 16px 15px 4px; } /* >= 15px so Bootstrap .row gutters don't overflow */
    .site-footer { margin-left: 0; text-align: center; }

    .page-head .page-title { font-size: 18px; }
    .page-head .page-icon { width: 34px; height: 34px; font-size: 15px; }
    .page-head .page-sub { margin-left: 46px; }

    #main-content .panel-body { padding: 14px; }
    #main-content .panel-heading { padding: 12px 14px; }

    .dash-hero { padding: 20px; }
    .dash-hero h2 { font-size: 20px; }
    .quick-grid { grid-template-columns: 1fr; gap: 10px; }
    .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    #main-content .small-box h3, #main-content .small-box .numberFont { font-size: 22px !important; }
    #main-content .small-box .icon { display: none !important; }

    #main-content #searchForm table, #main-content #searchForm tbody,
    #main-content #searchForm tr, #main-content #searchForm td { display: block; width: 100%; }
    #main-content #searchForm td { padding: 0 0 8px; }
    #main-content #searchForm .form-control { width: 100%; }
}

@media (max-width: 480px) {
    .auth-card { padding: 26px 20px 22px; border-radius: 14px; }
    .stat-grid { grid-template-columns: 1fr; }
}

/* ---------- Quick SMS (quick_sms/process.php + ajax.php) ---------- */

#main-content .panel.qs-shell { background: transparent; border: 0; box-shadow: none; }
#main-content .panel.qs-shell > .panel-body { padding: 0; }
#main-content .panel.qs-table-panel { display: none; }

.qs-steps { display: flex; align-items: center; gap: 10px; margin: 0 0 18px; flex-wrap: wrap; }
.qs-step { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--faint); }
.qs-step b {
    width: 26px; height: 26px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 12px; background: var(--line-soft); color: var(--muted); border: 1px solid var(--line);
}
.qs-step.is-active { color: var(--ink); }
.qs-step.is-active b { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: 0 0 0 4px var(--brand-100); }
.qs-step.is-done { color: var(--success); }
.qs-step.is-done b { background: #dcfce7; border-color: #bbf7d0; color: var(--success); }
.qs-step-line { flex: 0 1 48px; min-width: 16px; height: 2px; border-radius: 2px; background: var(--line); }
.qs-step-line.is-done { background: #86efac; }

.qs-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    margin-bottom: 18px;
}
.qs-card-head { display: flex; align-items: flex-start; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line-soft); }
.qs-card-head h4 { margin: 2px 0 2px; font-size: 15px; font-weight: 600; color: var(--ink); }
.qs-card-head p { margin: 0; font-size: 12.5px; color: var(--muted); }
.qs-num {
    flex: 0 0 30px; width: 30px; height: 30px; border-radius: 9px;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--brand-50); color: var(--brand); font-weight: 700; font-size: 13px;
}
.qs-card-body { padding: 18px 20px 20px; }
#main-content .qs-card-body > label,
#main-content .qs-card-body label[for] { display: block; margin-bottom: 6px; }

#main-content textarea.form-control.qs-mobile { min-height: 140px; resize: vertical; font-size: 14px; line-height: 1.6; }
.qs-help { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-top: 8px; font-size: 12.5px; color: var(--muted); }
.qs-chip {
    flex: 0 0 auto; padding: 3px 10px; border-radius: 999px;
    background: var(--line-soft); color: var(--muted); font-weight: 600; font-size: 12px; white-space: nowrap;
}
.qs-chip.is-set { background: var(--brand-50); color: var(--brand-700); }

.qs-note { margin-top: 8px; font-size: 12.5px; color: var(--muted); }
.qs-note .fa-check-circle { color: var(--success); }
.qs-gap { margin-top: 10px; margin-bottom: 0; }
.qs-list { margin: 6px 0 0 18px; padding: 0; }
.qs-list li { list-style: disc; }
.qs-retval:empty { display: none; }
.qs-retval { margin-top: 16px; }

.qs-template { border: 1px dashed var(--line); border-radius: 10px; padding: 14px; background: #fafbfd; }
.qs-template-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.qs-template-name { font-weight: 600; color: var(--ink); font-size: 13.5px; word-break: break-all; }

.qs-phone { padding: 14px; border-radius: 12px; background: #eef1f6; }
.qs-bubble {
    position: relative; max-width: 100%;
    padding: 11px 14px; border-radius: 4px 14px 14px 14px;
    background: #fff; color: var(--ink); font-size: 13.5px; line-height: 1.55;
    white-space: pre-wrap; word-wrap: break-word;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .08);
}

.qs-vars-title { margin: 14px 0 8px; font-size: 13px; font-weight: 600; color: var(--ink); }
.qs-vars-title small { display: block; font-weight: 400; color: var(--muted); font-size: 12px; }
.qs-vars { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px 14px; }
#main-content .qs-var-row label { display: block; margin-bottom: 4px; font-size: 12.5px; font-weight: 600; color: var(--text); }
.qs-var-row code { padding: 1px 5px; border-radius: 4px; background: var(--brand-50); color: var(--brand-700); font-size: 11.5px; }

.qs-actions { display: flex; justify-content: flex-end; align-items: center; gap: 10px; flex-wrap: wrap; margin: 4px 0 18px; }
.qs-actions-start { justify-content: flex-start; margin-bottom: 0; }
#main-content .qs-actions .btn { margin: 0; }
.qs-card-body .qs-actions { margin: 18px 0 0; }
.qs-btn-blocked { opacity: .55; }

.qs-check {
    display: flex; align-items: center; gap: 10px;
    margin: 0; padding: 9px 10px; border-radius: 8px;
    font-size: 13.5px; font-weight: 500 !important; color: var(--text) !important; cursor: pointer;
    transition: background .15s ease;
}
.qs-check:hover { background: var(--line-soft); }
.qs-check input[type="checkbox"] { margin: 0; width: 16px; height: 16px; flex: 0 0 16px; cursor: pointer; }
.qs-check span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qs-check-all { font-weight: 600 !important; color: var(--ink) !important; border-bottom: 1px solid var(--line-soft); border-radius: 8px 8px 0 0; margin-bottom: 4px; }
.qs-group-list { max-height: 300px; overflow-y: auto; margin: 0 -4px; padding: 0 4px; }
.qs-empty { padding: 22px 10px; text-align: center; color: var(--muted); font-size: 12.5px; }
.qs-empty .fa { display: block; margin-bottom: 8px; font-size: 22px; color: var(--faint); }

.qs-tips { background: linear-gradient(180deg, var(--brand-50), #fff); border-color: var(--brand-100); }
.qs-tips h5 { margin: 0 0 8px; font-size: 13px; font-weight: 600; color: var(--brand-700); }
.qs-tips ul { margin: 0; padding-left: 18px; }
.qs-tips li { list-style: disc; margin: 3px 0; font-size: 12.5px; color: var(--text); }

.qs-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.qs-stat { padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow-sm); }
.qs-stat-label { display: block; font-size: 12px; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; color: var(--muted); }
.qs-stat-value { display: block; margin: 4px 0 2px; font-size: 26px; font-weight: 700; color: var(--ink); line-height: 1.15; }
.qs-stat-note { display: block; font-size: 12px; color: var(--muted); }
.qs-stat.is-ok { border-color: #bbf7d0; background: var(--success-50); }
.qs-stat.is-ok .qs-stat-value { color: var(--success-600); }
.qs-stat.is-low { border-color: #fecaca; background: var(--danger-50); }
.qs-stat.is-low .qs-stat-value, .qs-stat.is-low .qs-stat-note { color: var(--danger); }

.qs-recipients { padding: 0; max-height: 360px; overflow-y: auto; }
#main-content .qs-recipients .table { margin: 0; }
#main-content .qs-recipients .table > thead > tr > th { position: sticky; top: 0; z-index: 1; }
#main-content .qs-recipients .table > thead > tr > th:first-child,
#main-content .qs-recipients .table > tbody > tr > td:first-child { width: 56px; padding-left: 20px; color: var(--muted); }

@media (max-width: 768px) {
    .qs-step-line { flex-basis: 16px; }
    .qs-card-head, .qs-card-body { padding-left: 14px; padding-right: 14px; }
    .qs-help { flex-direction: column; gap: 6px; }
    .qs-stats { grid-template-columns: 1fr; gap: 10px; }
    .qs-actions { justify-content: stretch; }
    .qs-actions .btn { flex: 1 1 auto; }
}
/* ---------- jQuery UI datepicker (credit log date filters) ---------- */

#ui-datepicker-div.ui-datepicker {
    z-index: 1060 !important; /* above the fixed header (1002) and sidebar */
    width: 272px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--card);
    box-shadow: var(--shadow-lg);
    font-family: var(--font);
    font-size: 13px;
}
.ui-datepicker .ui-datepicker-header {
    position: relative;
    padding: 4px 0 8px;
    border: 0;
    border-radius: 0;
    background: none;
    color: var(--ink);
    font-weight: 600;
}
.ui-datepicker .ui-datepicker-title { display: flex; justify-content: center; gap: 6px; margin: 0 34px; line-height: 30px; }
.ui-datepicker .ui-datepicker-title select {
    width: auto;
    height: 30px;
    margin: 0;
    padding: 0 6px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--card);
    color: var(--ink);
    font-size: 12.5px;
}
.ui-datepicker .ui-datepicker-prev,
.ui-datepicker .ui-datepicker-next {
    top: 4px;
    width: 30px;
    height: 30px;
    border: 0 !important;
    border-radius: 8px !important;
    background: var(--line-soft) !important;
    cursor: pointer;
}
.ui-datepicker .ui-datepicker-prev { left: 0; }
.ui-datepicker .ui-datepicker-next { right: 0; }
.ui-datepicker .ui-datepicker-prev-hover,
.ui-datepicker .ui-datepicker-next-hover { top: 4px; border: 0 !important; background: var(--brand-50) !important; }
.ui-datepicker .ui-datepicker-prev-hover { left: 0; }
.ui-datepicker .ui-datepicker-next-hover { right: 0; }
.ui-datepicker .ui-datepicker-prev span,
.ui-datepicker .ui-datepicker-next span { display: none !important; }
.ui-datepicker .ui-datepicker-prev:after,
.ui-datepicker .ui-datepicker-next:after {
    font-family: FontAwesome;
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    line-height: 30px;
    text-align: center;
    color: var(--text);
    font-size: 12px;
}
.ui-datepicker .ui-datepicker-prev:after { content: "\f053"; }
.ui-datepicker .ui-datepicker-next:after { content: "\f054"; }
.ui-datepicker .ui-datepicker-prev.ui-state-disabled,
.ui-datepicker .ui-datepicker-next.ui-state-disabled { opacity: .35; cursor: default; }
.ui-datepicker table { width: 100%; margin: 0; border-collapse: collapse; font-size: 13px; }
.ui-datepicker th { padding: 6px 0; color: var(--faint); font-size: 11.5px; font-weight: 600; text-transform: uppercase; border: 0; }
.ui-datepicker td { padding: 1px; border: 0; }
.ui-datepicker td a.ui-state-default,
.ui-datepicker td span.ui-state-default {
    display: block;
    height: 32px;
    line-height: 32px;
    padding: 0;
    border: 0 !important; /* style.css: 3px teal ring + 50% radius, all !important */
    border-radius: 8px !important;
    background: none !important;
    color: var(--text);
    text-align: center;
    font-weight: 500;
}
.ui-datepicker td a.ui-state-default:hover { background: var(--brand-50) !important; color: var(--brand-700); }
.ui-datepicker td a.ui-state-highlight { background: var(--line-soft) !important; color: var(--brand-700); font-weight: 700; }
.ui-datepicker td a.ui-state-active,
.ui-datepicker td a.ui-state-active:hover { background: var(--brand) !important; color: #fff; }
.ui-datepicker td.ui-state-disabled span.ui-state-default { color: #cbd5e1; background: none !important; opacity: 1; }
.ui-datepicker .ui-datepicker-other-month { visibility: hidden; }

#main-content input.datePicker {
    padding-right: 34px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2'/%3E%3Cpath d='M16 2v4M8 2v4M3 10h18'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    cursor: pointer;
}
/* home: welcome banner with the available-credits panel */
.dash-hero.dash-hero-split { display: flex; align-items: stretch; justify-content: space-between; gap: 24px; }
.dash-hero-split .hero-main { position: relative; z-index: 1; flex: 1 1 auto; min-width: 0; align-self: center; }
.hero-credits {
    position: relative;
    z-index: 1;
    flex: 0 0 260px;
    display: flex;
    flex-direction: column;
    padding: 16px 18px;
    border-radius: 14px;
    background: rgba(255, 255, 255, .14);
    border: 1px solid rgba(255, 255, 255, .22);
    backdrop-filter: blur(4px);
}
.hero-credits .hc-label { font-size: 12px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: rgba(255, 255, 255, .85); }
.hero-credits .hc-value { margin: 6px 0 4px; font-size: 36px; font-weight: 700; line-height: 1.05; color: #fff; letter-spacing: -.02em; }
.hero-credits .hc-note { font-size: 12.5px; color: rgba(255, 255, 255, .8); }
.hero-credits .hc-note.hc-empty { display: inline-block; align-self: flex-start; padding: 4px 9px; border-radius: 8px; background: #fee2e2; color: #991b1b; font-weight: 600; }
.hero-credits .hc-links { display: flex; gap: 8px; margin-top: auto; padding-top: 14px; }
.hero-credits .hc-links a {
    flex: 1 1 0;
    padding: 7px 10px;
    border-radius: 8px;
    background: #fff;
    color: var(--brand-700);
    font-size: 12.5px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: background .15s ease;
}
.hero-credits .hc-links a:hover { background: var(--brand-50); color: var(--brand-700); }

@media (max-width: 768px) {
    .dash-hero.dash-hero-split { flex-direction: column; gap: 16px; }
    .hero-credits { flex-basis: auto; }
    .hero-credits .hc-value { font-size: 30px; }
}