/* ============================================================
   LMS — Complete Stylesheet
   Yii 2.0.54  |  Font Awesome 5  |  Ubuntu font
   ============================================================ */

/* ----- Reset ----- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Ubuntu', 'Segoe UI', sans-serif;
    font-size: 14px;
    background: #f0f2f5;
    color: #333;
}

a { text-decoration: none; color: inherit; }

/* ============================================================
   LOGIN PAGE
   ============================================================ */

body.login-body {
    background: #f0f2f5;
    min-height: 100vh;
    display: flex;
    align-items: stretch;
}

.login-page {
    display: flex;
    width: 100%;
    min-height: 100vh;
}

/* ---------- Left branding panel ---------- */
.login-panel-left {
    width: 42%;
    background: linear-gradient(160deg, #0f3460 0%, #16213e 55%, #1a1a2e 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 48px;
    position: relative;
    overflow: hidden;
}

/* decorative circles */
.login-panel-left::before,
.login-panel-left::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    background: rgba(255,255,255,.04);
}
.login-panel-left::before { width: 400px; height: 400px; top: -100px; right: -120px; }
.login-panel-left::after  { width: 280px; height: 280px; bottom: -80px; left: -80px; }

.login-brand { text-align: center; color: #fff; margin-bottom: 52px; }

.login-brand-icon {
    width: 80px; height: 80px;
    background: rgba(255,255,255,.12);
    border: 2px solid rgba(255,255,255,.2);
    border-radius: 22px;
    display: flex; align-items: center; justify-content: center;
    font-size: 36px;
    margin: 0 auto 20px;
    backdrop-filter: blur(4px);
}

.login-brand-title {
    font-size: 38px;
    font-weight: 700;
    letter-spacing: 4px;
    text-transform: uppercase;
}

.login-brand-sub {
    font-size: 13px;
    color: rgba(255,255,255,.55);
    letter-spacing: 1.5px;
    margin-top: 8px;
    text-transform: uppercase;
}

.login-features { width: 100%; max-width: 280px; }

.login-feature-item {
    display: flex;
    align-items: center;
    gap: 14px;
    color: rgba(255,255,255,.75);
    font-size: 14px;
    padding: 13px 18px;
    border-radius: 10px;
    background: rgba(255,255,255,.06);
    margin-bottom: 12px;
    border: 1px solid rgba(255,255,255,.08);
    transition: background .2s;
}

.login-feature-item:hover { background: rgba(255,255,255,.1); }

.login-feature-item i {
    font-size: 18px;
    color: #63b3ed;
    width: 22px;
    text-align: center;
    flex-shrink: 0;
}

.login-copy {
    position: absolute;
    bottom: 22px;
    font-size: 11px;
    color: rgba(255,255,255,.3);
    letter-spacing: .5px;
}

/* ---------- Right form panel ---------- */
.login-panel-right {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
    background: #f5f7fa;
}

.login-form-box {
    width: 100%;
    max-width: 420px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 40px rgba(0,0,0,.1);
    padding: 40px 40px 32px;
}

/* Header inside form box */
.login-form-header { text-align: center; margin-bottom: 32px; }

.login-form-logo {
    width: 64px; height: 64px;
    background: linear-gradient(135deg, #0f3460, #3a86ff);
    border-radius: 16px;
    display: flex; align-items: center; justify-content: center;
    font-size: 28px;
    color: #fff;
    margin: 0 auto 16px;
    box-shadow: 0 6px 20px rgba(15,52,96,.35);
}

.login-form-header h2 {
    font-size: 22px;
    font-weight: 700;
    color: #1a1a2e;
}

.login-form-header p {
    font-size: 13px;
    color: #888;
    margin-top: 5px;
}

/* Form groups */
.lms-form-group { margin-bottom: 20px; }

.lms-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #555;
    text-transform: uppercase;
    letter-spacing: .6px;
    margin-bottom: 7px;
}

.lms-label i { margin-right: 5px; color: #0f3460; }

.lms-input-wrap { position: relative; }

.lms-input {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid #e2e8f0;
    border-radius: 9px;
    font-size: 14px;
    font-family: inherit;
    color: #333;
    background: #fafbfc;
    transition: border-color .2s, box-shadow .2s, background .2s;
    outline: none;
}

.lms-input:focus {
    border-color: #0f3460;
    box-shadow: 0 0 0 3px rgba(15,52,96,.1);
    background: #fff;
}

.lms-input-with-icon .lms-input { padding-right: 42px; }

.toggle-password {
    position: absolute; right: 13px; top: 50%;
    transform: translateY(-50%);
    background: none; border: none; cursor: pointer;
    color: #aaa; font-size: 14px; padding: 0; line-height: 1;
    transition: color .15s;
}
.toggle-password:hover { color: #555; }

/* Remember me */
.lms-form-row-check {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 24px;
}

.lms-check-input { width: 15px; height: 15px; cursor: pointer; accent-color: #0f3460; }
.lms-check-label { font-size: 13px; color: #555; cursor: pointer; }

/* Submit button */
.lms-btn-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 13px;
    background: linear-gradient(135deg, #0f3460, #1a5276);
    color: #fff;
    border: none;
    border-radius: 9px;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    letter-spacing: .4px;
    cursor: pointer;
    transition: opacity .2s, transform .1s, box-shadow .2s;
    box-shadow: 0 4px 15px rgba(15,52,96,.35);
}

.lms-btn-submit:hover  { opacity: .92; box-shadow: 0 6px 20px rgba(15,52,96,.45); }
.lms-btn-submit:active { transform: scale(.98); }

/* Footer inside form box */
.login-form-footer {
    text-align: center;
    margin-top: 22px;
    font-size: 12px;
    color: #aaa;
    border-top: 1px solid #f0f0f0;
    padding-top: 16px;
}

.login-form-footer a { color: #0f3460; font-weight: 600; }
.login-form-footer a:hover { text-decoration: underline; }

/* Validation errors */
.field-error {
    color: #e74c3c;
    font-size: 12px;
    margin-top: 5px;
    display: block;
}

.lms-input.has-error,
.lms-input:invalid:not(:placeholder-shown) { border-color: #e74c3c; }

/* Alerts */
.lms-alert {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 9px;
    font-size: 13px;
    margin-bottom: 20px;
}

.lms-alert-danger  { background: #fdf0ef; border: 1px solid #f5c6cb; color: #c0392b; }
.lms-alert-success { background: #eafaf1; border: 1px solid #a9dfbf; color: #1e8449; }
.lms-alert-info    { background: #eaf4fb; border: 1px solid #aed6f1; color: #1a5276; }

/* Responsive login */
@media (max-width: 860px) {
    .login-panel-left  { display: none; }
    .login-panel-right { padding: 30px 16px; background: linear-gradient(160deg,#0f3460,#1a1a2e); }
    .login-form-box    { box-shadow: 0 8px 40px rgba(0,0,0,.3); }
}

@media (max-width: 480px) {
    .login-form-box { padding: 32px 24px 28px; }
}

/* ============================================================
   INNER PAGES  (header + sidebar + content)
   ============================================================ */

/* Header */
header.lms-header {
    position: fixed; top: 0; left: 0; right: 0; height: 56px; z-index: 1000;
    background: linear-gradient(90deg, #0f3460 0%, #16213e 100%);
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 24px;
    color: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,.3);
}

header.lms-header .logo-text {
    font-size: 17px; font-weight: 700; letter-spacing: 2.5px; text-transform: uppercase;
    display: flex; align-items: center; gap: 10px;
}

header.lms-header .logo-text i { font-size: 20px; color: #63b3ed; }

.lms-header-user { display: flex; align-items: center; gap: 12px; font-size: 14px; position: relative; }

.lms-header-user img {
    width: 32px; height: 32px;
    border-radius: 50%; border: 2px solid rgba(255,255,255,.3);
}

/* Dropdown */
.lms-dropdown { position: relative; }
.lms-dropdown-toggle { cursor: pointer; display: flex; align-items: center; gap: 6px; user-select: none; }

.lms-dropdown-menu {
    display: none; position: absolute; right: 0; top: 46px;
    background: #fff; border: 1px solid #e0e0e0; border-radius: 10px;
    min-width: 180px; box-shadow: 0 8px 24px rgba(0,0,0,.15); z-index: 2000;
    overflow: hidden;
}

.lms-dropdown-menu.open { display: block; }

.lms-dropdown-menu a {
    display: flex; align-items: center; gap: 10px;
    padding: 11px 16px; color: #333; font-size: 13px;
    transition: background .15s;
}

.lms-dropdown-menu a:hover { background: #f5f7fa; color: #0f3460; }
.lms-dropdown-menu a i { width: 16px; color: #888; }

/* Sidebar */
.lms-sidebar {
    position: fixed; top: 56px; left: 0; bottom: 0; width: 220px;
    background: #1a1a2e; overflow-y: auto; z-index: 900;
    border-right: 1px solid rgba(255,255,255,.05);
}

.lms-sidebar ul { list-style: none; padding: 14px 0; }

.lms-sidebar ul li a {
    display: flex; align-items: center; gap: 10px;
    padding: 11px 22px; color: rgba(255,255,255,.65); font-size: 13px;
    transition: background .15s, color .15s;
    border-left: 3px solid transparent;
}

.lms-sidebar ul li a:hover,
.lms-sidebar ul li a.active {
    background: rgba(255,255,255,.07);
    color: #fff;
    border-left-color: #63b3ed;
}

.lms-sidebar ul li a i { width: 18px; font-size: 14px; }

/* Page content */
.lms-content {
    margin-top: 56px;
    margin-left: 220px;
    padding: 28px;
    min-height: calc(100vh - 56px);
}

/* Page title */
.page-title {
    font-size: 20px; font-weight: 700; color: #1a1a2e;
    margin-bottom: 22px; display: flex; align-items: center; gap: 10px;
}

.page-title i { color: #0f3460; }
.page-title .lms-btn { margin-left: auto; }

/* Card */
.lms-card { background: #fff; border-radius: 10px; box-shadow: 0 2px 12px rgba(0,0,0,.07); overflow: hidden; margin-bottom: 24px; }

.lms-card-header {
    padding: 15px 20px; background: #fff; border-bottom: 1px solid #f0f0f0;
    font-size: 15px; font-weight: 600; color: #1a1a2e;
    display: flex; align-items: center; gap: 8px;
}

.lms-card-header i { color: #0f3460; }
.lms-card-body { padding: 20px; }

/* Stats grid */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px,1fr)); gap: 18px; margin-bottom: 24px; }

.stat-card {
    background: #fff; border-radius: 10px; padding: 20px;
    box-shadow: 0 2px 12px rgba(0,0,0,.07);
    display: flex; align-items: center; gap: 16px;
}

.stat-icon {
    width: 52px; height: 52px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 22px; color: #fff; flex-shrink: 0;
}

.stat-icon.bg-blue   { background: linear-gradient(135deg,#0f3460,#3a86ff); }
.stat-icon.bg-green  { background: linear-gradient(135deg,#1e8449,#27ae60); }
.stat-icon.bg-orange { background: linear-gradient(135deg,#e67e22,#f39c12); }
.stat-icon.bg-red    { background: linear-gradient(135deg,#c0392b,#e74c3c); }

.stat-value { font-size: 26px; font-weight: 700; color: #1a1a2e; line-height: 1.1; }
.stat-label { font-size: 11px; color: #888; margin-top: 3px; text-transform: uppercase; letter-spacing: .4px; }

/* Tables */
.table-responsive { overflow-x: auto; }

table.lms-table { width: 100%; border-collapse: collapse; font-size: 13px; }

table.lms-table thead th {
    background: #f5f7fa; color: #555; font-weight: 600;
    padding: 12px 14px; text-align: left;
    border-bottom: 2px solid #e8ecf0;
    white-space: nowrap; text-transform: uppercase;
    letter-spacing: .3px; font-size: 11px;
}

table.lms-table tbody td {
    padding: 11px 14px; border-bottom: 1px solid #f0f0f0;
    color: #444; vertical-align: middle;
}

table.lms-table tbody tr:hover { background: #fafbff; }

/* Badges */
.lms-badge { display: inline-block; padding: 3px 9px; border-radius: 20px; font-size: 11px; font-weight: 600; }
.lms-badge-success { background: #eafaf1; color: #1e8449; }
.lms-badge-danger  { background: #fdf0ef; color: #c0392b; }
.lms-badge-info    { background: #eaf4fb; color: #1a5276; }

/* Buttons */
.lms-btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 7px 16px; border-radius: 7px;
    font-size: 13px; font-weight: 600;
    cursor: pointer; border: none;
    transition: opacity .15s; font-family: inherit;
}
.lms-btn:hover { opacity: .88; }
.lms-btn-primary { background: #0f3460; color: #fff; }
.lms-btn-success { background: #27ae60; color: #fff; }
.lms-btn-danger  { background: #e74c3c; color: #fff; }
.lms-btn-sm      { padding: 5px 11px; font-size: 12px; }

/* Inner form controls */
.form-control {
    width: 100%; padding: 10px 14px;
    border: 1.5px solid #e2e8f0; border-radius: 8px;
    font-size: 14px; font-family: inherit; color: #333;
    background: #fafbfc; outline: none;
    transition: border-color .2s, box-shadow .2s;
}
.form-control:focus { border-color: #0f3460; box-shadow: 0 0 0 3px rgba(15,52,96,.1); background: #fff; }

/* Responsive */
@media (max-width: 768px) {
    .lms-sidebar { width: 0; overflow: hidden; }
    .lms-content { margin-left: 0; }
    .stats-grid  { grid-template-columns: 1fr 1fr; }
}

/* ============================================================
   CATEGORIES — Tree & Import
   ============================================================ */

/* ---- Sync result stat boxes ---- */
.sync-result-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}
.sync-stat {
    background: #fff;
    border-radius: 12px;
    padding: 20px 16px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,.07);
    border-top: 4px solid #ccc;
}
.sync-stat-icon { font-size: 26px; margin-bottom: 8px; }
.sync-stat-val  { font-size: 32px; font-weight: 700; line-height: 1; }
.sync-stat-lbl  { font-size: 12px; color: #888; margin-top: 4px; text-transform: uppercase; letter-spacing: .5px; }

.sync-stat-added   { border-top-color: #27ae60; }
.sync-stat-added   .sync-stat-icon { color: #27ae60; }
.sync-stat-added   .sync-stat-val  { color: #27ae60; }

.sync-stat-updated { border-top-color: #2980b9; }
.sync-stat-updated .sync-stat-icon { color: #2980b9; }
.sync-stat-updated .sync-stat-val  { color: #2980b9; }

.sync-stat-failed  { border-top-color: #e74c3c; }
.sync-stat-failed  .sync-stat-icon { color: #e74c3c; }
.sync-stat-failed  .sync-stat-val  { color: #e74c3c; }

.sync-stat-total   { border-top-color: #8e44ad; }
.sync-stat-total   .sync-stat-icon { color: #8e44ad; }
.sync-stat-total   .sync-stat-val  { color: #8e44ad; }

/* ---- Import message lists ---- */
.import-msg-list {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 260px;
    overflow-y: auto;
}
.import-msg-list li {
    padding: 8px 18px;
    font-size: 13px;
    border-bottom: 1px solid #f5f5f5;
    display: flex;
    gap: 8px;
    align-items: flex-start;
}
.import-msg-list li:last-child { border-bottom: none; }
.import-msg-error { color: #c0392b; background: #fff8f7; }
.import-msg-error i { color: #e74c3c; margin-top: 2px; flex-shrink: 0; }
.import-msg-warn  { color: #7d5a00; background: #fffbf0; }
.import-msg-warn  i { color: #f39c12; margin-top: 2px; flex-shrink: 0; }

/* ---- Code block for CSV example ---- */
.import-code-block {
    background: #1e272e;
    color: #dfe6e9;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    padding: 16px 20px;
    border-radius: 8px;
    overflow-x: auto;
    line-height: 1.7;
}

/* ---- lms-btn-secondary ---- */
.lms-btn-secondary {
    background: #636e72;
    color: #fff;
}
.lms-btn-secondary:hover { background: #2d3436; color: #fff; }

@media (max-width: 768px) {
    .sync-result-grid { grid-template-columns: 1fr 1fr; }
}

/* ============================================================
   COURSES — Activity types, Clone, Detail layout
   ============================================================ */

/* ---- Activity type badges ---- */
.act-type-lesson     { background: #2196f3 !important; color: #fff !important; }
.act-type-quiz       { background: #e67e22 !important; color: #fff !important; }
.act-type-assignment { background: #9b59b6 !important; color: #fff !important; }
.act-type-video      { background: #e74c3c !important; color: #fff !important; }
.act-type-document   { background: #27ae60 !important; color: #fff !important; }

/* ---- Course detail page layout ---- */
.course-detail-grid {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    align-items: flex-start;
}
.course-detail-table {
    width: 100%;
    border-collapse: collapse;
}
.course-detail-table th {
    width: 130px;
    padding: 8px 12px 8px 0;
    font-weight: 600;
    color: #888;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .4px;
    vertical-align: middle;
    white-space: nowrap;
}
.course-detail-table td {
    padding: 8px 0;
    color: #333;
    font-size: 14px;
    border-bottom: 1px solid #f5f5f5;
}
.course-stat-col {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 160px;
}
.course-stat-box {
    background: #fff;
    border-radius: 10px;
    padding: 16px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
    border-top: 3px solid #e2e8f0;
}

/* ---- Clone form ---- */
.clone-source-info {
    background: #f0f7ff;
    border: 1px solid #bee3f8;
    border-radius: 8px;
    padding: 12px 16px;
    margin-top: 8px;
    display: none;
}
.clone-source-info.visible { display: block; }
.clone-source-stat {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
}

/* ---- Field hints ---- */
.field-hint {
    font-size: 11px;
    color: #aaa;
    margin-top: 4px;
}

/* ---- lms-btn-warning ---- */
.lms-btn-warning { background: #e67e22; color: #fff; }
.lms-btn-warning:hover { background: #ca6f1e; color: #fff; }

@media (max-width: 900px) {
    .course-detail-grid { flex-direction: column; }
    .course-stat-col    { flex-direction: row; flex-wrap: wrap; }
    .course-stat-box    { flex: 1; min-width: 120px; }
}

/* ============================================================
   TAGS — Pills, Panel, Color Picker
   ============================================================ */

/* ---- Tag pill (standard size) ---- */
.tag-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    color: #fff;
    white-space: nowrap;
    line-height: 1.4;
    cursor: default;
}

/* ---- Small pill for tables ---- */
.tag-pill-sm {
    padding: 2px 7px;
    font-size: 11px;
    gap: 3px;
}

/* ---- Remove button inside pill ---- */
.tag-pill-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,.25);
    border: none;
    color: #fff;
    cursor: pointer;
    border-radius: 50%;
    width: 15px;
    height: 15px;
    padding: 0;
    font-size: 9px;
    margin-left: 2px;
    transition: background .15s;
    flex-shrink: 0;
}
.tag-pill-remove:hover { background: rgba(0,0,0,.2); }

/* ---- Tag panel wrapper ---- */
.tag-panel-wrap {
    padding: 14px 20px 16px;
}

/* ---- Current tags row ---- */
.tag-panel {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    align-items: center;
    min-height: 30px;
    margin-bottom: 12px;
}
.tag-empty-hint {
    font-size: 12px;
    color: #bbb;
    font-style: italic;
}

/* ---- Add form ---- */
.tag-add-form {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.tag-add-input {
    flex: 1;
    min-width: 160px;
    max-width: 240px;
    padding: 6px 14px;
    border: 1.5px solid #e2e8f0;
    border-radius: 20px;
    font-size: 13px;
    font-family: inherit;
    outline: none;
    transition: border-color .2s;
    background: #fafbfc;
}
.tag-add-input:focus { border-color: #3498db; background: #fff; }

/* ---- Manage link (cog icon) ---- */
.tag-manage-link {
    color: #bbb;
    font-size: 14px;
    margin-left: 4px;
    transition: color .2s;
}
.tag-manage-link:hover { color: #636e72; }

/* ---- Color swatch picker ---- */
.color-palette {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.color-swatch-label {
    cursor: pointer;
}
.color-swatch-label input[type="radio"] {
    display: none;
}
.color-swatch {
    display: block;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 3px solid transparent;
    transition: border-color .15s, transform .15s;
}
.color-swatch-label input[type="radio"]:checked + .color-swatch {
    border-color: #333;
    transform: scale(1.2);
}
.color-swatch:hover { transform: scale(1.1); }

@media (max-width: 768px) {
    .tag-add-input { max-width: 100%; }
}

/* ============================================================
   TYPES MODULE
   ============================================================ */

/* ---- Stat filter pills ---- */
.type-stat-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    border: 1.5px solid #d0d7e2;
    border-radius: 20px;
    background: #fff;
    color: #555;
    font-size: 13px;
    text-decoration: none;
    transition: border-color .2s, background .2s, box-shadow .2s;
}
.type-stat-pill:hover {
    border-color: #3498db;
    background: #f0f7ff;
    color: #0f3460;
    text-decoration: none;
}
.type-stat-pill-active {
    background: #0f3460;
    border-color: #0f3460;
    color: #fff !important;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(15,52,96,.18);
}
.type-stat-pill-active:hover {
    background: #0f3460;
    color: #fff;
}
.type-stat-num {
    font-size: 16px;
    font-weight: 700;
    line-height: 1;
}

/* ---- Inline type name badge ---- */
.type-name-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #f0f4ff;
    border: 1px solid #d0dcf0;
    border-radius: 6px;
    padding: 3px 10px;
    font-size: 13px;
    color: #0f3460;
    font-weight: 500;
}

/* ---- Inactive row dimming ---- */
tr.row-inactive td {
    opacity: .55;
}
tr.row-inactive:hover td {
    opacity: .75;
}

/* ============================================================
   COLOUR SCHEME MODULE
   ============================================================ */

/* ---- Filter pills ---- */
.cs-filter-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 16px;
    border: 1.5px solid #d0d7e2;
    border-radius: 20px;
    background: #fff;
    color: #555;
    font-size: 13px;
    text-decoration: none;
    transition: border-color .2s, background .2s;
}
.cs-filter-pill:hover {
    border-color: #3498db;
    background: #f0f7ff;
    color: #0f3460;
    text-decoration: none;
}
.cs-filter-pill-active {
    background: #0f3460;
    border-color: #0f3460;
    color: #fff !important;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(15,52,96,.18);
}
.cs-filter-pill-active:hover { background: #0f3460; color: #fff; }
.cs-filter-num { font-size: 15px; font-weight: 700; line-height: 1; }

/* ---- Type badges ---- */
.cs-type-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .3px;
}
.cs-type-te { background: #e3f2fd; color: #1565c0; }
.cs-type-th { background: #fce4ec; color: #c62828; }
.cs-type-bn { background: #f3e5f5; color: #6a1b9a; }
.cs-type-in { background: #e8f5e9; color: #2e7d32; }

/* ---- Colour cell ---- */
.cs-colour-cell {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
}
.cs-swatch {
    display: inline-block;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid rgba(0,0,0,.12);
    flex-shrink: 0;
}
.cs-hex {
    font-size: 12px;
    color: #555;
    background: #f4f6f8;
    border-radius: 4px;
    padding: 2px 6px;
}

/* ---- Picker row (color input + hex text) ---- */
.cs-picker-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 6px;
}
.cs-picker-row .form-control {
    width: 130px;
}

/* ============================================================
   TENANT MODULE
   ============================================================ */

/* ---- Logo thumbnail in table ---- */
.tenant-logo-thumb {
    width: 36px;
    height: 36px;
    object-fit: contain;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    background: #f8f9fa;
    padding: 2px;
}

/* ---- Placeholder icon when no logo ---- */
.tenant-logo-placeholder {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    background: #f0f4ff;
    color: #b0bec5;
    font-size: 16px;
}

/* ---- Large preview circle in form sidebar ---- */
.tenant-logo-preview-img {
    width: 90px;
    height: 90px;
    object-fit: contain;
    border-radius: 12px;
    border: 2px solid #e2e8f0;
    background: #f8f9fa;
    padding: 4px;
    margin-bottom: 8px;
}
.tenant-logo-preview-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 90px;
    height: 90px;
    border-radius: 12px;
    border: 2px dashed #d0d7e2;
    background: #f8faff;
    margin: 0 auto 8px;
}

/* ---- Current logo row in update form ---- */
.tenant-current-logo-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    padding: 8px 12px;
    background: #f8faff;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}
.tenant-current-logo {
    width: 40px;
    height: 40px;
    object-fit: contain;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    background: #fff;
    padding: 2px;
}

/* ============================================================
   TENANT TABS
   ============================================================ */
.tenant-tab-nav {
    display: flex;
    gap: 4px;
    margin-bottom: 20px;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 0;
}
.tenant-tab-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 10px 20px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #888;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    border-radius: 6px 6px 0 0;
    transition: color .15s, border-color .15s, background .15s;
}
.tenant-tab-btn:hover {
    color: #0f3460;
    background: #f0f4ff;
}
.tenant-tab-btn.active {
    color: #0f3460;
    border-bottom-color: #0f3460;
    font-weight: 700;
}
.tenant-tab-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #e2e8f0;
    color: #555;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
    min-width: 20px;
    padding: 1px 6px;
    line-height: 1.4;
}
.tenant-tab-btn.active .tenant-tab-count {
    background: #0f3460;
    color: #fff;
}
.tenant-tab-panel {
    display: none;
}
.tenant-tab-panel.active {
    display: block;
}

/* ============================================================
   TENANT BANNER GRID
   ============================================================ */
.tenant-banner-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}
.tenant-banner-card {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
    display: flex;
    flex-direction: column;
    transition: box-shadow .2s;
}
.tenant-banner-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.10); }
.banner-inactive { opacity: .55; }
.banner-thumb-wrap {
    width: 100%;
    height: 130px;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.banner-no-img { border-bottom: 1px solid #e2e8f0; }
.banner-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.banner-card-body {
    padding: 10px 12px 6px;
    flex: 1;
}
.banner-title {
    font-weight: 600;
    font-size: 13px;
    color: #333;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.banner-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    color: #aaa;
}
.banner-card-actions {
    padding: 8px 12px;
    border-top: 1px solid #f0f0f0;
    display: flex;
    justify-content: flex-end;
}

/* ============================================================
   COURSES MODULE
   ============================================================ */
.course-banner-thumb {
    width: 40px;
    height: 30px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid #e2e8f0;
}
.course-banner-placeholder {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 30px;
    border-radius: 4px;
    background: #f0f4ff;
    color: #c8d0e0;
    font-size: 14px;
    border: 1px solid #e2e8f0;
}
.course-existing-banner-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: #f8faff;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    margin-bottom: 8px;
}
.course-existing-banner {
    width: 80px;
    height: 50px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
}
.course-preview-banner-placeholder {
    width: 100%;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px dashed #d0d7e2;
}
