/*
 * Panel teması: Berry (codedthemes, MIT) tasarım dili — beyaz yan menü ve üst bar, açık gri-mavi içerik alanı,
 * mor (secondary) seçili menü, mavi (primary) butonlar, Roboto. app.css'ten sonra yüklenir; yalnızca panel sayfalarında.
 * Kaldırmak için view.php'deki berry.css bağlantısını silmek yeterli.
 */
@font-face { font-family: "Roboto"; font-style: normal; font-display: swap; font-weight: 400; src: url(fonts/roboto-latin-ext-400-normal.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Roboto"; font-style: normal; font-display: swap; font-weight: 400; src: url(fonts/roboto-latin-400-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Roboto"; font-style: normal; font-display: swap; font-weight: 500; src: url(fonts/roboto-latin-ext-500-normal.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Roboto"; font-style: normal; font-display: swap; font-weight: 500; src: url(fonts/roboto-latin-500-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Roboto"; font-style: normal; font-display: swap; font-weight: 700; src: url(fonts/roboto-latin-ext-700-normal.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Roboto"; font-style: normal; font-display: swap; font-weight: 700; src: url(fonts/roboto-latin-700-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --brand: #fc6900;          /* ana renk: logo turuncusu (Berry mavisi yerine) */
  --brand-dark: #e05d00;
  --brand-soft: #fff1e6;
  --accent: #fc6900;         /* vurgu: logo turuncusu (Berry'nin moru yerine) */
  --accent-dark: #e05d00;
  --accent-soft: #fff1e6;
  --bg: #eef2f6;
  --card: #fff;
  --line: #e3e8ef;
  --text: #364152;
  --heading: #121926;
  --muted: #697586;
  --green: #00a344;
  --green-soft: #e0f7e9;
  --red: #e53935;
  --red-dark: #c62828;
  --red-soft: #fde8e7;
  --amber: #b26a00;
  --amber-soft: #fff4d6;
  --blue: #1e88e5;
  --blue-soft: #e3f2fd;
  --gray-soft: #eef2f6;
  --radius: 8px;
  --shadow: none;
  --font: "Roboto", "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
}
body { font-family: var(--font); color: var(--text); }
h1, h2, h3 { color: var(--heading); letter-spacing: 0; }
h1 { font-size: 20px; font-weight: 500; }
h2 { font-size: 16px; font-weight: 500; }
h3 { font-size: 15px; font-weight: 500; }
::selection { background: var(--accent-soft); }

/* ---------- Yerleşim ---------- */
body.panel { background: #fff; }
.side { width: 260px; background: #fff; color: #616161; border-right: 0; }
.side-logo { height: 80px; display: flex; align-items: center; padding: 16px 24px; }
.side-logo img { max-width: 172px; }
.side-nav { padding: 6px 16px 16px; scrollbar-color: #d7dce4 transparent; }
.side-link, .side-mod > summary { padding: 11px 16px; margin: 2px 0; border-radius: 8px; font-size: 14px; font-weight: 400; color: #616161; gap: 14px; }
.side-link .ico, .side-mod > summary .ico { opacity: 1; color: #616161; }
.side-link:hover, .side-mod > summary:hover { background: var(--accent-soft); color: var(--accent); }
.side-link:hover .ico, .side-mod > summary:hover .ico { color: var(--accent); }
.side-link.active, .side-mod.active > summary { background: var(--accent-soft); color: var(--accent); font-weight: 500; }
.side-link.active .ico, .side-mod.active > summary .ico { color: var(--accent); }
.side-chev { opacity: .7; }
/* Alt menü: Berry'deki dikey çizgi + nokta */
.side-sub { margin: 2px 0 8px 26px; padding-left: 0; border-left: 1px solid #dee2e6; }
.side-group-title { font-size: 11px; font-weight: 500; letter-spacing: .04em; color: #9aa4b2; padding: 12px 0 4px 22px; }
.side-item { position: relative; padding: 9px 12px 9px 24px; border-radius: 8px; font-size: 13.5px; color: #616161; line-height: 1.35; }
.side-item::before { content: ""; position: absolute; left: 10px; top: 50%; width: 5px; height: 5px; margin-top: -2.5px; border-radius: 50%; background: #dee2e6; }
.side-item:hover { background: transparent; color: var(--accent); }
.side-item:hover::before, .side-item.active::before { background: var(--accent); }
.side-item.active { background: transparent; color: var(--accent); font-weight: 500; }
.side-badge { background: var(--accent); color: #fff; font-weight: 500; border-radius: 10px; padding: 1px 7px; }
/* Menüde logo turuncusu: seçili / üzerine gelinen modül, grup başlıkları ve seçili sayfa turuncu (ayraç çizgisi yok) */
.side { --turuncu: #fc6900; --turuncu-soft: #fff1e6; }
.side-link.active, .side-mod.active > summary { background: var(--turuncu-soft); color: var(--turuncu); border-radius: 8px; }
.side-link.active .ico, .side-mod.active > summary .ico { color: var(--turuncu); }
.side-link:hover, .side-mod > summary:hover { background: var(--turuncu-soft); color: var(--turuncu); }
.side-link:hover .ico, .side-mod > summary:hover .ico { color: var(--turuncu); }
.side-group-title { color: var(--turuncu); opacity: .85; }
.side-sub { border-left-color: #ffd2b0; }
.side-item:hover, .side-item.active { color: var(--turuncu); }
.side-item:hover::before, .side-item.active::before { background: var(--turuncu); }
.side-badge { background: var(--turuncu); }
.side-user { border-top: 1px solid var(--line); margin: 0 16px; padding: 14px 4px; }
.side-who b { color: var(--heading); font-weight: 500; }
.side-who small { color: var(--muted); }
/* Yönetici avatarı: Berry şablonunun kendi profil fotoğrafı, yuvarlak */
.avatar-admin { border-radius: 50%; overflow: hidden; }
.avatar-admin img, .side-user .avatar-admin img { object-fit: cover; filter: none; border-radius: 50%; }
.avatar { background: var(--accent-soft); color: var(--accent); font-weight: 700; letter-spacing: .02em; }
.avatar.avatar-foto { background: #ff9a3c; padding: 0; overflow: hidden; flex: none; box-shadow: 0 0 0 2px #fff, 0 2px 6px rgba(252,105,0,.25); }
.avatar-foto img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 50%; }

.main { background: #fff; }
.topbar { min-height: 80px; padding: 12px 20px 12px 8px; border-bottom: 0; background: #fff; gap: 14px; }
.icon-btn { width: 34px; height: 34px; border: 0; border-radius: 8px; background: var(--accent-soft); color: var(--accent); transition: background .2s, color .2s; }
.icon-btn:hover { background: var(--accent); color: #fff; }
.search { height: 44px; width: 320px; border: 1px solid var(--line); border-radius: 8px; padding: 0 12px; background: #fff; }
.search:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(252,105,0,.15); }
.search input, .search input:focus { border: 0; box-shadow: none; min-height: 0; padding: 0; background: transparent; }
.search kbd { border-color: var(--line); background: var(--bg); color: var(--muted); }
.search-results { top: 50px; border-color: var(--line); border-radius: 8px; box-shadow: 0 8px 24px rgba(18,25,38,.12); }
.search-results a:hover, .search-results a.sel { background: var(--accent-soft); color: var(--accent); }
.period select { height: 40px; border-radius: 8px; }
.topbar-user .who strong { font-weight: 500; color: var(--heading); }
.topbar-user .btn-ghost { background: #fff1e6; color: #e05d00; border-color: transparent; }
.topbar-user .btn-ghost:hover { background: #fc6900; color: #fff; }

/* İçerik: Berry'nin yuvarlak köşeli gri alanı */
.content { background: var(--bg); border-radius: 8px; margin: 0 20px 0 0; padding: 20px; }
.footer { background: #fff; border-top: 0; margin-right: 20px; padding: 16px 4px; color: var(--muted); }
.crumb { font-size: 13px; color: var(--muted); margin-bottom: 14px; }
.crumb-mod { color: var(--accent); font-weight: 500; }
.page-head { background: #fff; border-radius: 8px; padding: 16px 24px; margin: 0 0 20px; align-items: center; }
.page-head p { color: var(--muted); }
.section-title { margin: 28px 0 12px; }
.section-title h2 { font-weight: 500; }

/* ---------- Bileşenler ---------- */
.card, .stat, .tile, .table-wrap, .canli-kanal, .canli-ana, .cal-day { border-color: transparent; box-shadow: none; }
.card { border: 0; border-radius: 8px; padding: 20px 24px; }
.card-head { margin-bottom: 16px; }
.card-head h3 { font-weight: 500; }
details.card summary { font-weight: 500; }
.grid { gap: 20px; }

.stat { border: 0; border-radius: 8px; padding: 18px 20px; }
.stat-label { font-weight: 500; color: var(--muted); }
.stat-value { font-weight: 500; font-size: 24px; color: var(--heading); letter-spacing: 0; }
/* Berry panosundaki renkli kartlar: satırın vurgulu kartı mor, koyu kart mavi; köşede dekoratif daireler */
.stat.accent, .stat.hero { position: relative; overflow: hidden; border: 0; color: #fff; }
.stat.accent { background: linear-gradient(120deg, #fc6900 0%, #ff8a2b 100%); }
.stat.hero { background: linear-gradient(120deg, #e65100 0%, #fc6900 100%); }
.stat.accent::before, .stat.accent::after, .stat.hero::before, .stat.hero::after { content: ""; position: absolute; width: 210px; height: 210px; border-radius: 50%; pointer-events: none; }
.stat.accent::after { background: #e05d00; opacity: .55; top: -85px; right: -95px; }
.stat.accent::before { background: #e05d00; opacity: .3; top: -125px; right: -15px; }
.stat.hero::after { background: #bf4300; opacity: .55; top: -85px; right: -95px; }
.stat.hero::before { background: #bf4300; opacity: .3; top: -125px; right: -15px; }
.stat.accent > *, .stat.hero > * { position: relative; z-index: 1; }
.stat.accent .stat-label, .stat.accent .stat-sub, .stat.hero .stat-label, .stat.hero .stat-sub { color: rgba(255,255,255,.78); }
.stat.accent .stat-value, .stat.hero .stat-value { color: #fff; }
.stat.accent .chg, .stat.hero .chg { color: #fff; }
/* Turuncu kartta kırmızı/yeşil değişim yazıları okunmaz: beyaz ve kalın */
.stat.accent .stat-sub *, .stat.hero .stat-sub * { color: #fff !important; font-weight: 600; }

.badge { font-weight: 500; border-radius: 6px; padding: 3px 8px; }
.badge-green { background: var(--green-soft); color: var(--green); }
.badge-red { background: var(--red-soft); color: var(--red-dark); }
.badge-amber { background: var(--amber-soft); color: var(--amber); }
.badge-blue { background: var(--blue-soft); color: var(--blue); }
.badge-gray { background: var(--gray-soft); color: var(--muted); }
.badge-purple { background: var(--accent-soft); color: var(--accent); }
.badge-dark { background: var(--heading); }

.alert { border-radius: 8px; border-width: 0; }
.alert-success { background: #e0f7e9; color: #00692c; }
.alert-error { background: #fde8e7; color: #b71c1c; }
.alert-warning { background: #fff4d6; color: #7a4a00; }
.alert-info { background: #e3f2fd; color: #0d47a1; }

.btn { height: 38px; padding: 0 16px; border-radius: 8px; border-color: var(--brand); background: var(--brand); font-weight: 500; transition: background .2s, border-color .2s, color .2s; }
.btn:hover { background: var(--brand-dark); border-color: var(--brand-dark); }
.btn-ghost { background: #fff; color: var(--text); border-color: var(--line); }
.btn-ghost:hover { background: var(--brand-soft); border-color: #ffd2b0; color: var(--brand-dark); }
.btn-dark { background: var(--accent); border-color: var(--accent); }
.btn-dark:hover { background: var(--accent-dark); border-color: var(--accent-dark); }
.btn-green { background: #00c853; border-color: #00c853; }
.btn-sm { height: 32px; border-radius: 6px; }
.btn-xs { height: 26px; border-radius: 6px; }
.btn-link { color: var(--brand); font-weight: 500; }

input[type=text], input[type=search], input[type=number], input[type=date], input[type=time], input[type=month], input[type=email], input[type=tel], input[type=password], input[type=url], input[type=datetime-local], select, textarea {
  border-color: #cdd5df; border-radius: 8px; min-height: 40px; padding: 8px 12px; color: var(--heading);
}
input:focus, select:focus, textarea:focus { outline: 0; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(252,105,0,.15); }
label { font-weight: 500; color: var(--text); font-size: 13px; }
.req { color: var(--red); }
.check input, .checklist-cell input { accent-color: var(--accent); }

/* Sekmeler: Berry alt çizgili sekme */
.tabs { gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.tab { border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: transparent; padding: 10px 14px; font-size: 13.5px; font-weight: 500; color: var(--muted); margin-bottom: -1px; }
.tab:hover { color: var(--accent); }
.tab.active { background: transparent; color: var(--accent); border-color: var(--accent); }

.table-wrap { border: 0; border-radius: 8px; }
table.t th { background: #f8fafc; color: var(--muted); font-weight: 500; font-size: 11.5px; letter-spacing: .03em; padding: 12px 14px; border-bottom-color: var(--line); }
table.t td { padding: 11px 14px; border-bottom-color: #eef2f6; }
table.t tr:hover td { background: #f8fafc; }
table.t tfoot td, .total-row td { background: #f8fafc; font-weight: 500; }
table.t .strong { font-weight: 500; color: var(--heading); }
.pager a { border-color: var(--line); border-radius: 6px; }
.pager a.active { background: var(--accent); border-color: var(--accent); }

.tile { border: 0; border-radius: 8px; padding: 20px; }
.tile:hover { border-color: transparent; transform: translateY(-2px); box-shadow: 0 4px 18px rgba(18,25,38,.08); }
.tile .ico { color: var(--accent); }
.tile h3 { font-weight: 500; }
.progress, .ck-bar { background: #e3e8ef; }
.empty-code { color: var(--accent); }
.cal-day.today { border-color: var(--accent); }
.cal-ev { background: var(--accent-soft); color: var(--accent); }
.menu-item.active { background: var(--accent-soft); color: var(--accent); }
.menu-item.active .menu-letter, .menu-badge { background: var(--accent); }
.anahtar.acik { background: var(--accent); }

/* ---------- Ana sayfa ---------- */
.home-hos { position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  background: #f8fafc; color: var(--heading); border: 1px solid #e3e8ef; border-radius: 10px; padding: 24px 32px; margin-bottom: 20px; box-shadow: 0 1px 2px rgba(18,25,38,.04); }
/* Sağda yumuşak dekor: açık gri-mavi büyük daire + köşede turuncu dilim */
.home-hos::before, .home-hos::after { content: ""; position: absolute; border-radius: 50%; pointer-events: none; }
.home-hos::before { width: 520px; height: 520px; right: -60px; top: -160px; background: radial-gradient(circle at 30% 70%, #edf1f6 0%, #e6ebf2 60%, rgba(230,235,242,0) 61%); }
.home-hos::after { width: 260px; height: 260px; right: -110px; top: -120px; background: #fde3cc; }
.home-hos > * { position: relative; z-index: 1; }
.home-hos small { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 14px; }
.home-hos small::before { content: ""; width: 4px; height: 18px; border-radius: 2px; background: #fc6900; }
.home-hos h1 { color: var(--heading); font-size: 30px; font-weight: 700; letter-spacing: -.01em; margin: 6px 0 6px; }
.home-hos p { margin: 0; color: var(--muted); font-size: 15px; }
.home-hos-link { display: flex; gap: 12px; }
.home-hos .btn { height: 42px; padding: 0 18px; background: #fff; border: 1px solid #edf0f4; color: var(--heading); font-weight: 600; box-shadow: 0 4px 12px rgba(18,25,38,.08); }
.home-hos .btn .ico { color: #fc6900; }
.home-hos .btn:hover { background: #fff; border-color: #ffd2b0; color: var(--heading); box-shadow: 0 6px 16px rgba(252,105,0,.14); }
.content .home-canli { max-width: none; margin: 0 0 4px; padding: 0; }
.content .hc-panel { box-shadow: none; border-radius: 8px; }
.content .hc-bas h2, .content .hc-kpi strong { font-weight: 500; }
.content .mod-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; max-width: none; margin: 0; padding: 0; }
.content .mod-card { background: #fff; border: 0; color: var(--text); padding: 20px; border-radius: 8px; }
.content .mod-card:hover { background: #fff; border-color: transparent; transform: translateY(-2px); box-shadow: 0 4px 18px rgba(18,25,38,.08); }
.content .mod-ico { background: color-mix(in srgb, var(--mc) 16%, #fff); color: color-mix(in srgb, var(--mc) 62%, #000); border: 0; border-radius: 8px; }
.content .mod-card:hover .mod-ico { background: color-mix(in srgb, var(--mc) 26%, #fff); }
.content .mod-card h2 { font-size: 15px; font-weight: 500; color: var(--heading); }
.content .mod-card p { color: var(--muted); opacity: 1; }
.content .mod-badge { background: var(--accent); color: #fff; font-weight: 500; }
@media (max-width: 1100px) { .content .mod-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .content .mod-grid { grid-template-columns: 1fr; } .home-hos h1 { font-size: 21px; } }

/* ---------- Giriş (Berry auth v3) ---------- */
body.ber-auth { min-height: 100vh; margin: 0; display: grid; place-items: center; padding: 24px; background: #d3eafd; }
.ber-auth-kart { width: 100%; max-width: 475px; background: #fff; border-radius: 12px; padding: 40px 36px 28px; text-align: center; }
.ber-auth-logo { display: block; width: 210px; max-width: 80%; height: auto; margin: 0 auto 34px; }
.ber-auth-kart h1 { color: #fc6900; font-size: 24px; font-weight: 700; }
.ber-auth-kart > p { color: var(--muted); font-size: 16px; margin: 8px 0 26px; }
.ber-auth-kart form { text-align: left; }
.ber-auth-kart .alert { text-align: left; }
.ber-float { position: relative; margin-bottom: 16px; }
.ber-float input { height: 58px; padding: 24px 14px 8px; font-size: 15px; background: #f8fafc; border-color: #cdd5df; }
.ber-float input:focus { background: #fff; }
.ber-float label { position: absolute; left: 15px; top: 19px; margin: 0; font-size: 15px; font-weight: 400; color: var(--muted); pointer-events: none; transition: top .15s, font-size .15s, color .15s; }
.ber-float input:focus + label, .ber-float input:not(:placeholder-shown) + label { top: 8px; font-size: 12px; color: var(--brand); }
.ber-float input:not(:focus):not(:placeholder-shown) + label { color: var(--muted); }
.ber-auth-kart .btn { width: 100%; height: 46px; justify-content: center; margin-top: 10px; font-size: 15px; background: #fc6900; border-color: #fc6900; }
.ber-auth-kart .btn:hover { background: #e05d00; border-color: #e05d00; }
.ber-float input:focus { border-color: #fc6900; box-shadow: 0 0 0 3px rgba(252,105,0,.15); }
.ber-float input:focus + label { color: #fc6900; }
.ber-auth-kart hr { border: 0; border-top: 1px solid var(--line); margin: 26px 0 16px; }
.ber-auth-alt { font-size: 13px; color: var(--muted); }

@media (max-width: 900px) {
  .side { box-shadow: 0 0 40px rgba(18,25,38,.2); }
  .topbar { min-height: 64px; padding: 10px 14px; }
  .search { width: 100%; }
  .content { margin: 0 10px; padding: 14px; }
  .footer { margin: 0 10px; }
}
@media print {
  .content { background: #fff; margin: 0; }
}
