/* =====================================================================
   IMRT ERP - AdminLTE 4 customisations (loaded after adminlte.min.css
   and site.css). Brand colours, avatars, sign-in page, small fixes so
   the existing pages sit well inside the AdminLTE shell.
   ===================================================================== */

:root {
    --imrt-primary: #1d4ed8;
    --imrt-primary-dark: #1e3a8a;
}

body { font-family: "Source Sans 3", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }

/* ---------- logo + avatars ---------- */
.imrt-logo {
    display: inline-flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--imrt-primary), var(--imrt-primary-dark));
    color: #fff; font-weight: 800; letter-spacing: .5px;
    border-radius: 12px; padding: 8px 12px; font-size: 1.15rem;
    box-shadow: 0 4px 12px rgba(29, 78, 216, .3);
}
.imrt-logo-sm {
    width: 33px; height: 33px; padding: 0; font-size: .78rem; border-radius: 8px;
    float: none; max-height: none; margin: 0 .5rem 0 .2rem; box-shadow: none;
}
.brand-link { display: flex; align-items: center; gap: .6rem; }
.imrt-brand-mark {
    display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto;
    width: 34px; height: 34px; border-radius: 9px; font-size: 1.1rem; color: #fff;
    background: linear-gradient(135deg, #3b82f6, var(--imrt-primary-dark));
}
.sidebar-mini.sidebar-collapse .app-sidebar:not(:hover) .imrt-brand-mark { margin-left: .15rem; }

.imrt-avatar {
    display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto;
    width: 30px; height: 30px; border-radius: 50%;
    background: #dbeafe; color: var(--imrt-primary-dark); font-weight: 700; font-size: .75rem;
}
.imrt-avatar-lg {
    width: 84px; height: 84px; font-size: 1.8rem; border: 3px solid rgba(255, 255, 255, .35);
    background: rgba(255, 255, 255, .15); color: #fff; margin: 0 auto;
}
.user-menu .user-header { height: auto !important; padding-bottom: 14px; }
.user-menu .user-header p small { display: block; }

/* ---------- sidebar user panel ---------- */
.imrt-user-panel {
    padding: .85rem .5rem .75rem;
    border-bottom: 1px solid rgba(255, 255, 255, .1);
    color: #e5e7eb;
}
.imrt-user-panel .imrt-avatar { background: rgba(255, 255, 255, .15); color: #fff; width: 34px; height: 34px; }
.sidebar-mini.sidebar-collapse .app-sidebar:not(:hover) .imrt-user-panel > div { display: none; }
.sidebar-menu .nav-badge { position: absolute; right: 0; top: 50%; transform: translateY(-50%); }
.sidebar-menu .nav-link { position: relative; }
.sidebar-menu .nav-link:has(.nav-badge) > p { display: inline-block; max-width: calc(100% - 4.6rem); overflow: hidden; text-overflow: ellipsis; vertical-align: middle; }

/* ---------- header ---------- */
.imrt-header-search { width: 230px; }
.app-header .navbar-badge { font-size: .6rem; font-weight: 700; padding: 2px 4px; position: absolute; top: 6px; right: 3px; }

/* ---------- content ---------- */
.app-content-header .breadcrumb { --bs-breadcrumb-divider: "\203A"; }
.app-content { padding-top: .5rem; padding-bottom: 1rem; }
main > .container { padding: 0; } /* old layout rule in site.css */
.app-main .card { --bs-card-border-color: rgba(0, 0, 0, .06); }
/* AdminLTE gives .app-main overflow:auto; it never scrolls itself (the page
   does), but it still turns off position:sticky for everything inside it -
   e.g. the Mark Attendance live summary. clip keeps wide content contained
   without creating a scroll box. */
.app-main,
.layout-fixed[class*="sidebar-expand"] .app-main { overflow-x: clip; overflow-y: visible; }
.att-summary { top: 0; }

/* ---------- sign-in page ---------- */
.imrt-auth {
    min-height: 100vh;
    background:
        radial-gradient(1200px 600px at 10% -10%, rgba(29, 78, 216, .16), transparent 60%),
        radial-gradient(900px 500px at 110% 110%, rgba(14, 165, 233, .14), transparent 60%),
        var(--bs-tertiary-bg) !important;
    padding: 24px 16px;
}
.imrt-auth .login-box, .imrt-auth .register-box { width: 100%; max-width: 410px; }
.imrt-auth .register-box { max-width: 520px; }
.imrt-auth .card { border: 0; border-top: 4px solid var(--imrt-primary); box-shadow: 0 10px 30px rgba(15, 23, 42, .12); }
.imrt-auth .login-card-body { padding: 1.75rem; border-radius: inherit; }
.imrt-auth-flash { width: 100%; max-width: 410px; }
.imrt-auth .input-group-text { background: transparent; }
.imrt-auth .form-control:focus { box-shadow: none; }
.imrt-role-hint { font-size: .78rem; }

/* ---------- print: AdminLTE already hides the shell ---------- */
@media print {
    .app-content { padding: 0; }
    .app-content-header { display: none !important; }
}

/* ---------- rich text (CKEditor notes / assignments) ---------- */
.note-rich { font-size: .95rem; line-height: 1.55; }
.note-rich h2 { font-size: 1.25rem; font-weight: 700; margin: .6rem 0 .4rem; }
.note-rich h3 { font-size: 1.1rem; font-weight: 700; margin: .5rem 0 .35rem; }
.note-rich p { margin-bottom: .5rem; }
.note-rich ul, .note-rich ol { padding-left: 1.4rem; margin-bottom: .5rem; }
.note-rich blockquote { border-left: 4px solid #cbd5e1; padding: .25rem .9rem; color: #475569; margin: .5rem 0; }
.note-rich table { border-collapse: collapse; margin: .5rem 0; }
.note-rich td, .note-rich th { border: 1px solid #cbd5e1; padding: .3rem .55rem; }
.note-rich figure.table { margin: .5rem 0; overflow-x: auto; }
.note-rich pre { background: #f1f5f9; padding: .6rem .8rem; border-radius: .4rem; }

/* mobile numbers: call link + WhatsApp button (components/Phone) */
.ph-link .ph-call { color: inherit; border-bottom: 1px dashed currentColor; }
.ph-link .ph-call:hover { color: var(--bs-primary); }
.ph-link .ph-wa, .ph-link .ph-tel { display: inline-flex; align-items: center; justify-content: center; width: 1.45em; height: 1.45em; border-radius: 50%; font-size: .85em; text-decoration: none; vertical-align: middle; }
.ph-link .ph-wa { background: #25d366; color: #fff; }
.ph-link .ph-wa:hover { background: #128c7e; color: #fff; }
.ph-link .ph-tel { background: var(--bs-primary); color: #fff; margin-right: .2em; }
@media print { .ph-link .ph-wa, .ph-link .ph-tel { display: none; } .ph-link .ph-call { border: 0; } }
