:root {
    --deep: #062f20;
    --deep-2: #0a442f;
    --ink: #062f2f;
    --muted: #60716b;
    --line: #d9e2dc;
    --soft: #f5f8f6;
    --lime: #cce216;
    --cream: #fff7e8;
    --brown: #9c6334;
    --danger: #be1e2d;
    --shadow: 0 24px 70px rgba(6, 47, 32, .12);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: #fff; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }

.admin-shell { min-height: 100vh; display: grid; grid-template-columns: 280px 1fr; }
.admin-sidebar { position: sticky; top: 0; height: 100vh; padding: 28px 18px; background: #072f1f; color: #eef8f0; overflow-y: auto; }
.admin-brand { display: flex; align-items: center; gap: 13px; padding: 0 10px 28px; }
.admin-brand img { width: 58px; height: 58px; object-fit: contain; filter: drop-shadow(0 12px 24px rgba(0,0,0,.25)); }
.admin-brand strong { display: block; font-size: 17px; line-height: 1; font-weight: 750; }
.admin-brand small { display: block; margin-top: 6px; color: rgba(255,255,255,.66); font-size: 12px; }
.admin-nav { display: grid; gap: 8px; }
.admin-nav a { position: relative; display: flex; align-items: center; gap: 13px; min-height: 46px; padding: 0 16px; border-radius: 8px; color: rgba(255,255,255,.75); font-size: 15px; font-weight: 600; transition: .2s ease; }
.admin-nav a:hover, .admin-nav a.active { background: rgba(255,255,255,.1); color: #fff; }
.admin-nav a > span:first-of-type { flex: 1; }
.nav-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 999px;
    background: var(--danger);
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
    box-shadow: 0 4px 12px rgba(190, 30, 45, .45);
    animation: navBadgePulse 1.8s ease-in-out infinite;
}
.nav-badge[hidden] { display: none; }
@keyframes navBadgePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.12); }
}
.admin-nav svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.nav-section { margin: 22px 16px 8px; color: rgba(255,255,255,.42); font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }

