/* CodeIgniter adapter for the supplied FlowDash 1.2 template. */
:root {
    --cms-primary: #6774df;
    --cms-navy: #1c2260;
    --cms-ink: #112b4a;
    --cms-muted: #939fad;
    --cms-border: #e9edf2;
    --cms-canvas: #fafbfe;
}
body { font-family: Roboto, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; }
body.bg-slate-100 { background: var(--cms-canvas) !important; color: var(--cms-ink); }
body.theme-dark.bg-slate-100 { background: #151b2c !important; }
body > .min-h-screen > .flex-1 { min-width: 0; }
.admin-sidebar {
    width: 260px !important;
    background: #fff;
    border-color: var(--cms-border) !important;
    flex-shrink: 0;
    overflow-y: auto;
}
.admin-sidebar > div:first-child { min-height: 72px; padding: 16px; }
.admin-sidebar-brand-mark {
    width: 36px; height: 36px; border-radius: 8px;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--cms-primary); color: #fff; font-size: 14px; font-weight: 700;
}
.admin-sidebar .admin-sidebar-brand-row {
    display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px;
}
.admin-sidebar .admin-sidebar-brand { gap: 10px; min-width: 0; }
.admin-sidebar-brand-text { min-width: 0; }
.admin-sidebar .admin-sidebar-brand-name {
    display: block; font-size: 14px; font-weight: 600; letter-spacing: 0; white-space: nowrap;
}
.admin-sidebar .admin-sidebar-brand-caption { display: block; font-size: 11px; color: #939fad; margin-top: 3px; }
.admin-sidebar-brand-controls { display: flex; align-items: center; }
.admin-sidebar-brand-controls button { padding: 4px; border-color: #e9edf2; }
.admin-sidebar nav { padding: 18px 12px; }
.admin-sidebar .sidebar-heading {
    margin: 0 12px 10px; color: var(--cms-muted);
    font-size: 11px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase;
}
.admin-sidebar .admin-sidebar-link {
    display: grid; grid-template-columns: 24px minmax(0, 1fr); align-items: center;
    justify-content: start; gap: 12px; width: 100%; min-height: 42px;
    border-radius: 4px; color: #62758b; font-weight: 400; text-align: left;
}
.admin-sidebar .admin-sidebar-icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 24px; height: 24px; min-width: 24px; overflow: hidden;
}
.admin-sidebar .admin-sidebar-label { min-width: 0; white-space: normal; overflow-wrap: break-word; }
.cms-icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 24px; height: 24px; flex: 0 0 24px;
    font-family: 'Material Icons' !important; font-style: normal; font-weight: 400;
    font-size: 21px; line-height: 1; letter-spacing: normal; text-transform: none;
    white-space: nowrap; vertical-align: middle; -webkit-font-smoothing: antialiased;
}
.admin-sidebar-link:hover { background: #f5f6fc; color: var(--cms-primary); text-decoration: none; }
.admin-sidebar-link[aria-current='page'] {
    background: #eef0fd; color: var(--cms-primary); box-shadow: inset 3px 0 var(--cms-primary);
}
.admin-sidebar-icon .material-icons { font-size: 21px; line-height: 1; }
.admin-topbar {
    min-height: 72px; background: var(--cms-navy) !important;
    border: 0; color: #fff; position: relative; z-index: 30;
}
.admin-topbar > div { min-height: 72px; padding-top: 12px; padding-bottom: 12px; }
.admin-topbar h1 { color: #fff !important; font-size: 19px; font-weight: 500; }
.admin-topbar .admin-topbar-welcome { color: #c4c8e3 !important; font-size: 13px; }
.admin-topbar #open-sidebar { color: #fff !important; border-color: #565b8d !important; }
.admin-topbar [data-inbox-toggle] { color: #c4c8e3 !important; background: transparent !important; border-color: transparent !important; }
.admin-topbar #profile-menu-btn { background: var(--cms-primary) !important; }
.admin-topbar .admin-topbar-inner { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; width: 100%; max-width: 1440px; padding-left: 22px; padding-right: 22px; }
.admin-topbar .admin-topbar-title { display: flex; align-items: center; min-width: 0; gap: 10px; }
.admin-topbar-title > div { min-width: 0; }
.admin-topbar-title h1 { margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-topbar .admin-topbar-actions { display: flex; flex: 0 0 auto; align-items: center; gap: 12px; width: auto; min-width: 0; }
.admin-topbar .admin-topbar-welcome { max-width: 210px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-topbar .admin-topbar-inbox { display: flex; align-items: center; gap: 6px; width: auto; margin: 0; flex: 0 0 auto; }
.admin-topbar [data-inbox-wrap], .admin-topbar .admin-topbar-profile { position: relative; flex: 0 0 auto; width: auto; }
.admin-topbar [data-inbox-toggle], .admin-topbar #profile-menu-btn { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; min-width: 36px; padding: 0; flex: 0 0 36px; }
.admin-topbar [data-inbox-toggle] .cms-icon { font-size: 21px; }
.admin-topbar [data-inbox-badge] { pointer-events: none; top: -2px; right: -2px; min-width: 15px; height: 15px; font-size: 9px; line-height: 15px; }
.admin-topbar [data-inbox-toggle]:hover { background: #ffffff12 !important; transform: none; }
@media (max-width: 760px) {
    .admin-topbar .admin-topbar-welcome { display: none; }
    .admin-topbar .admin-topbar-inner { padding-left: 16px; padding-right: 16px; gap: 10px; }
    .admin-topbar .admin-topbar-actions { gap: 8px; }
    .admin-topbar [data-inbox-menu], .admin-topbar #profile-menu { position: fixed; right: 12px; top: 68px; max-width: calc(100vw - 24px); }
}
@media (max-width: 420px) {
    .admin-topbar .admin-topbar-inner { gap: 6px; padding-left: 10px; padding-right: 10px; }
    .admin-topbar .admin-topbar-title { gap: 6px; }
    .admin-topbar .admin-topbar-actions, .admin-topbar .admin-topbar-inbox { gap: 2px; }
    .admin-topbar [data-inbox-toggle], .admin-topbar #profile-menu-btn { width: 32px; height: 32px; min-width: 32px; flex-basis: 32px; }
}
.admin-topbar #profile-menu, .admin-topbar [data-inbox-menu] { color: var(--cms-ink); }
main.mx-auto { padding: 28px !important; }
main .rounded-xl, main .rounded-lg { border-radius: 5px; }
main section.bg-white, main .panel {
    border-color: var(--cms-border) !important;
    box-shadow: 0 1px 2px rgba(17,43,74,.05) !important;
}
main h2, main h3 { color: var(--cms-ink); font-weight: 500; }
main .text-slate-900 { color: var(--cms-ink); }
main .bg-blue-600, main .bg-blue-700 { background-color: var(--cms-primary); }
main .bg-blue-600:hover, main .bg-blue-700:hover { background-color: #5361cc; }
main .text-blue-700 { color: #5968cf; }
main .border-blue-300 { border-color: #c5cbf2; }
main input:not([type='checkbox']):not([type='radio']), main select, main textarea {
    border-color: #dfe4eb; border-radius: 4px;
}
main input:focus, main select:focus, main textarea:focus {
    outline: 2px solid #b7bef3; outline-offset: 1px;
}
main table thead { background: #f8fafc; font-weight: 500; }
main table th { font-weight: 500; color: #74849b; }
.summary-card {
    position: relative; background: #fff !important; border: 1px solid var(--cms-border) !important;
    border-radius: 5px; padding: 22px !important; box-shadow: 0 1px 2px rgba(17,43,74,.05) !important;
}
.summary-card > p:first-child { color: #74849b; font-weight: 500; letter-spacing: .04em; }
.summary-card > p:nth-child(2) { color: var(--cms-ink); font-size: 30px; font-weight: 500; }
.summary-card > p:last-child { color: #74849b; }
.summary-card::after {
    content: ''; position: absolute; right: 22px; top: 22px; width: 8px; height: 8px;
    border-radius: 50%; background: var(--cms-primary);
}
.summary-card-blogs::after { background: #7dc668; }
.summary-card-events::after { background: #5dd2bc; }
body.theme-dark .admin-sidebar { background: #1b2438 !important; }
body.theme-dark .admin-sidebar-link { color: #c4cde1; }
body.theme-dark .admin-sidebar-link[aria-current='page'] { background: #303a60; color: #b5beff; }
body.theme-dark .admin-topbar { background: #1c2260 !important; }
body.theme-dark .summary-card { background: #1b2438 !important; border-color: #334155 !important; }
body.theme-dark .summary-card > p { color: #c4cde1 !important; }
body.theme-dark main h2, body.theme-dark main h3, body.theme-dark main table th { color: #e2e8f0; }
body.theme-dark main table thead { background: #1b2438; }
body.theme-dark main .bg-blue-600 { background: #6774df; }
body.theme-dark main .text-blue-700 { color: #b5beff; }
:focus-visible { outline: 2px solid var(--cms-primary); outline-offset: 3px; }
.cms-auth-page { margin: 0; min-height: 100vh; background: var(--cms-canvas); color: var(--cms-ink); }
.cms-auth-header { background: var(--cms-navy); padding: 20px 28px; }
.cms-auth-brand { display: inline-flex; gap: 12px; align-items: center; color: #fff; font-size: 17px; font-weight: 500; }
.cms-auth-brand:hover { color: #fff; text-decoration: none; }
.cms-auth-brand small { display: block; font-size: 11px; color: #c4c8e3; font-weight: 400; }
.cms-auth-container { max-width: 440px; margin: 70px auto 32px; padding: 0 16px; }
.cms-auth-card { border-radius: 6px; border: 1px solid var(--cms-border); border-top: 3px solid var(--cms-primary); }
.cms-auth-card .card-body { padding: 32px; }
.cms-auth-icon { display: inline-flex; background: #eef0fd; color: var(--cms-primary); padding: 12px; border-radius: 50%; font-size: 25px; margin-bottom: 22px; }
.cms-auth-card h1 { margin: 0 0 10px; font-size: 25px; font-weight: 500; color: var(--cms-ink); }
.cms-auth-intro { color: #74849b; font-size: 14px; margin-bottom: 26px; line-height: 1.6; overflow-wrap: anywhere; }
.cms-auth-card label { font-size: 13px; font-weight: 500; margin-bottom: 8px; }
.cms-auth-card .form-control { min-height: 44px; border-radius: 4px; }
.cms-auth-card .form-control:focus { border-color: var(--cms-primary); box-shadow: 0 0 0 3px #eef0fd; }
.cms-auth-card .form-group { margin-bottom: 20px; }
.cms-auth-submit { width: 100%; min-height: 44px; background: var(--cms-primary); border-color: var(--cms-primary); }
.cms-auth-submit:hover, .cms-auth-submit:focus { background: #5361cc; border-color: #5361cc; }
.cms-auth-note { font-size: 12px; color: #74849b; line-height: 1.6; margin: 24px 0 0; }
.cms-auth-footer { text-align: center; color: #939fad; font-size: 12px; margin-top: 22px; }
.cms-auth-back { display: block; margin-top: 22px; color: #5968cf; font-size: 13px; }
@media (min-width: 1024px) {
    .admin-sidebar { position: sticky; top: 0; height: 100vh; }
    body.sidebar-collapsed .admin-sidebar .sidebar-heading { display: none; }
    body.sidebar-collapsed .admin-sidebar .admin-sidebar-brand { display: none; }
    body.sidebar-collapsed .admin-sidebar > div:first-child { justify-content: center; }
    body.sidebar-collapsed .admin-sidebar .admin-sidebar-brand-row { grid-template-columns: auto; }
    body.sidebar-collapsed .admin-sidebar .admin-sidebar-link { grid-template-columns: 24px; justify-content: center; gap: 0; }
    body.sidebar-collapsed #toggle-sidebar-collapse .cms-icon { transform: rotate(180deg); }
}
@media (max-width: 639px) {
    .cms-auth-container { margin-top: 32px; }
    .cms-auth-card .card-body { padding: 24px; }
    main.mx-auto { padding: 16px !important; }
    .admin-topbar h1 { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; animation: none !important; }
}
