/* Ana sayfa kutuları ve modül sayfaları (private/lgs_hub.php) */

.hub-hello { margin: 4px 0 20px; }
.hub-hello h1 { font-size: clamp(22px, 3vw, 28px); font-weight: 800; margin: 2px 0 4px; }
.hub-hello .muted { margin: 0; }

.hub-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 24px; }
@media (max-width: 1100px) { .hub-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }


/* Ton renkleri: --t ana renk, --tb açık zemin */
.hub-blue { --t: #2563eb; --tb: #eff6ff; }
.hub-teal { --t: #0d9488; --tb: #f0fdfa; }
.hub-green { --t: #059669; --tb: #ecfdf5; }
.hub-amber { --t: #d97706; --tb: #fffbeb; }
.hub-violet { --t: #7c3aed; --tb: #f5f3ff; }
.hub-slate { --t: #475569; --tb: #f1f5f9; }

.hub-box { position: relative; display: flex; flex-direction: column; gap: 8px; min-height: 210px; padding: 22px; background: var(--surface); border: 1px solid var(--line);
    border-radius: var(--radius); box-shadow: var(--shadow); text-decoration: none; color: var(--ink); transition: transform .15s, border-color .15s, box-shadow .15s; overflow: hidden; }
.hub-box::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--t); }
.hub-box:hover { transform: translateY(-2px); border-color: var(--t); box-shadow: 0 2px 4px rgba(15, 23, 42, .05), 0 14px 32px rgba(15, 23, 42, .1); }
.hub-box:focus-visible, .hub-sub:focus-visible { outline: 3px solid var(--t, var(--brand)); outline-offset: 2px; }
.hub-ico { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 14px; background: var(--tb); color: var(--t); flex: 0 0 auto; }
.hub-title { font-size: 19px; font-weight: 800; letter-spacing: -.01em; margin-top: 4px; }
.hub-desc { font-size: 13px; color: var(--muted); line-height: 1.45; }
.hub-stats { display: flex; flex-direction: column; gap: 2px; font-size: 13px; font-weight: 700; color: var(--ink-soft); margin-top: auto; padding-top: 8px; border-top: 1px dashed var(--line); }
.hub-stats small { font-weight: 500; color: var(--muted); }
.hub-bad { color: var(--bad) !important; }
.hub-go { font-size: 12px; font-weight: 700; color: var(--t); }
.hub-pill { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--tb); color: var(--t); vertical-align: middle; border: 1px solid currentColor; }
.hub-soon { background: repeating-linear-gradient(135deg, var(--surface) 0 12px, #fafafa 12px 24px); }

.hub-modhead { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 10px 16px; margin-bottom: 16px; background: var(--surface); border: 1px solid var(--line);
    border-left: 4px solid var(--t); border-radius: 12px; }
.hub-modhead .hub-ico { width: 36px; height: 36px; border-radius: 10px; }
.hub-modhead h1 { font-size: 18px; font-weight: 800; margin: 0; flex: 1 1 auto; }
.hub-modstats { display: flex; flex-wrap: wrap; gap: 6px; }
.hub-modstats span { padding: 3px 10px; border-radius: 999px; background: var(--tb); color: var(--ink-soft); font-size: 12px; font-weight: 700; white-space: nowrap; }
.hub-modstats .hub-bad { background: #fef2f2; }

.hub-grid-sub { gap: 12px; }
.hub-sub { display: flex; align-items: flex-start; gap: 14px; padding: 16px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
    text-decoration: none; color: var(--ink); transition: border-color .15s, background .15s; min-height: 84px; }
.hub-sub:hover { border-color: var(--brand); background: var(--brand-50); }
.hub-sub-ico { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 12px; background: var(--tb); color: var(--t); flex: 0 0 auto; }
.hub-sub-txt { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.hub-sub-txt b { font-size: 15px; }
.hub-sub-txt small { font-size: 12px; color: var(--muted); line-height: 1.4; }
.hub-count { display: inline-block; min-width: 20px; padding: 0 6px; border-radius: 999px; background: var(--bad); color: #fff; font-size: 11px; text-align: center; vertical-align: middle; }
.hub-soon-card h2 { font-size: 17px; margin-bottom: 6px; }

.hub-sec { font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 22px 0 10px; }
.hub-modhead + .hub-grid-sub:empty { display: none; }
.hub-grid-sub:empty { display: none; }
.gr-karne-list { min-width: 0; }
.gr-karne-list th, .gr-karne-list td { padding: 8px 6px; }

/* Sol menü: açık modülün alt başlıkları */
.side-nav-item.side-nav-child { padding-left: 34px; font-size: 12.5px; min-height: 0; }
.side-nav-item.side-nav-child .side-item-icon { opacity: .7; transform: scale(.9); }
.side-nav-item.side-nav-child .side-item-title { font-weight: 600; }
.side-nav-subhead { padding: 10px 12px 2px 34px; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }

/* Yoklama (private/yoklama.php) */
.yk-list { display: grid; gap: 8px; }
.yk-slot { display: grid; grid-template-columns: 70px 1fr auto; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-left: 4px solid var(--warn); border-radius: 12px; text-decoration: none; color: var(--ink); background: #fff; }
.yk-slot:hover { border-color: var(--brand); }
.yk-slot.done { border-left-color: var(--ok); background: var(--ok-bg); }
.yk-p { font-weight: 800; font-size: 18px; display: flex; flex-direction: column; line-height: 1.1; }
.yk-p small { font-size: 10px; font-weight: 600; color: var(--muted); }
.yk-t b { margin-right: 6px; }
.yk-s { font-size: 12px; font-weight: 700; color: var(--brand-700); white-space: nowrap; }
.yk-slot.done .yk-s { color: var(--ok); }
.yk-grid { min-width: 0; }
.yk-grid td { padding: 4px; }
.yk-cell { display: flex; flex-direction: column; gap: 1px; min-width: 84px; padding: 6px 8px; border-radius: 9px; text-decoration: none; font-size: 11.5px; line-height: 1.25; background: var(--line-soft); color: var(--ink-soft); border: 1px solid var(--line); }
.yk-cell small { font-size: 10.5px; color: var(--muted); }
.yk-cell.done { background: var(--ok-bg); border-color: var(--ok-line); color: var(--ok); }
.yk-cell.late { background: var(--warn-bg); border-color: var(--warn-line); }
.yk-cell:hover { border-color: var(--brand); }
.yk-key { display: inline-block; width: 10px; height: 10px; border-radius: 3px; background: var(--warn-bg); border: 1px solid var(--warn-line); vertical-align: middle; margin: 0 2px 0 8px; }
.yk-key.done { background: var(--ok-bg); border-color: var(--ok-line); }
.yk-take-head { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; margin-bottom: 12px; }
.yk-take-head .field { margin: 0; flex: 1 1 220px; }
.yk-take-head .field input { width: 100%; box-sizing: border-box; }
.yk-counts { font-size: 13px; font-weight: 700; color: var(--ink-soft); }
.yk-students { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.yk-row { display: grid; grid-template-columns: 44px minmax(140px, 1fr) auto minmax(100px, 180px); align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.yk-row.st-yok { background: var(--bad-bg); border-color: var(--bad-line); }
.yk-row.st-gec { background: var(--warn-bg); border-color: var(--warn-line); }
.yk-row.st-izinli, .yk-row.st-raporlu { background: var(--off-bg); }
.yk-no { font: 600 12px "JetBrains Mono", monospace; color: var(--muted); }
.yk-name { font-weight: 700; }
.yk-opts { display: inline-flex; gap: 4px; flex-wrap: wrap; }
.yk-opt input { position: absolute; opacity: 0; pointer-events: none; }
.yk-opt span { display: inline-block; min-width: 54px; padding: 8px 10px; text-align: center; border: 1px solid var(--line); border-radius: 9px; font-size: 12.5px; font-weight: 700; color: var(--muted); cursor: pointer; background: #fff; user-select: none; }
.yk-opt input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 1px; }
.yk-var input:checked + span { background: var(--ok); border-color: var(--ok); color: #fff; }
.yk-yok input:checked + span { background: var(--bad); border-color: var(--bad); color: #fff; }
.yk-gec input:checked + span { background: var(--warn); border-color: var(--warn); color: #fff; }
.yk-izinli input:checked + span, .yk-raporlu input:checked + span { background: var(--off); border-color: var(--off); color: #fff; }
.yk-note { padding: 7px 9px; border: 1px solid var(--line); border-radius: 9px; font: inherit; font-size: 12px; min-width: 0; background: #fff; }
.yk-save { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; position: sticky; bottom: 0; padding: 10px 0; background: linear-gradient(transparent, var(--surface) 30%); }
.yk-del { text-align: right; margin: -8px 0 20px; }
.yk-week { min-width: 720px; }
.yk-week td { vertical-align: top; }
.yk-wk { display: flex; flex-direction: column; padding: 5px 7px; border-radius: 8px; background: var(--brand-50); font-size: 12px; margin-bottom: 3px; }
.yk-wk small { color: var(--muted); font-size: 10.5px; }
.yk-sumline { margin: 0 0 8px; font-size: 13px; }
.yk-mini { margin: 0; padding-left: 18px; font-size: 12.5px; color: var(--ink-soft); }
.yk-mini li { margin: 3px 0; }
@media (max-width: 760px) {
    .yk-row { grid-template-columns: 34px 1fr; }
    .yk-opts { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(5, 1fr); }
    .yk-opt span { min-width: 0; width: 100%; padding: 10px 2px; box-sizing: border-box; }
    .yk-note { grid-column: 1 / -1; }
    .yk-slot { grid-template-columns: 52px 1fr; }
    .yk-s { grid-column: 2; }
}

/* Ana sayfa: hızlı işlemler (kullanıcının seçtiği butonlar) ve düzenleme penceresi */
.hub-quick { margin: 4px 0 24px; }
.hub-cards-head { margin-top: 4px; }
.hub-quick-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.hub-quick-head h2 { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 0; }
.hub-quick-head h2 svg { color: #d97706; }
.hub-q-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.hub-q { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
    text-decoration: none; color: var(--ink); font-weight: 700; font-size: 14px; line-height: 1.25; transition: border-color .15s, background .15s, transform .15s; }
.hub-q:hover { border-color: var(--t); background: var(--tb); transform: translateY(-1px); }
.hub-q:focus-visible { outline: 3px solid var(--t); outline-offset: 2px; }
.hub-q-ico { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 10px; background: var(--tb); color: var(--t); flex: 0 0 auto; }
.hub-q-empty { width: 100%; padding: 16px; border: 2px dashed var(--line); border-radius: 12px; background: transparent; color: var(--muted); font-weight: 600; cursor: pointer; text-align: left; }
.hub-q-empty:hover { border-color: var(--brand); color: var(--brand); }

.hub-ed { width: min(680px, calc(100vw - 24px)); max-height: calc(100vh - 32px); padding: 0; border: 0; border-radius: 16px; background: var(--surface); color: var(--ink);
    box-shadow: 0 24px 64px rgba(15, 23, 42, .3); }
.hub-ed::backdrop { background: rgba(15, 23, 42, .45); }
.hub-ed-form { display: flex; flex-direction: column; max-height: calc(100vh - 32px); }
.hub-ed-head { display: flex; gap: 12px; align-items: flex-start; padding: 18px 20px 12px; border-bottom: 1px solid var(--line); }
.hub-ed-head > div { flex: 1; }
.hub-ed-head h2 { font-size: 18px; font-weight: 800; margin: 0 0 2px; }
.hub-ed-head p { margin: 0; font-size: 13px; }
.hub-ed-x { border: 0; background: transparent; font-size: 18px; line-height: 1; padding: 6px; cursor: pointer; color: var(--muted); border-radius: 8px; }
.hub-ed-x:hover { background: var(--line); }
.hub-ed-body { padding: 8px 20px 16px; overflow-y: auto; }
.hub-ed-body h3 { font-size: 14px; font-weight: 800; margin: 14px 0 8px; }
.hub-ed-body h4 { font-size: 11.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 12px 0 6px; }
.hub-ed-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.hub-ed-sel { min-height: 8px; }
.hub-ed-none { margin: 0; font-size: 13px; }
.hub-ed-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.hub-ed-sel .hub-ed-item { border-color: var(--t); background: var(--tb); }
.hub-ed-item .hub-q-ico { width: 28px; height: 28px; border-radius: 8px; }
.hub-ed-sel .hub-ed-item .hub-q-ico { background: var(--surface); }
.hub-ed-txt { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.hub-ed-txt b { font-size: 14px; }
.hub-ed-txt small { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hub-ed-act { display: flex; gap: 4px; flex: 0 0 auto; }
.hub-ed-act button { min-width: 32px; height: 32px; padding: 0 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); font-weight: 700; cursor: pointer; }
.hub-ed-act button:hover:not(:disabled) { border-color: var(--brand); color: var(--brand); }
.hub-ed-act button:disabled { opacity: .4; cursor: not-allowed; }
.hub-ed-pool [data-sc="up"], .hub-ed-pool [data-sc="down"], .hub-ed-pool [data-sc="del"], .hub-ed-sel .hub-ed-add { display: none; }
.hub-ed-sel .hub-ed-item:first-child [data-sc="up"], .hub-ed-sel .hub-ed-item:last-child [data-sc="down"] { visibility: hidden; }
.hub-ed-foot { display: flex; align-items: center; gap: 8px; padding: 12px 20px; border-top: 1px solid var(--line); }
.hub-ed-foot span { flex: 1; }

/* Ana sayfa kartları: taşıma ve gizleme (düzenleme modu) */
.hub-cards-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.hub-cards-head h2 { font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 0; }
.hub-cards-head h2 .muted { text-transform: none; letter-spacing: 0; font-weight: 600; }
.hub-cards-head [hidden], .hub-quick [hidden] { display: none !important; }
.hub-cards-msg { flex: 1; text-align: right; font-size: 12.5px; }
.hub-cards-tip { margin: -4px 0 12px; font-size: 13px; }
.hub-allhidden { padding: 18px; border: 2px dashed var(--line); border-radius: 12px; text-align: center; }
.hub-card { position: relative; display: flex; min-width: 0; }
.hub-card > .hub-box { flex: 1; min-width: 0; }
.hub-grid:not(.hub-editing) .hub-hidden { display: none; }
.hub-tools { display: none; }
.hub-editing .hub-card { cursor: grab; }
.hub-editing .hub-card > .hub-box { pointer-events: none; outline: 2px dashed var(--line); outline-offset: -2px; }
.hub-editing .hub-card:hover > .hub-box { transform: none; }
.hub-editing .hub-hidden > .hub-box { opacity: .4; filter: grayscale(.8); }
.hub-editing .hub-dragging { opacity: .35; }
.hub-editing .hub-tools { position: absolute; top: 12px; right: 12px; z-index: 2; display: flex; align-items: center; gap: 4px; padding: 4px; background: var(--surface);
    border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 4px 14px rgba(15, 23, 42, .12); }
.hub-grip { padding: 0 4px; color: var(--muted); font-size: 16px; line-height: 1; cursor: grab; }
.hub-tools button { display: inline-flex; align-items: center; gap: 4px; height: 30px; min-width: 30px; justify-content: center; padding: 0 8px; border: 1px solid var(--line);
    border-radius: 8px; background: var(--surface); color: var(--ink); font-size: 13px; font-weight: 700; cursor: pointer; }
.hub-tools button:hover { border-color: var(--brand); color: var(--brand); }
.hub-tools .hub-hide:hover { border-color: var(--bad); color: var(--bad); }
.hub-tools .hub-show { border-color: var(--brand); background: var(--brand); color: #fff; }
.hub-tools .hub-show:hover { color: #fff; filter: brightness(1.1); }
.hub-card:not(.hub-hidden) .hub-show, .hub-hidden .hub-hide { display: none; }
.hub-card:first-child [data-hub="left"], .hub-card:last-child [data-hub="right"] { visibility: hidden; }

/* Masaüstü: kart başlığı ikonun yanında, kart kısa */
@media (min-width: 601px) {
    .hub-box { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; grid-template-rows: auto auto 1fr auto; column-gap: 14px; row-gap: 8px; min-height: 0; padding: 20px 22px 18px; }
    .hub-box > .hub-ico { grid-column: 1; grid-row: 1; }
    .hub-box > .hub-title { grid-column: 2; grid-row: 1; margin: 0; }
    .hub-box > .hub-desc, .hub-box > .hub-stats, .hub-box > .hub-go { grid-column: 1 / -1; }
    .hub-box > .hub-stats { margin-top: 0; align-self: start; }
    .hub-box > .hub-desc { align-self: start; }
    .hub-editing .hub-tools { top: auto; bottom: 10px; right: 10px; }
}

@media (max-width: 600px) {
    .hub-cards-head { flex-wrap: wrap; }
    .hub-cards-msg { order: 5; flex-basis: 100%; text-align: left; }
    .hub-cards-head h2 { margin-right: auto; }
    .hub-editing .hub-tools { top: auto; bottom: 8px; left: 8px; right: 8px; justify-content: space-between; }
    .hub-editing .hub-box { padding-bottom: 56px; }
    .hub-grip { display: none; }
    .hub-tools button { padding: 0 6px; font-size: 12px; }
    .hub-q-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
    .hub-q { font-size: 13px; padding: 8px 10px; gap: 8px; }
    .hub-q-ico { width: 30px; height: 30px; }
    .hub-ed-txt small { display: none; }
    .hub-ed-foot { flex-wrap: wrap; }
    .hub-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .hub-box { min-height: 0; padding: 16px 14px 14px; gap: 6px; }
    .hub-box .hub-ico { width: 40px; height: 40px; border-radius: 12px; }
    .hub-title { font-size: 15px; }
    .hub-desc { display: none; }
    .hub-stats { font-size: 11.5px; }
    .hub-stats small { display: none; }
    .hub-grid-sub { grid-template-columns: 1fr; }
}