.admin-main { min-width: 0; background: linear-gradient(180deg, #fff 0, #f7faf8 100%); }
.admin-topbar {
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 12px 32px 12px 40px;
    border-bottom: 1px solid var(--line);
    background: rgba(255,255,255,.92);
    backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 10;
}
.topbar-brand { min-width: 0; }
.topbar-brand strong { display: block; font-size: 16px; font-weight: 700; color: var(--ink); }
.topbar-brand span { display: block; margin-top: 3px; color: var(--muted); font-size: 12px; font-weight: 500; }
.topbar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}
.topbar-icon-btn {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border: 1px solid #dbe7e1;
    border-radius: 12px;
    background: #fff;
    color: #48645a;
    cursor: pointer;
    transition: border-color .2s ease, background .2s ease, color .2s ease;
}
.topbar-icon-btn:hover {
    border-color: var(--deep);
    background: #f3f8f5;
    color: var(--deep);
}
.topbar-icon-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; }
.topbar-lang {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 10px;
    border-radius: 12px;
    background: #edf3ef;
    color: var(--deep);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .04em;
}
.topbar-user {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    max-width: 240px;
    padding: 6px 14px 6px 6px;
    border: 1px solid #dbe7e1;
    border-radius: 999px;
    background: #fff;
}
.topbar-avatar {
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--deep), #2d8f6f);
    color: #fff;
    font-size: 15px;
    font-weight: 750;
}
.topbar-user-meta {
    display: grid;
    gap: 2px;
    min-width: 0;
    line-height: 1.15;
}
.topbar-user-meta strong {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: var(--ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.topbar-user-meta small {
    display: block;
    color: var(--muted);
    font-size: 11px;
    font-weight: 600;
}
.topbar-logout {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 16px;
    border: 1px solid #dbe7e1;
    border-radius: 12px;
    background: #fff;
    color: #1f2f29;
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
    transition: border-color .2s ease, background .2s ease, color .2s ease, box-shadow .2s ease;
}
.topbar-logout:hover {
    border-color: #efcaca;
    background: #fff8f8;
    color: var(--danger);
    box-shadow: 0 10px 24px rgba(190, 30, 45, .08);
}

.admin-content { padding: 42px; }
.page-title { display: flex; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
.page-title h1 { margin: 0; font-size: clamp(28px, 3vw, 38px); font-weight: 700; letter-spacing: 0; line-height: 1.05; }
.page-title p { margin: 10px 0 0; color: var(--muted); font-size: 16px; }

.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; margin-bottom: 26px; }
.stat-card, .panel-card, .feature-card { background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); }
.stat-card { min-height: 150px; padding: 24px; display: grid; align-content: space-between; }
.stat-card .icon-box { width: 50px; height: 50px; display: grid; place-items: center; border-radius: 10px; background: #edf3ef; color: var(--deep); }
.stat-card svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; }
.stat-card small { color: var(--muted); }
.stat-card strong { display: block; margin-top: 8px; font-size: 25px; font-weight: 700; color: #001c16; }
.live-pill, .pill { justify-self: end; align-self: start; padding: 7px 13px; border-radius: 999px; background: #eef3ed; color: var(--deep); font-size: 12px; font-weight: 700; }

.feature-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin: 28px 0; }
.feature-card { position: relative; overflow: hidden; min-height: 130px; padding: 28px 32px; color: #fff; background: var(--deep-2); }
.feature-card.brown { background: var(--brown); }
.feature-card h2 { margin: 0 0 10px; font-size: 22px; font-weight: 700; }
.feature-card p { margin: 0; color: rgba(255,255,255,.86); }
.feature-card svg { position: absolute; right: 28px; bottom: 18px; width: 84px; height: 84px; opacity: .12; fill: none; stroke: currentColor; stroke-width: 2; }

.admin-grid.two { display: grid; grid-template-columns: minmax(360px, .75fr) 1.25fr; gap: 24px; align-items: start; }
.admin-grid.two .table-wrap { max-height: none; }
.resource-modal-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; }
.resource-toolbar { position: relative; z-index: 2; display: flex; justify-content: flex-end; margin: -78px 0 28px; }
.resource-create-btn {
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 0 20px;
    border: 0;
    border-radius: 10px;
    background: var(--lime);
    color: #061d18;
    font-size: 14px;
    font-weight: 750;
    cursor: pointer;
    box-shadow: 0 12px 28px rgba(153, 177, 0, .2);
}
.resource-create-btn span { font-size: 23px; font-weight: 500; line-height: 1; }
.resource-modal-shell {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 100;
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    justify-items: center;
    overflow-y: auto;
    padding: 34px;
    background: rgba(0, 28, 22, .72);
    backdrop-filter: blur(8px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .2s ease, visibility .2s ease;
}
.resource-modal-shell.is-open {
    display: grid;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}
.resource-modal-grid > .panel-card:not(.form-card) {
    position: relative;
    z-index: 1;
}
.resource-modal-shell > .form-card {
    position: relative;
    width: min(960px, 100%);
    margin: auto;
    transform: translateY(18px) scale(.985);
    transition: transform .22s ease;
}
.resource-modal-shell.is-open > .form-card { transform: none; }
.resource-modal-close {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    display: grid;
    place-items: center;
    margin-left: auto;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: #f2f7f4;
    color: var(--ink);
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
}
body.admin-modal-open { overflow: hidden; }
.unsaved-confirm {
    position: fixed;
    inset: 0;
    z-index: 120;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(0, 24, 19, .72);
    backdrop-filter: blur(7px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .18s ease, visibility .18s ease;
}
.unsaved-confirm.is-open { opacity: 1; visibility: visible; pointer-events: auto; }
.unsaved-confirm-dialog {
    width: min(460px, 100%);
    padding: 30px;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 16px;
    background: #fff;
    color: var(--ink);
    text-align: center;
    box-shadow: 0 30px 90px rgba(0, 0, 0, .32);
}
.unsaved-confirm-icon {
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    margin: 0 auto 16px;
    border-radius: 50%;
    background: #fff2d8;
    color: #b66700;
    font-size: 26px;
    font-weight: 800;
}
.unsaved-confirm-dialog h3 { margin: 0; font-size: 21px; }
.unsaved-confirm-dialog p { margin: 10px 0 24px; color: var(--muted); line-height: 1.55; }
.unsaved-confirm-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}
.unsaved-confirm-actions button {
    width: 100%;
    min-height: 50px;
    padding: 10px 16px;
    line-height: 1.2;
}
.unsaved-confirm-actions .secondary-btn {
    border: 1px solid #bfd0c9;
    background: #f3f8f6;
    color: var(--ink);
}
.unsaved-confirm-actions .secondary-btn:hover { background: #e7f1ed; }
.danger-btn {
    min-height: 50px;
    padding: 0 20px;
    border: 0;
    border-radius: 10px;
    background: #c73d35;
    color: #fff;
    font-weight: 750;
    cursor: pointer;
}
.panel-card { padding: 26px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.card-head h2 { margin: 0; font-size: 20px; font-weight: 700; }
.soft-link { color: var(--deep); font-weight: 700; }
.admin-form { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.admin-form label { display: flex; flex-direction: column; gap: 8px; color: #163c34; font-size: 14px; font-weight: 650; }
.admin-form label[hidden] { display: none; }
.admin-form label.wide { grid-column: 1 / -1; }
.admin-extra-fields {
    grid-column: 1 / -1;
    overflow: hidden;
    border: 1px solid #d6e2dc;
    border-radius: 12px;
    background: #f8fbfa;
}
.admin-extra-fields summary {
    position: relative;
    display: grid;
    gap: 3px;
    padding: 16px 48px 16px 18px;
    color: var(--ink);
    cursor: pointer;
    list-style: none;
    user-select: none;
}
.admin-extra-fields summary::-webkit-details-marker { display: none; }
.admin-extra-fields summary::after {
    content: "+";
    position: absolute;
    top: 50%;
    right: 18px;
    font-size: 24px;
    font-weight: 500;
    transform: translateY(-50%);
}
.admin-extra-fields[open] summary::after { content: "−"; }
.admin-extra-fields summary span { font-size: 15px; font-weight: 750; }
.admin-extra-fields summary small { min-height: 0; }
.admin-extra-fields-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    padding: 4px 18px 18px;
    border-top: 1px solid #e2ebe7;
}
.admin-form input:not(.check), .admin-form textarea, .admin-form select { width: 100%; min-height: 58px; border: 1px solid #cbd9d2; border-radius: 10px; padding: 11px 14px; background: #f9fbfa; color: var(--ink); font-size: 15px; font-weight: 500; outline: none; }
.password-field {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}
.password-field input {
    width: 100%;
    padding-right: 52px !important;
}
.password-toggle {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #5a7269;
    cursor: pointer;
    transition: background .2s ease, color .2s ease;
}
.password-toggle:hover,
.password-toggle:focus-visible {
    background: #edf3f0;
    color: var(--deep);
    outline: none;
}
.password-toggle svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.password-toggle .icon-eye-off { display: none; }
.password-field.is-visible .password-toggle .icon-eye { display: none; }
.password-field.is-visible .password-toggle .icon-eye-off { display: block; }
.youtube-id-field { display: flex; align-items: stretch; width: 100%; border: 1px solid #cbd9d2; border-radius: 10px; overflow: hidden; background: #f9fbfa; }
.youtube-id-field:focus-within { border-color: var(--deep); box-shadow: 0 0 0 4px rgba(6,47,32,.08); background: #fff; }
.youtube-id-prefix { display: flex; align-items: center; padding: 0 12px; background: #edf3f0; color: #5a7269; font-size: 13px; font-weight: 600; white-space: nowrap; border-right: 1px solid #cbd9d2; }
.youtube-id-field input { min-height: 56px; border: 0; border-radius: 0; box-shadow: none !important; background: transparent; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .02em; }
.youtube-id-field input:focus { border-color: transparent; box-shadow: none; background: transparent; }
.admin-form-videolar .youtube-id-prefix { font-size: 12px; padding: 0 10px; }
.admin-form-videolar label:not(.wide) .youtube-id-field { min-width: 0; }
.admin-form-videolar label:not(.wide) .youtube-id-field input { min-width: 0; flex: 1 1 88px; }
.color-dropdown {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
}
.color-dropdown-preview {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    border: 1px solid #cbd9d2;
    background: #edf3f0;
    flex-shrink: 0;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.04);
}
.color-dropdown select {
    flex: 1;
    min-width: 0;
}
.color-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: #163c34;
}
.color-chip-swatch {
    width: 28px;
    height: 18px;
    border-radius: 6px;
    border: 1px solid rgba(6, 47, 47, .12);
    flex-shrink: 0;
}
.admin-form select { appearance: auto; }
.admin-form textarea { resize: vertical; min-height: 150px; }
.admin-form .cke {
    width: 100% !important;
    overflow: hidden;
    border: 1px solid #cbd9d2 !important;
    border-radius: 14px !important;
    background: #fff !important;
    box-shadow: 0 10px 30px rgba(7, 47, 31, .07) !important;
    transition: border-color .18s ease, box-shadow .18s ease;
}
.admin-form .cke:focus-within {
    border-color: #0b604a !important;
    box-shadow: 0 0 0 4px rgba(6, 47, 32, .08), 0 14px 36px rgba(7, 47, 31, .09) !important;
}
.admin-form .cke_top {
    padding: 12px 12px 7px !important;
    border: 0 !important;
    border-bottom: 1px solid #dce6e1 !important;
    background: #f3f7f5 !important;
    background-image: none !important;
    box-shadow: none !important;
}
.admin-form .cke_toolgroup,
.admin-form .cke_combo_button {
    overflow: hidden;
    margin: 0 7px 5px 0 !important;
    border: 1px solid #d3dfd9 !important;
    border-radius: 8px !important;
    background: #fff !important;
    background-image: none !important;
    box-shadow: 0 1px 2px rgba(7, 47, 31, .04) !important;
}
.admin-form a.cke_button { padding: 7px 8px !important; }
.admin-form a.cke_button:hover,
.admin-form a.cke_button:focus,
.admin-form .cke_combo_off a.cke_combo_button:hover,
.admin-form .cke_combo_off a.cke_combo_button:focus {
    background: #e5f0eb !important;
    background-image: none !important;
    box-shadow: none !important;
}
.admin-form .cke_combo_text { color: #183f35 !important; line-height: 32px !important; }
.admin-form .cke_combo_open { height: 25px !important; }
.admin-form .cke_combo_arrow { margin-top: 14px !important; }
.admin-form .cke_contents { min-height: 380px; border: 0 !important; }
.admin-form .cke_bottom { display: none !important; }
.admin-form .cke_skin_kama,
.admin-form .cke_skin_kama > table { width: 100% !important; }
.admin-form input:focus, .admin-form textarea:focus { border-color: var(--deep); box-shadow: 0 0 0 4px rgba(6,47,32,.08); background: #fff; }
.admin-form small { min-height: 34px; color: var(--muted); font-size: 12px; font-weight: 500; line-height: 1.35; }
.admin-form label > small {
    display: block;
    max-width: 94%;
}
.check { width: 22px; height: 22px; accent-color: var(--lime); }
.auto-order-note {
    display: grid;
    gap: 6px;
    align-content: center;
    min-height: 74px;
    padding: 16px 18px;
    border: 1px solid #dbe7e1;
    border-radius: 14px;
    background: #f8fbfa;
}
.auto-order-note strong {
    color: var(--ink);
    font-size: 15px;
    font-weight: 650;
}
.auto-order-note small {
    color: var(--muted);
    font-size: 13px;
}
.textarea-wrap {
    position: relative;
}
.textarea-wrap textarea {
    padding-bottom: 46px;
}
.char-counter {
    position: absolute;
    right: 24px;
    bottom: 14px;
    min-height: 0 !important;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(6,47,32,.08);
    color: var(--deep);
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
    pointer-events: none;
}
.form-status-bar {
    grid-column: 1 / -1;
    min-height: 74px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 16px 18px;
    border: 1px solid #dbe7e1;
    border-radius: 14px;
    background: linear-gradient(135deg, #f9fcfb, #eef5f1);
}
.form-status-bar strong {
    display: block;
    color: var(--ink);
    font-size: 16px;
    font-weight: 650;
}
.form-status-bar small {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 500;
}
.switch-control {
    width: 60px;
    height: 34px;
    position: relative;
    display: inline-flex !important;
    gap: 0 !important;
    cursor: pointer;
}
.switch-control input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.switch-control span {
    width: 100%;
    height: 100%;
    border-radius: 999px;
    background: #cbd8d2;
    transition: .2s ease;
    box-shadow: inset 0 0 0 1px rgba(6,47,32,.08);
}
.switch-control span::after {
    content: "";
    position: absolute;
    top: 4px;
    left: 4px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 7px 18px rgba(0,0,0,.18);
    transition: .2s ease;
}
.switch-control input:checked + span {
    background: var(--lime);
}
.switch-control input:checked + span::after {
    transform: translateX(26px);
}
.dropzone {
    position: relative;
    min-height: 156px;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 18px;
    align-items: center;
    padding: 16px;
    border: 1.5px dashed #b8c9c0;
    border-radius: 14px;
    background: linear-gradient(135deg, #f8fbfa, #eef5f1);
    cursor: pointer;
    transition: border-color .2s ease, background .2s ease, box-shadow .2s ease;
}
.dropzone:hover,
.dropzone.is-dragover {
    border-color: var(--deep);
    background: #fff;
    box-shadow: 0 18px 44px rgba(6, 47, 32, .1);
}
.dropzone.is-dragover .dropzone-copy strong::after {
    content: ' — Bırakın';
    color: var(--deep);
}
.dropzone.is-invalid {
    border-color: #c84b4b;
    background: #fff7f7;
}
.dropzone.is-invalid .dropzone-preview {
    animation: dropzone-shake .35s ease;
}
@keyframes dropzone-shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-4px); }
    75% { transform: translateX(4px); }
}
.dropzone-input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
}
.dropzone-preview {
    position: relative;
    z-index: 1;
    width: 150px;
    height: 112px;
    flex-shrink: 0;
    justify-self: start;
    overflow: hidden;
    border-radius: 12px;
    background: #073425;
    border: 1px solid rgba(6,47,32,.14);
}
.dropzone-preview img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    background: #041f18;
}
.dropzone[data-aspect-ratio="16:9"] {
    grid-template-columns: 240px 1fr;
}
.dropzone[data-aspect-ratio="16:9"] .dropzone-preview {
    width: 240px;
    height: 135px;
}
.dropzone[data-aspect-ratio="1920:896"] {
    grid-template-columns: 240px 1fr;
}
.dropzone[data-aspect-ratio="1920:896"] .dropzone-preview {
    width: 240px;
    height: 112px;
}
.field-hint {
    display: block;
    margin-top: 8px;
    color: #4b635c;
    font-size: 12px;
    line-height: 1.5;
}
.dropzone-empty {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 6px;
    color: var(--lime);
    text-align: center;
    padding: 10px;
}
.dropzone-empty span {
    font-size: 42px;
    font-weight: 600;
    line-height: 1;
}
.dropzone-empty small {
    color: rgba(255,255,255,.82);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.3;
}
.dropzone-copy {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 6px;
    padding-right: 10px;
    min-width: 0;
}
.dropzone-copy strong {
    color: var(--ink);
    font-size: 17px;
    font-weight: 650;
}
.dropzone-copy small {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
}
.dropzone-copy em {
    color: var(--deep);
    font-size: 13px;
    font-style: normal;
    font-weight: 650;
    overflow-wrap: anywhere;
}
.primary-btn, .secondary-btn { min-height: 50px; border: 0; border-radius: 10px; padding: 0 22px; font-weight: 700; cursor: pointer; }
.primary-btn { grid-column: 1 / -1; background: var(--lime); color: #061d18; }
.secondary-btn { background: #fff; border: 1px solid rgba(255,255,255,.45); color: #fff; }

.table-wrap { overflow-x: auto; }
.admin-table { width: 100%; min-width: 720px; border-collapse: separate; border-spacing: 0 10px; }
.admin-table th { padding: 0 12px 8px; text-align: left; color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.admin-table td { padding: 14px 12px; background: #fbfdfc; border-top: 1px solid #edf2ef; border-bottom: 1px solid #edf2ef; vertical-align: middle; font-size: 14px; font-weight: 500; }
.admin-table td:first-child { border-left: 1px solid #edf2ef; border-radius: 14px 0 0 14px; }
.admin-table td:last-child { border-right: 1px solid #edf2ef; border-radius: 0 14px 14px 0; }
.admin-table tbody tr:hover td { background: #fff; box-shadow: 0 16px 34px rgba(6,47,32,.06); }
.admin-table.is-sortable tbody tr {
    cursor: grab;
}
.admin-table.is-sortable tbody tr:active {
    cursor: grabbing;
}
.admin-table tbody tr.is-dragging td {
    opacity: .45;
    background: #eef5f1;
}
.admin-table tbody tr.is-drop-target td {
    box-shadow: inset 0 2px 0 var(--lime);
}
.record-title { display: block; max-width: 280px; color: var(--ink); font-size: 15px; font-weight: 650; line-height: 1.35; }
.record-code { display: inline-flex; max-width: 260px; padding: 6px 10px; border-radius: 999px; background: #eef5f1; color: #23483f; font-family: inherit; font-size: 12px; font-weight: 650; overflow-wrap: anywhere; }
.record-url { display: grid; gap: 3px; max-width: 230px; }
.record-url strong { color: var(--ink); font-size: 13px; font-weight: 650; line-height: 1.25; overflow-wrap: anywhere; }
.record-url small { color: var(--muted); font-size: 11px; font-weight: 500; line-height: 1.25; overflow-wrap: anywhere; }
.record-muted { color: var(--muted); font-size: 13px; font-weight: 500; }
.order-badge { width: 34px; height: 34px; display: inline-grid; place-items: center; border-radius: 10px; background: #eef5f1; color: var(--deep); font-weight: 750; position: relative; }
.admin-table.is-sortable .order-badge::after {
    content: "⋮⋮";
    position: absolute;
    left: 50%;
    bottom: -14px;
    transform: translateX(-50%);
    color: #9aaca3;
    font-size: 10px;
    letter-spacing: -2px;
    opacity: .8;
}
.record-image { display: flex; align-items: center; gap: 12px; min-width: 220px; }
.record-image img, .record-image > span { width: 74px; height: 48px; flex: 0 0 auto; border-radius: 10px; object-fit: cover; background: #e9f1ed; border: 1px solid #dbe7e1; }
.record-image strong { display: block; max-width: 180px; color: var(--ink); font-size: 13px; font-weight: 650; overflow-wrap: anywhere; }
.record-image small { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; }
.actions { white-space: nowrap; min-width: 156px; }
.actions a { display: inline-flex; vertical-align: middle; margin-right: 8px; color: var(--deep); font-weight: 700; }
.icon-action { width: 36px; height: 36px; align-items: center; justify-content: center; border: 1px solid #dbe7e1; border-radius: 10px; background: #fff; color: var(--deep); transition: .2s ease; }
.icon-action:hover { transform: translateY(-1px); border-color: var(--deep); box-shadow: 0 12px 24px rgba(6,47,32,.1); }
.icon-action svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon-action.danger { color: var(--danger); border-color: #f2d3d7; background: #fff8f8; }
.record-switch {
    width: 42px;
    height: 24px;
    align-items: center;
    padding: 0;
    border-radius: 999px;
    background: #cbd8d2;
    position: relative;
    transform: translateY(2px);
}
.record-switch span {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 5px 14px rgba(0,0,0,.18);
    transition: .2s ease;
}
.record-switch.is-active {
    background: var(--lime);
}
.record-switch.is-active span {
    transform: translateX(18px);
}

.analysis-layout { display: grid; grid-template-columns: 1.6fr .8fr; gap: 24px; }
.bar-chart { height: 320px; display: flex; align-items: end; gap: 18px; padding-top: 22px; }
.bar { flex: 1; min-width: 36px; border-radius: 10px 10px 0 0; background: #becdc6; position: relative; }
.bar span { position: absolute; bottom: 100%; left: 50%; transform: translate(-50%, -8px); font-weight: 700; }
.list-stack { display: grid; gap: 12px; }
.list-item { display: grid; grid-template-columns: 48px 1fr auto; gap: 14px; align-items: center; padding: 14px; border-radius: 10px; background: #fff4f4; border: 1px solid #ffd4d4; }
.list-item img { width: 48px; height: 48px; border-radius: 8px; object-fit: cover; background: #edf2ef; }
.list-item strong { display: block; font-weight: 700; }
.list-item small { color: var(--danger); font-weight: 600; }
.empty-state { padding: 40px; border: 1px dashed var(--line); border-radius: 14px; background: #fff; color: var(--muted); font-weight: 600; text-align: center; }
.flash { margin-bottom: 20px; padding: 15px 18px; border-radius: 10px; font-weight: 650; }
.flash.success { background: #ecf8d3; color: #314a00; }
.flash.error { background: #ffe7e7; color: #8a1320; }

.login-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
    background:
        radial-gradient(circle at 18% 16%, rgba(204,226,22,.2), transparent 28%),
        radial-gradient(circle at 78% 78%, rgba(0,151,255,.18), transparent 34%),
        linear-gradient(135deg, #052b1e, #043a3d 58%, #062536);
}
.login-card {
    width: min(520px, 100%);
    padding: 36px;
    border: 1px solid rgba(255,255,255,.52);
    border-radius: 22px;
    background: rgba(255,255,255,.96);
    box-shadow: 0 34px 100px rgba(0,0,0,.34);
}
.login-brand-block {
    margin-bottom: 26px;
}
.login-card .admin-brand {
    padding: 0;
    color: var(--ink);
}
.login-card .admin-brand img {
    width: 66px;
    height: 66px;
    filter: drop-shadow(0 16px 28px rgba(0,151,255,.2));
}
.login-card .admin-brand strong {
    color: #0b96f3;
    font-size: 24px;
    letter-spacing: 0;
}
.login-card .admin-brand small {
    color: #f06a00;
    font-size: 12px;
    font-weight: 750;
    letter-spacing: .06em;
    text-transform: uppercase;
}
.login-card h1 {
    margin: 28px 0 10px;
    color: var(--ink);
    font-size: clamp(28px, 3.6vw, 36px);
    line-height: 1.02;
    letter-spacing: 0;
}
.login-card p {
    max-width: 390px;
    margin: 0;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.65;
}
.login-card form {
    display: grid;
    gap: 18px;
}
.login-card label {
    display: grid;
    gap: 8px;
    color: var(--ink);
    font-weight: 650;
}
.login-card input {
    width: 100%;
    min-height: 56px;
    border: 1px solid #c9d8d1;
    border-radius: 12px;
    padding: 0 16px;
    background: #f8fbfa;
    color: var(--ink);
    outline: none;
    transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
.login-card input:focus {
    border-color: #0b96f3;
    background: #fff;
    box-shadow: 0 0 0 5px rgba(11,150,243,.12);
}
.login-card .primary-btn {
    margin-top: 6px;
    min-height: 58px;
    border-radius: 12px;
    background: #0b96f3;
    color: #fff;
    box-shadow: 0 18px 42px rgba(11,150,243,.24);
}

.people-grid .people-list { display: flex; flex-direction: column; gap: 12px; }
.people-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 16px;
    border: 1px solid #e2ece7;
    border-radius: 14px;
    background: linear-gradient(180deg, #fff 0%, #f9fbfa 100%);
}
.people-list-main { display: flex; align-items: center; gap: 14px; min-width: 0; }
.people-list-main strong { display: block; color: #163c34; font-size: 15px; }
.people-list-main small { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; }
.people-list-main em { display: block; color: #4f6d63; font-size: 12px; font-style: normal; margin-top: 4px; }
.people-list-meta { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.people-avatar {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    object-fit: cover;
    flex-shrink: 0;
    border: 1px solid #dbe7e1;
}
.people-avatar.is-empty {
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #013634, #2d8f6f);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
}
.status-pill {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}
.status-pill.is-active { background: #e7f6ee; color: #1f7a4d; }
.status-pill.is-passive { background: #f6ecec; color: #b04a4a; }
.people-photo-field {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px;
    border: 1px dashed #cbd9d2;
    border-radius: 12px;
    background: #f9fbfa;
}
.people-photo-preview {
    width: 72px;
    height: 72px;
    border-radius: 14px;
    object-fit: cover;
    flex-shrink: 0;
}
.people-photo-preview.is-empty {
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #013634, #cce216);
    color: #fff;
    font-size: 22px;
    font-weight: 700;
}
.people-photo-field input[type="file"] { flex: 1; min-height: auto; padding: 0; border: 0; background: transparent; }
.admin-form-people textarea { min-height: 120px; }

.assign-shell { display: grid; gap: 18px; }
.assign-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 24px 28px;
    background:
        radial-gradient(circle at top right, rgba(204,226,22,.18), transparent 34%),
        linear-gradient(135deg, #013634 0%, #0b4f49 100%);
    color: #fff;
    border: 0;
}
.assign-hero-copy h2 { margin: 8px 0 6px; font-size: 28px; }
.assign-hero-copy p { margin: 0; color: rgba(255,255,255,.78); max-width: 520px; }
.assign-eyebrow {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 12px;
    border-radius: 999px;
    background: rgba(255,255,255,.12);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.assign-stats { display: flex; gap: 14px; flex-wrap: wrap; }
.assign-stat {
    min-width: 110px;
    padding: 14px 16px;
    border-radius: 14px;
    background: rgba(255,255,255,.1);
    border: 1px solid rgba(255,255,255,.12);
}
.assign-stat strong { display: block; font-size: 28px; line-height: 1; }
.assign-stat span { display: block; margin-top: 6px; font-size: 13px; color: rgba(255,255,255,.76); }
.assign-toolbar {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
}
.assign-teacher-picker { flex: 1 1 320px; max-width: 420px; }
.assign-teacher-picker span { display: block; margin-bottom: 8px; font-weight: 650; color: #163c34; }
.assign-teacher-picker select {
    width: 100%;
    min-height: 52px;
    border: 1px solid #cbd9d2;
    border-radius: 10px;
    padding: 11px 44px 11px 14px;
    background-color: #f9fbfa;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23163c34' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 18px 18px;
    color: var(--ink);
    font-size: 15px;
    font-weight: 500;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    cursor: pointer;
    transition: border-color .2s ease, box-shadow .2s ease;
}
.assign-teacher-picker select:hover { border-color: var(--deep); }
.assign-teacher-picker select:focus {
    border-color: var(--deep);
    box-shadow: 0 0 0 3px rgba(6, 47, 32, .12);
}
.assign-selected-teacher {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 14px;
    background: #f3f8f5;
    border: 1px solid #dbe7e1;
}
.assign-selected-teacher strong { display: block; color: #163c34; }
.assign-selected-teacher small { color: var(--muted); }
.card-subtitle { margin: 4px 0 0; color: var(--muted); font-size: 14px; font-weight: 500; }
.assign-toolbar-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.assign-search {
    min-width: 220px;
    min-height: 44px;
    border: 1px solid #cbd9d2;
    border-radius: 10px;
    padding: 0 14px;
    background: #f9fbfa;
}
.assign-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 14px;
    margin-top: 18px;
}
.assign-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border: 1px solid #dbe7e1;
    border-radius: 16px;
    background: #fff;
    cursor: pointer;
    transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.assign-card:hover { transform: translateY(-2px); box-shadow: 0 16px 34px rgba(6,47,32,.08); }
.assign-card.is-selected {
    border-color: var(--deep);
    background: linear-gradient(180deg, #f7fbf8 0%, #eef6f1 100%);
    box-shadow: 0 0 0 3px rgba(1,54,52,.08);
}
.assign-card input { position: absolute; opacity: 0; pointer-events: none; }
.assign-card-check {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 22px;
    height: 22px;
    border-radius: 999px;
    border: 2px solid #cbd9d2;
    background: #fff;
}
.assign-card.is-selected .assign-card-check {
    border-color: var(--deep);
    background: var(--deep);
    box-shadow: inset 0 0 0 4px #fff;
}
.assign-card-body { min-width: 0; }
.assign-card-body strong { display: block; color: #163c34; font-size: 15px; }
.assign-card-body small,
.assign-card-body em { display: block; color: var(--muted); font-size: 12px; margin-top: 3px; font-style: normal; }
.assign-form-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid #e7efea;
}
.empty-state.wide { grid-column: 1 / -1; }

@media (max-width: 1180px) {
    .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .admin-grid.two, .analysis-layout { grid-template-columns: 1fr; }
}

@media (max-width: 820px) {
    .admin-shell { grid-template-columns: 1fr; }
    .admin-sidebar { position: relative; height: auto; }
    .admin-topbar {
        position: relative;
        flex-direction: column;
        align-items: stretch;
        padding: 16px;
        min-height: auto;
    }
    .topbar-actions {
        flex-wrap: wrap;
        justify-content: space-between;
        gap: 10px;
    }
    .topbar-user {
        order: 1;
        flex: 1 1 100%;
        max-width: none;
    }
    .topbar-logout {
        order: 2;
        margin-left: auto;
    }
    .topbar-icon-btn,
    .topbar-lang {
        order: 3;
    }
    .admin-content { padding: 24px 16px; }
    .stats-grid, .feature-grid { grid-template-columns: 1fr; }
    .admin-form { grid-template-columns: 1fr; }
    .resource-toolbar { margin: 0 0 20px; }
    .resource-create-btn { width: 100%; justify-content: center; }
    .resource-modal-shell { padding: 14px; }
    .resource-modal-shell > .form-card { padding: 20px 16px; }
    .unsaved-confirm-actions { grid-template-columns: 1fr; }
    .unsaved-confirm-actions button { width: 100%; }
    .admin-extra-fields-grid { grid-template-columns: 1fr; }
    .dropzone {
        grid-template-columns: 1fr;
        align-items: stretch;
    }
    .dropzone-preview {
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 10;
        max-height: 220px;
    }
    .admin-nav {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 6px;
    }
    .admin-nav .nav-section {
        grid-column: 1 / -1;
        margin-top: 4px;
    }
    .admin-nav a {
        min-height: 42px;
        padding: 10px 12px;
        font-size: 13px;
    }
    .people-list-item {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    .people-list-meta {
        flex-wrap: wrap;
        justify-content: flex-start;
    }
    .log-toolbar {
        flex-direction: column;
        align-items: stretch;
    }
    .log-selected-user {
        margin-right: 0;
        width: 100%;
    }
    .log-user-grid {
        grid-template-columns: 1fr;
    }
    .teacher-log-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .teacher-log-meta-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .teacher-log-search {
        flex-direction: column;
        align-items: stretch;
    }
    .teacher-log-search .btn,
    .teacher-log-search input[type="search"] {
        width: 100%;
    }
    .teacher-log-pager {
        flex-direction: column;
        align-items: stretch;
    }
    .teacher-log-pager-links {
        justify-content: center;
    }
    .teacher-log-card .teacher-log-stats-inline {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .card-head {
        flex-wrap: wrap;
        gap: 8px;
    }
    .table-wrap {
        -webkit-overflow-scrolling: touch;
        margin-inline: -4px;
        padding-inline: 4px;
    }
}

@media (max-width: 560px) {
    .admin-nav {
        grid-template-columns: 1fr;
    }
    .admin-table {
        min-width: 640px;
    }
    .teacher-impact-table {
        min-width: 560px;
    }
    .teacher-log-stats,
    .teacher-log-meta-grid {
        grid-template-columns: 1fr;
    }
    .log-user-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .log-entry-head {
        flex-direction: column;
        align-items: flex-start;
    }
}


.role-badge {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}
.role-badge.is-super { background: #efe8ff; color: #5b3ea8; }
.role-badge.is-manager { background: #eef3ed; color: var(--deep); }
.muted-note { color: var(--muted); font-size: 12px; }

.log-toolbar {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}
.log-selected-user {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-right: auto;
}
.log-user-avatar {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #013634, #2d8f6f);
    color: #fff;
    font-weight: 700;
    flex-shrink: 0;
}
.log-user-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 14px;
}
.log-user-card {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 12px 14px;
    padding: 16px;
    border: 1px solid #dbe7e1;
    border-radius: 16px;
    background: #fff;
    color: inherit;
    text-decoration: none;
    transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.log-user-card:hover {
    border-color: #9fc7b8;
    box-shadow: 0 10px 24px rgba(1, 54, 52, .08);
    transform: translateY(-1px);
}
.log-user-card-body strong {
    display: block;
    font-size: 16px;
}
.log-user-card-body small {
    display: block;
    margin-top: 4px;
    color: var(--muted);
}
.log-user-stats {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    padding-top: 12px;
    border-top: 1px solid #edf3f0;
}
.log-user-stats div {
    text-align: center;
}
.log-user-stats strong {
    display: block;
    font-size: 18px;
}
.log-user-stats span {
    display: block;
    margin-top: 2px;
    font-size: 11px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .04em;
}
.log-timeline {
    display: grid;
    gap: 12px;
}
.log-entry {
    padding: 16px 18px;
    border: 1px solid #e4ece8;
    border-radius: 14px;
    background: #fcfefd;
}
.log-entry-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}
.log-entry-head time {
    color: var(--muted);
    font-size: 12px;
    white-space: nowrap;
}
.log-entry h3 {
    margin: 0 0 8px;
    font-size: 15px;
    line-height: 1.45;
}
.log-entry-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    color: var(--muted);
    font-size: 12px;
}
.log-action-badge {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .03em;
}
.log-action-badge.is-view { background: #eef3ed; color: #2d6b57; }
.log-action-badge.is-create { background: #e8f4ff; color: #1f6ea8; }
.log-action-badge.is-update { background: #fff4df; color: #9a6a12; }
.log-action-badge.is-delete { background: #fdecec; color: #b04a4a; }
.log-action-badge.is-toggle { background: #f2ecff; color: #6a4ca8; }
.log-action-badge.is-login,
.log-action-badge.is-logout { background: #e8f7f2; color: #1f7a4d; }
.log-action-badge.is-assign { background: #eaf8ff; color: #2b7f96; }
.log-empty {
    margin: 0;
    padding: 28px 12px;
    text-align: center;
    color: var(--muted);
}

.teacher-log-search {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}
.teacher-log-search input[type="search"] {
    flex: 1 1 280px;
    min-height: 42px;
    padding: 0 14px;
    border: 1px solid #dbe7e1;
    border-radius: 12px;
    background: #fff;
}
.teacher-log-card .teacher-log-stats-inline {
    grid-column: 1 / -1;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}
.teacher-log-total {
    grid-column: 1 / -1;
    display: flex;
    align-items: baseline;
    gap: 8px;
    padding-top: 4px;
    border-top: 1px dashed #dbe7e1;
}
.teacher-log-total strong {
    font-size: 1.15rem;
    color: var(--deep);
}
.teacher-log-total span {
    color: var(--muted);
    font-size: 12px;
}
.teacher-log-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}
.teacher-stat-card {
    padding: 16px;
    border: 1px solid #dbe7e1;
    border-radius: 16px;
    background: #fff;
    display: grid;
    gap: 6px;
}
.teacher-stat-card span {
    color: var(--muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.teacher-stat-card strong {
    font-size: 1.6rem;
    color: var(--deep);
    line-height: 1;
}
.teacher-stat-card small {
    color: var(--muted);
    font-size: 12px;
}
.teacher-log-meta {
    margin-bottom: 18px;
}
.teacher-log-meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
}
.teacher-log-meta-grid span {
    display: block;
    color: var(--muted);
    font-size: 12px;
    margin-bottom: 4px;
}
.teacher-log-sections {
    display: grid;
    gap: 18px;
}
.teacher-impact-table th,
.teacher-impact-table td {
    text-align: center;
}
.teacher-impact-table th:first-child,
.teacher-impact-table td:first-child {
    text-align: left;
}
.teacher-message-timeline {
    max-height: none;
    overflow: visible;
}
.teacher-log-pager {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid #e6efea;
}
.teacher-log-pager-info {
    color: var(--muted);
    font-size: 13px;
}
.teacher-log-pager-links {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.teacher-log-pager-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    border: 1px solid #dbe7e1;
    border-radius: 10px;
    background: #fff;
    color: var(--deep);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
}
.teacher-log-pager-link:hover {
    border-color: #9fc7b8;
    background: #f7fbf9;
}
.teacher-log-pager-link.is-active {
    border-color: var(--deep);
    background: var(--deep);
    color: #fff;
}

.admin-content:has(.dashboard-hero) .page-title {
    display: none;
}

.dashboard-hero {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 24px;
    padding: 28px 30px;
    border-radius: 20px;
    color: #fff;
    background:
        radial-gradient(circle at top right, rgba(204, 226, 22, .22), transparent 34%),
        linear-gradient(135deg, #062f20 0%, #0a4d36 58%, #145f45 100%);
    box-shadow: 0 24px 60px rgba(6, 47, 32, .18);
}
.dashboard-hero-kicker {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .12);
    color: rgba(255, 255, 255, .88);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
}
.dashboard-hero h2 {
    margin: 14px 0 10px;
    font-size: clamp(28px, 4vw, 40px);
    line-height: 1.05;
}
.dashboard-hero p {
    margin: 0;
    max-width: 720px;
    color: rgba(255, 255, 255, .84);
    font-size: 15px;
    line-height: 1.65;
}
.dashboard-hero p strong {
    color: var(--lime);
}
.dashboard-hero-meta {
    display: grid;
    gap: 12px;
    align-content: center;
    min-width: 220px;
}
.dashboard-hero-meta article {
    padding: 14px 16px;
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 14px;
    background: rgba(255, 255, 255, .08);
    backdrop-filter: blur(8px);
}
.dashboard-hero-meta span {
    display: block;
    color: rgba(255, 255, 255, .68);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .05em;
}
.dashboard-hero-meta strong {
    display: block;
    margin-top: 6px;
    font-size: 18px;
}

.dashboard-kpi-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}
.dashboard-kpi {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 14px;
    align-items: center;
    min-height: 112px;
    padding: 18px 20px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 16px 40px rgba(6, 47, 32, .06);
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.dashboard-kpi:hover {
    transform: translateY(-2px);
    border-color: #b7d2c5;
    box-shadow: 0 20px 44px rgba(6, 47, 32, .1);
}
.dashboard-kpi-icon {
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: #edf3ef;
    color: var(--deep);
}
.dashboard-kpi-icon svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
}
.dashboard-kpi small {
    display: block;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.dashboard-kpi strong {
    display: block;
    margin-top: 6px;
    font-size: 30px;
    line-height: 1;
    color: #001c16;
}
.dashboard-kpi em {
    display: block;
    margin-top: 6px;
    color: var(--muted);
    font-size: 12px;
    font-style: normal;
}
.dashboard-kpi.tone-green .dashboard-kpi-icon { background: #e8f7ef; color: #0f6a4d; }
.dashboard-kpi.tone-blue .dashboard-kpi-icon { background: #e8f3ff; color: #1d6eb8; }
.dashboard-kpi.tone-lime .dashboard-kpi-icon { background: #f3f8d7; color: #5f7300; }
.dashboard-kpi.tone-alert .dashboard-kpi-icon { background: #fff0f0; color: #be1e2d; }
.dashboard-kpi.tone-dark .dashboard-kpi-icon { background: #e7efec; color: var(--deep); }
.dashboard-kpi.tone-brown .dashboard-kpi-icon { background: #f8efe6; color: var(--brown); }

.dashboard-quick {
    margin-bottom: 24px;
}
.dashboard-section-head h2,
.dashboard-panel .card-head h2 {
    margin: 0;
    font-size: 22px;
}
.dashboard-section-head p,
.dashboard-card-desc {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 14px;
}
.dashboard-quick-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-top: 16px;
}
.dashboard-quick-link {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 12px;
    align-items: center;
    min-height: 78px;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
    transition: border-color .2s ease, background .2s ease, transform .2s ease;
}
.dashboard-quick-link:hover {
    border-color: #9fc7b8;
    background: #f8fbfa;
    transform: translateY(-1px);
}
.dashboard-quick-icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: #edf3ef;
    color: var(--deep);
}
.dashboard-quick-icon svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
}
.dashboard-quick-link strong {
    display: block;
    font-size: 14px;
}
.dashboard-quick-link small {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.45;
}

.dashboard-main-grid,
.dashboard-feed-grid {
    display: grid;
    gap: 24px;
    margin-bottom: 24px;
}
.dashboard-main-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
.dashboard-feed-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
.dashboard-panel {
    box-shadow: 0 16px 40px rgba(6, 47, 32, .06);
}
.dashboard-panel .card-head {
    align-items: flex-start;
}

.dashboard-bar-chart {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 14px;
    align-items: end;
    min-height: 240px;
    margin-top: 8px;
    padding: 8px 4px 0;
}
.dashboard-bar-chart.is-content {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}
.dashboard-bar-item {
    display: grid;
    gap: 8px;
    justify-items: center;
    text-align: center;
}
.dashboard-bar-track {
    width: 100%;
    height: 180px;
    display: flex;
    align-items: end;
    border-radius: 12px 12px 0 0;
    background: linear-gradient(180deg, #f3f8f5 0%, #e8f0ec 100%);
}
.dashboard-bar-fill {
    display: block;
    width: 100%;
    border-radius: 12px 12px 4px 4px;
    background: linear-gradient(180deg, #cce216 0%, #0a4d36 100%);
}
.dashboard-bar-item strong {
    font-size: 18px;
    color: var(--deep);
}
.dashboard-bar-item small {
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.dashboard-highlight-row,
.dashboard-content-list {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid #e7efea;
}
.dashboard-content-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
.dashboard-highlight-row article,
.dashboard-content-list div {
    padding: 14px;
    border-radius: 12px;
    background: #f8fbfa;
    border: 1px solid #e7efea;
}
.dashboard-highlight-row span,
.dashboard-content-list span {
    display: block;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}
.dashboard-highlight-row strong,
.dashboard-content-list strong {
    display: block;
    margin-top: 6px;
    font-size: 24px;
    color: var(--deep);
}

.dashboard-feed {
    display: grid;
    gap: 12px;
}
.dashboard-feed-item {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 14px;
    align-items: start;
    padding: 14px;
    border: 1px solid #e7efea;
    border-radius: 14px;
    background: #fcfefd;
}
.dashboard-feed-item.is-new {
    border-color: #f2c8c8;
    background: #fff8f8;
}
.dashboard-feed-avatar {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: linear-gradient(135deg, #062f20, #2d8f6f);
    color: #fff;
    font-weight: 800;
}
.dashboard-feed-avatar.is-student {
    background: linear-gradient(135deg, #1d6eb8, #4aa3ef);
}
.dashboard-feed-body strong {
    display: block;
    font-size: 15px;
}
.dashboard-feed-body small {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-size: 12px;
}
.dashboard-feed-body p {
    margin: 8px 0 0;
    color: #48645a;
    font-size: 13px;
    line-height: 1.5;
}
.dashboard-feed-badge {
    align-self: start;
    padding: 6px 10px;
    border-radius: 999px;
    background: #fdecec;
    color: #b04a4a;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.dashboard-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}
.dashboard-mini-list h3 {
    margin: 0 0 12px;
    font-size: 14px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .06em;
}
.dashboard-mini-item {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 12px;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #edf3f0;
}
.dashboard-mini-item:last-child {
    border-bottom: 0;
}
.dashboard-mini-item strong {
    display: block;
    font-size: 14px;
}
.dashboard-mini-item small {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-size: 12px;
}

.dashboard-rank-list {
    display: grid;
    gap: 10px;
}
.dashboard-rank-item {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 14px;
    border: 1px solid #e7efea;
    border-radius: 14px;
    background: #fcfefd;
    transition: border-color .2s ease, transform .2s ease;
}
.dashboard-rank-item:hover {
    border-color: #9fc7b8;
    transform: translateY(-1px);
}
.dashboard-rank-no {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: #edf3ef;
    color: var(--deep);
    font-weight: 800;
}
.dashboard-rank-body strong {
    display: block;
}
.dashboard-rank-body small {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-size: 12px;
}
.dashboard-log-timeline {
    max-height: 420px;
    overflow: auto;
}

@media (max-width: 1180px) {
    .dashboard-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .dashboard-quick-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 820px) {
    .dashboard-hero {
        flex-direction: column;
        padding: 22px 18px;
    }
    .dashboard-hero-meta {
        width: 100%;
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    .dashboard-main-grid,
    .dashboard-feed-grid,
    .dashboard-tabs {
        grid-template-columns: 1fr;
    }
    .dashboard-quick-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .dashboard-highlight-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .dashboard-bar-chart,
    .dashboard-bar-chart.is-content {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        min-height: 200px;
    }
}

@media (max-width: 560px) {
    .dashboard-kpi-grid,
    .dashboard-quick-grid,
    .dashboard-hero-meta,
    .dashboard-highlight-row,
    .dashboard-content-list {
        grid-template-columns: 1fr;
    }
    .dashboard-bar-chart,
    .dashboard-bar-chart.is-content {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .dashboard-feed-item {
        grid-template-columns: auto 1fr;
    }
    .dashboard-feed-badge {
        grid-column: 2;
        justify-self: start;
    }
}

/* Randevu mesajları: tıklanabilir satır + detay modalı */
.messages-table tbody tr.message-row { cursor: pointer; transition: background .15s ease; }
.messages-table tbody tr.message-row:hover { background: #f3f8f5; }
.messages-table tbody tr.is-unread { background: #fff8e8; }
.messages-table tbody tr.is-unread:hover { background: #fff2d6; }
.messages-table .message-name { font-weight: 700; }
.message-new-pill {
    display: inline-flex;
    align-items: center;
    margin-left: 8px;
    padding: 2px 9px;
    border-radius: 999px;
    background: var(--danger);
    color: #fff;
    font-size: 11px;
    font-weight: 800;
}
.message-new-pill[hidden] { display: none; }

.message-modal {
    position: fixed;
    inset: 0;
    z-index: 140;
    display: none;
    place-items: center;
    padding: 24px;
    background: rgba(0, 28, 22, .72);
    backdrop-filter: blur(8px);
    opacity: 0;
    transition: opacity .2s ease;
}
.message-modal.is-open { display: grid; opacity: 1; }
.message-modal-dialog {
    position: relative;
    width: min(560px, 100%);
    max-height: 90vh;
    overflow-y: auto;
    padding: 32px;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 32px 90px rgba(0, 0, 0, .35);
}
.message-modal-close {
    position: absolute;
    top: 16px;
    right: 18px;
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: #f2f7f4;
    color: var(--ink);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}
.message-modal-eyebrow { display: block; color: var(--muted); font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.message-modal-dialog h3 { margin: 8px 0 20px; font-size: 24px; }
.message-modal-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 14px;
    margin-bottom: 20px;
}
.message-modal-meta small { display: block; color: var(--muted); font-size: 12px; font-weight: 600; margin-bottom: 4px; }
.message-modal-meta a, .message-modal-meta strong { color: var(--ink); font-weight: 700; font-size: 15px; word-break: break-word; }
.message-modal-meta a:hover { color: var(--deep); text-decoration: underline; }
.message-modal-body { margin-bottom: 24px; }
.message-modal-body small { display: block; color: var(--muted); font-size: 12px; font-weight: 600; margin-bottom: 6px; }
.message-modal-body p {
    margin: 0;
    padding: 16px;
    border-radius: 12px;
    background: var(--soft);
    color: var(--ink);
    line-height: 1.6;
    white-space: pre-wrap;
}
.message-modal-actions { display: flex; justify-content: flex-end; gap: 12px; }
.message-modal-actions .danger-btn {
    padding: 11px 20px;
    border: 1px solid var(--danger);
    border-radius: 10px;
    background: #fff;
    color: var(--danger);
    font-weight: 700;
    cursor: pointer;
}
.message-modal-actions .danger-btn:hover { background: var(--danger); color: #fff; }
.message-modal-actions .secondary-btn {
    padding: 11px 20px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #f2f7f4;
    color: var(--ink);
    font-weight: 700;
    cursor: pointer;
}
.message-modal-actions .secondary-btn:hover { background: #e7f1ed; }

/* Bildirim snackbar */
.tk-admin-snackbar-stack {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 200;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 340px;
}
.tk-admin-snackbar {
    display: block;
    padding: 14px 18px;
    border-radius: 14px;
    background: #072f1f;
    color: #fff;
    box-shadow: 0 18px 48px rgba(6, 47, 32, .35);
    transform: translateY(16px);
    opacity: 0;
    transition: transform .3s ease, opacity .3s ease;
}
.tk-admin-snackbar.is-visible { transform: translateY(0); opacity: 1; }
.tk-admin-snackbar strong { display: block; font-size: 15px; font-weight: 800; margin-bottom: 3px; }
.tk-admin-snackbar span { display: block; font-size: 13px; color: rgba(255,255,255,.8); }

/* ============================================================
   Mobile off-canvas navigation drawer + responsive polish
   ============================================================ */
.admin-menu-toggle { display: none; }
.admin-nav-backdrop[hidden] { display: none; }

@media (max-width: 820px) {
    body.nav-locked { overflow: hidden; }

    .admin-menu-toggle {
        display: inline-flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 4px;
        width: 44px;
        height: 44px;
        flex: 0 0 44px;
        padding: 0;
        border: 1px solid var(--line, #dce6e2);
        border-radius: 12px;
        background: #fff;
        cursor: pointer;
    }
    .admin-menu-toggle span {
        width: 20px;
        height: 2px;
        border-radius: 99px;
        background: var(--deep, #072f1f);
    }

    .admin-topbar {
        flex-direction: row !important;
        flex-wrap: wrap;
        align-items: center;
        gap: 12px;
    }
    .topbar-brand { flex: 1 1 auto; }
    .topbar-actions { flex: 1 1 100%; }

    /* Sidebar becomes a slide-in drawer */
    .admin-sidebar {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        bottom: 0 !important;
        z-index: 1200 !important;
        width: min(86vw, 320px) !important;
        height: 100% !important;
        margin: 0 !important;
        overflow-y: auto !important;
        border-radius: 0 18px 18px 0 !important;
        box-shadow: 0 30px 80px rgba(6, 47, 32, .32);
        transform: translateX(-100%);
        transition: transform .28s ease;
    }
    .admin-shell.nav-open .admin-sidebar {
        transform: translateX(0);
    }

    .admin-nav {
        grid-template-columns: 1fr !important;
    }
    .admin-nav a {
        min-height: 46px !important;
    }

    .admin-nav-backdrop {
        position: fixed;
        inset: 0;
        z-index: 1150;
        background: rgba(6, 47, 32, .45);
        backdrop-filter: blur(2px);
        opacity: 0;
        visibility: hidden;
        transition: opacity .25s ease, visibility .25s ease;
    }
    .admin-shell.nav-open .admin-nav-backdrop {
        opacity: 1;
        visibility: visible;
    }

    /* CKEditor inside modal: keep it usable, let the modal scroll */
    .resource-modal-shell > .form-card {
        max-height: calc(100vh - 24px);
        overflow-y: auto;
    }
    .admin-form .cke_contents {
        min-height: 220px !important;
    }
}

@media (max-width: 560px) {
    .tk-admin-snackbar-stack {
        right: 12px;
        left: 12px;
        bottom: 12px;
        max-width: none;
    }
}

