/* ============================================================================
   Şirket Katalog ve Ekip İletişim Uygulaması — ana stil dosyası
   Açık/koyu tema, mobil uyumlu, kurumsal görünüm.
   ========================================================================== */

:root {
  --primary: #1d4ed8;
  --primary-dark: #1e40af;
  --accent: #0f766e;
  --bg: #f4f5f7;
  --surface: #ffffff;
  --surface-2: #f8f9fb;
  --border: #dfe3e8;
  --text: #1b1f24;
  --text-muted: #5b6672;
  --danger: #b3261e;
  --danger-bg: #fdecea;
  --success: #146c43;
  --success-bg: #e8f5ee;
  --warning: #8a6100;
  --warning-bg: #fff6e0;
  --info-bg: #eaf1fd;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 8px 24px rgba(16, 24, 40, .06);
  --sidebar-width: 264px;
  --rightbar-width: 300px;
}

[data-theme="dark"] {
  --bg: #12151a;
  --surface: #1a1f26;
  --surface-2: #21272f;
  --border: #2e3742;
  --text: #e8ecf1;
  --text-muted: #a3adb9;
  --danger-bg: #3a1d1b;
  --success-bg: #16301f;
  --warning-bg: #34280d;
  --info-bg: #18222f;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .35);
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .4rem; }
h1 { font-size: 1.5rem; }
h2 { font-size: 1.05rem; }
h3 { font-size: .95rem; }
p { margin: 0 0 .6rem; }
small { font-size: .82rem; }
code, .mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .85em; }
.wrap { word-break: break-all; }
.muted { color: var(--text-muted); }
.small { font-size: .82rem; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: -9999px; top: 0; background: var(--primary); color: #fff; padding: .6rem 1rem; z-index: 100; }
.skip-link:focus { left: 0; }

/* ---------------- Üst çubuk ---------------- */
.topbar {
  display: flex; align-items: center; gap: 1rem;
  padding: .6rem 1rem;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 40;
}
.brand { display: flex; align-items: center; gap: .6rem; color: inherit; text-decoration: none; min-width: 0; }
.brand:hover { text-decoration: none; }
.brand-logo { height: 36px; max-width: 160px; object-fit: contain; }
.brand-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 10px;
  background: var(--primary); color: #fff; font-weight: 700;
}
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-text strong { font-size: .98rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-text small { color: var(--text-muted); font-size: .75rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-search { display: flex; gap: .4rem; flex: 1; max-width: 520px; margin-left: auto; }
.topbar-search input { flex: 1; }
.topbar-actions { display: flex; align-items: center; gap: .4rem; margin-left: auto; }
.icon-button {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  background: transparent; border: 1px solid transparent; border-radius: var(--radius-sm);
  color: var(--text); width: 38px; height: 38px; cursor: pointer; font-size: 1rem;
}
.icon-button:hover, .icon-button.active { background: var(--surface-2); border-color: var(--border); }
.hamburger, .hamburger::before, .hamburger::after {
  content: ""; display: block; width: 18px; height: 2px; background: var(--text); position: relative;
}
.hamburger::before { position: absolute; top: -6px; }
.hamburger::after { position: absolute; top: 6px; }

.badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px;
  background: var(--danger); color: #fff; font-size: .72rem; font-weight: 600;
}
.notification-button .badge { position: absolute; top: 2px; right: 2px; }
.user-menu { position: relative; }
.user-button {
  display: flex; align-items: center; gap: .5rem; background: transparent;
  border: 1px solid transparent; border-radius: 999px; padding: .25rem .6rem .25rem .25rem;
  color: inherit; cursor: pointer;
}
.user-button:hover { background: var(--surface-2); border-color: var(--border); }
.avatar { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; }
.avatar-initials { display: inline-flex; align-items: center; justify-content: center; background: var(--accent); color: #fff; font-size: .78rem; font-weight: 600; }
.user-name { font-size: .88rem; max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-dropdown {
  position: absolute; right: 0; top: calc(100% + .4rem); min-width: 240px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: .5rem; z-index: 60;
}
.user-dropdown a, .user-dropdown .link-button { display: block; width: 100%; text-align: left; padding: .5rem .6rem; border-radius: var(--radius-sm); color: var(--text); }
.user-dropdown a:hover, .user-dropdown .link-button:hover { background: var(--surface-2); text-decoration: none; }
.user-dropdown-header { padding: .4rem .6rem .6rem; border-bottom: 1px solid var(--border); margin-bottom: .4rem; display: flex; flex-direction: column; }

/* ---------------- Yerleşim ---------------- */
.layout { display: grid; grid-template-columns: var(--sidebar-width) minmax(0, 1fr) var(--rightbar-width); align-items: start; gap: 1rem; padding: 1rem; }
.sidebar, .rightbar { position: sticky; top: 66px; max-height: calc(100vh - 80px); overflow-y: auto; }
.sidebar { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: .6rem; }
.sidebar-nav { display: flex; flex-direction: column; gap: .1rem; }
.nav-item {
  display: flex; align-items: center; gap: .55rem; padding: .5rem .6rem; border-radius: var(--radius-sm);
  color: var(--text); font-size: .9rem;
}
.nav-item:hover { background: var(--surface-2); text-decoration: none; }
.nav-item.active { background: var(--primary); color: #fff; }
.nav-item.active .badge { background: #fff; color: var(--primary); }
.nav-icon { width: 1.2rem; text-align: center; }
.sidebar-section { margin-top: .9rem; border-top: 1px solid var(--border); padding-top: .6rem; }
.sidebar-title { font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); margin: 0 0 .4rem .4rem; }
.room-list, .admin-links { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .1rem; }
.room-link { display: flex; align-items: center; justify-content: space-between; gap: .4rem; padding: .4rem .6rem; border-radius: var(--radius-sm); color: var(--text); font-size: .86rem; }
.room-link:hover, .room-link.active { background: var(--surface-2); text-decoration: none; }
.room-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rightbar .card { margin-bottom: 1rem; }
.content { min-width: 0; }

/* ---------------- Kartlar ve ızgara ---------------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; margin-bottom: 1rem; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: .6rem; margin-bottom: .6rem; }
.card-title { margin: 0; }
.card-subtitle { margin: .9rem 0 .4rem; font-size: .85rem; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); }
.card-link { font-size: .84rem; }
.grid { display: grid; gap: 1rem; }
.two-col { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.stats-grid { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin-bottom: 1rem; }
.stat-card {
  display: flex; flex-direction: column; gap: .2rem; padding: .9rem 1rem;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  color: inherit; text-decoration: none;
}
a.stat-card:hover { border-color: var(--primary); text-decoration: none; }
.stat-card.is-attention { border-color: var(--danger); }
.stat-value { font-size: 1.4rem; font-weight: 700; }
.stat-label { font-size: .8rem; color: var(--text-muted); }
.page-head { display: flex; flex-wrap: wrap; gap: 1rem; align-items: flex-start; justify-content: space-between; margin-bottom: 1rem; }
.page-head-actions { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.breadcrumbs { display: flex; flex-wrap: wrap; gap: .35rem; font-size: .83rem; color: var(--text-muted); margin-bottom: .3rem; }

/* ---------------- Form öğeleri ---------------- */
.stack { display: flex; flex-direction: column; gap: .7rem; }
.inline-stack { display: flex; flex-wrap: wrap; gap: .7rem; align-items: flex-end; }
.inline-form { display: inline-flex; gap: .3rem; align-items: center; }
.field { display: flex; flex-direction: column; gap: .25rem; min-width: 0; }
.field label { font-size: .85rem; font-weight: 600; }
.field-help { color: var(--text-muted); font-size: .78rem; }
input[type="text"], input[type="email"], input[type="password"], input[type="search"], input[type="tel"],
input[type="number"], input[type="date"], input[type="datetime-local"], input[type="file"], select, textarea {
  width: 100%; padding: .5rem .6rem; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text); font: inherit;
}
textarea { resize: vertical; min-height: 3rem; }
input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible, a:focus-visible {
  outline: 2px solid var(--primary); outline-offset: 1px;
}
input[type="color"] { width: 60px; height: 34px; padding: 0; }
.input-with-toggle { display: flex; gap: .4rem; align-items: center; }
.checkbox { display: flex; align-items: center; gap: .4rem; font-size: .88rem; font-weight: 400; }
.checkbox input { width: auto; }
.checkbox-row, .checkbox-grid { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: .6rem; display: flex; flex-wrap: wrap; gap: .8rem; margin: 0; }
.checkbox-grid { flex-direction: column; align-items: flex-start; }
.checkbox-row legend { font-size: .82rem; color: var(--text-muted); padding: 0 .3rem; }
.permission-groups { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: .6rem; margin: 0; }
.permission-group { margin-bottom: .6rem; }
.permission-group h3 { font-size: .8rem; text-transform: uppercase; color: var(--text-muted); margin-bottom: .3rem; }

/* ---------------- Düğmeler ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .35rem;
  padding: .45rem .8rem; border-radius: var(--radius-sm); border: 1px solid var(--border);
  background: var(--surface); color: var(--text); font: inherit; font-size: .88rem; cursor: pointer; text-decoration: none;
}
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-danger { background: var(--danger-bg); border-color: var(--danger); color: var(--danger); }
.btn-disabled { opacity: .55; cursor: not-allowed; }
.btn-small { padding: .25rem .55rem; font-size: .8rem; }
.btn-block { width: 100%; }
.btn-ghost { background: transparent; }
.link-button { background: none; border: 0; color: var(--primary); cursor: pointer; font: inherit; font-size: .82rem; padding: 0; }
.link-button.danger { color: var(--danger); }
.view-switch { display: inline-flex; gap: .2rem; }

/* ---------------- Uyarılar ---------------- */
.flash-stack { display: flex; flex-direction: column; gap: .4rem; margin-bottom: .8rem; }
.alert { padding: .6rem .8rem; border-radius: var(--radius-sm); border: 1px solid var(--border); font-size: .88rem; }
.alert-success { background: var(--success-bg); border-color: var(--success); color: var(--success); }
.alert-error { background: var(--danger-bg); border-color: var(--danger); color: var(--danger); }
.alert-warning { background: var(--warning-bg); border-color: var(--warning); color: var(--warning); }
.alert-info { background: var(--info-bg); border-color: var(--primary); color: var(--text); }
.translation-notice { background: var(--warning-bg); color: var(--warning); padding: .5rem 1rem; font-size: .85rem; border-bottom: 1px solid var(--border); }
.empty-state { color: var(--text-muted); font-size: .9rem; padding: .6rem 0; }

/* ---------------- Listeler ve tablolar ---------------- */
.simple-list, .kv-list, .quick-links, .mini-list, .announcement-list, .notification-list, .member-list, .user-presence, .room-cards, .check-list, .permission-list, .limit-list, .tag-row {
  list-style: none; margin: 0; padding: 0;
}
.simple-list li { padding: .5rem 0; border-bottom: 1px solid var(--border); display: flex; flex-direction: column; gap: .1rem; }
.simple-list li:last-child { border-bottom: 0; }
.simple-list.compact li { padding: .35rem 0; }
.simple-list a { color: inherit; }
.kv-list li { display: flex; justify-content: space-between; gap: 1rem; padding: .35rem 0; border-bottom: 1px dotted var(--border); font-size: .88rem; }
.kv-list li span { color: var(--text-muted); }
.quick-links li, .mini-list li { padding: .3rem 0; font-size: .87rem; }
.tag-row { display: flex; flex-wrap: wrap; gap: .3rem; margin: .3rem 0; }
.tag { display: inline-block; padding: .1rem .45rem; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); font-size: .74rem; color: var(--text-muted); }
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: .87rem; }
.data-table th, .data-table td { text-align: left; padding: .5rem .55rem; border-bottom: 1px solid var(--border); vertical-align: top; }
.data-table th { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); }
.row-actions { display: flex; flex-wrap: wrap; gap: .3rem; align-items: center; }
.row-disabled { opacity: .6; }
.row-system { background: var(--surface-2); }
.status-pill { display: inline-block; padding: .1rem .45rem; border-radius: 999px; font-size: .74rem; border: 1px solid var(--border); background: var(--surface-2); }
.status-published { border-color: var(--success); color: var(--success); background: var(--success-bg); }
.status-archived { border-color: var(--text-muted); color: var(--text-muted); }
.role-pill { display: inline-block; padding: .1rem .45rem; border-radius: 999px; font-size: .74rem; background: var(--surface-2); border: 1px solid var(--border); }
.role-admin { border-color: var(--primary); color: var(--primary); }
.permission-list li { display: flex; justify-content: space-between; padding: .3rem 0; border-bottom: 1px dotted var(--border); font-size: .86rem; }
.permission-list .ok { color: var(--success); }
.permission-list .no { color: var(--text-muted); }
.check-list li { display: flex; gap: .6rem; padding: .5rem 0; border-bottom: 1px solid var(--border); }
.check-list li div { display: flex; flex-direction: column; }
.check-mark { width: 22px; height: 22px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; color: #fff; background: var(--text-muted); flex: 0 0 auto; }
.check-list li.ok .check-mark { background: var(--success); }
.check-list li.warn .check-mark { background: var(--warning); }
.limit-list li, .announcement-list li { padding: .5rem 0; border-bottom: 1px solid var(--border); }
.limit-list li { font-size: .87rem; }
.announcement-item.unread { border-left: 3px solid var(--primary); padding-left: .6rem; }
.announcement-head { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; }
.notification-item { padding: .6rem; border-bottom: 1px solid var(--border); }
.notification-item.unread { background: var(--info-bg); border-radius: var(--radius-sm); }

/* ---------------- Katalog ---------------- */
.folder-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: .7rem; }
.folder-card { border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2); }
.folder-card.is-restricted { border-left: 3px solid var(--warning); }
.folder-link { display: flex; gap: .6rem; padding: .7rem; color: inherit; }
.folder-link:hover { text-decoration: none; background: var(--surface); border-radius: var(--radius-sm); }
.folder-icon { font-size: 1.3rem; }
.folder-info { display: flex; flex-direction: column; gap: .1rem; min-width: 0; }
.folder-info small { color: var(--text-muted); }
.file-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .8rem; }
.file-card { border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; background: var(--surface-2); display: flex; flex-direction: column; }
.file-thumb { display: block; background: var(--surface); text-align: center; }
.file-thumb img { width: 100%; height: 150px; object-fit: cover; display: block; }
.file-icon { display: flex; align-items: center; justify-content: center; height: 110px; font-weight: 700; color: var(--text-muted); letter-spacing: .05em; }
.icon-pdf { color: var(--danger); }
.file-body { padding: .6rem; display: flex; flex-direction: column; gap: .3rem; }
.file-name { font-size: .9rem; margin: 0; word-break: break-word; }
.file-name a { color: var(--text); }
.file-meta { font-size: .76rem; color: var(--text-muted); display: flex; flex-wrap: wrap; gap: .3rem; margin: 0; }
.file-actions { display: flex; flex-wrap: wrap; gap: .3rem; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .5rem; }
.gallery-item { position: relative; display: block; border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--border); }
.gallery-item img { width: 100%; height: 130px; object-fit: cover; display: block; }
.gallery-caption { display: block; padding: .3rem; font-size: .74rem; color: var(--text-muted); background: var(--surface); }
.upload-progress { display: flex; flex-direction: column; gap: .3rem; }
.progress { height: 8px; background: var(--surface-2); border-radius: 999px; overflow: hidden; border: 1px solid var(--border); }
.progress-bar { height: 100%; width: 0; background: var(--primary); transition: width .2s ease; }
.upload-results li { font-size: .84rem; padding: .2rem 0; }
.pdf-frame { width: 100%; height: 70vh; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2); }
.pdf-toolbar { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; margin-bottom: .5rem; }
.image-preview img { max-width: 100%; border-radius: var(--radius-sm); cursor: zoom-in; }
.lightbox { position: fixed; inset: 0; background: rgba(0, 0, 0, .85); display: flex; align-items: center; justify-content: center; z-index: 90; padding: 2rem; }
.lightbox img { max-width: 100%; max-height: 100%; }
.lightbox-close { position: absolute; top: 1rem; right: 1rem; background: transparent; border: 0; color: #fff; font-size: 2rem; cursor: pointer; }
.setting-logo { max-height: 60px; max-width: 100%; }
.profile-avatar { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; }

/* ---------------- Sohbet ---------------- */
.chat-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 1rem; align-items: start; }
.chat-panel { display: flex; flex-direction: column; gap: .6rem; }
.chat-messages { display: flex; flex-direction: column; gap: .5rem; max-height: 58vh; overflow-y: auto; padding-right: .3rem; }
.chat-message { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: .5rem .6rem; background: var(--surface-2); }
.chat-message.is-mine { border-color: var(--primary); background: var(--info-bg); }
.chat-message.is-pinned { border-left: 3px solid var(--accent); }
.chat-message.is-deleted { opacity: .7; }
.chat-meta { display: flex; align-items: center; gap: .4rem; font-size: .78rem; color: var(--text-muted); flex-wrap: wrap; }
.chat-body { margin: .25rem 0; word-wrap: break-word; overflow-wrap: anywhere; }
.chat-reply { margin: .2rem 0; padding: .3rem .5rem; border-left: 3px solid var(--border); background: var(--surface); border-radius: var(--radius-sm); display: flex; flex-direction: column; font-size: .82rem; }
.chat-system { text-align: center; font-size: .78rem; color: var(--text-muted); margin: .2rem 0; }
.chat-actions { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; }
.chat-attachments { list-style: none; margin: .3rem 0; padding: 0; display: flex; flex-direction: column; gap: .3rem; }
.attachment-image img { max-width: 220px; border-radius: var(--radius-sm); display: block; }
.attachment-link { font-size: .84rem; }
.reactions { display: flex; gap: .3rem; flex-wrap: wrap; margin-top: .3rem; }
.reaction { border: 1px solid var(--border); background: var(--surface); border-radius: 999px; padding: .05rem .45rem; font-size: .8rem; cursor: pointer; }
.reaction.mine { border-color: var(--primary); background: var(--info-bg); }
.chat-composer { border-top: 1px solid var(--border); padding-top: .6rem; }
.composer-row { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
.file-field { flex: 1 1 240px; }
.emoji-picker { display: flex; gap: .1rem; flex-wrap: wrap; }
.emoji-button { background: transparent; border: 1px solid transparent; border-radius: var(--radius-sm); cursor: pointer; font-size: 1rem; padding: .1rem .25rem; }
.emoji-button:hover { background: var(--surface-2); border-color: var(--border); }
.reply-preview { display: flex; align-items: center; gap: .5rem; background: var(--surface-2); padding: .3rem .5rem; border-radius: var(--radius-sm); }
.chat-scroll-actions { display: flex; gap: .4rem; align-items: center; }
.chat-side .card { margin-bottom: 1rem; }
.member-list li { display: flex; align-items: center; gap: .4rem; padding: .3rem 0; border-bottom: 1px dotted var(--border); flex-wrap: wrap; font-size: .86rem; }
.member-name { flex: 1; }
.presence-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--text-muted); display: inline-block; }
.presence-dot.online { background: var(--success); }
.room-card { display: flex; align-items: center; justify-content: space-between; gap: .6rem; padding: .5rem 0; border-bottom: 1px solid var(--border); }
.room-card a { display: flex; flex-direction: column; color: inherit; }
.room-card small { color: var(--text-muted); }
.user-picker { display: flex; flex-wrap: wrap; gap: .3rem; }
.user-presence li { display: flex; align-items: center; gap: .4rem; padding: .25rem 0; font-size: .86rem; flex-wrap: wrap; }
.chat-search-results { display: flex; flex-direction: column; gap: .3rem; }

/* ---------------- Giriş ekranı ---------------- */
.auth-body { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 1.5rem; background: linear-gradient(160deg, var(--bg) 0%, var(--surface-2) 100%); }
.auth-shell { width: 100%; max-width: 440px; }
.auth-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.5rem; }
.auth-header { text-align: center; margin-bottom: 1rem; display: flex; flex-direction: column; align-items: center; gap: .3rem; }
.auth-logo { max-height: 72px; max-width: 220px; object-fit: contain; }
.auth-logo-placeholder { display: inline-flex; align-items: center; justify-content: center; width: 64px; height: 64px; border-radius: 16px; background: var(--primary); color: #fff; font-size: 1.4rem; font-weight: 700; }
.auth-footer { margin-top: 1rem; border-top: 1px solid var(--border); padding-top: .8rem; }
.error-page { text-align: center; padding: 3rem 1rem; }
.error-code { font-size: 3rem; font-weight: 700; color: var(--primary); margin: 0; }
.error-actions { display: flex; gap: .5rem; justify-content: center; margin: 1rem 0; }

/* ---------------- Bildirim / toast ---------------- */
.toast-area { position: fixed; bottom: 1rem; right: 1rem; display: flex; flex-direction: column; gap: .4rem; z-index: 80; max-width: 320px; }
.toast { background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--primary); border-radius: var(--radius-sm); padding: .6rem .7rem; box-shadow: var(--shadow); font-size: .86rem; }
.toast.success { border-left-color: var(--success); }
.toast.error { border-left-color: var(--danger); }

/* ---------------- Mobil ---------------- */
@media (max-width: 1200px) {
  .layout { grid-template-columns: var(--sidebar-width) minmax(0, 1fr); }
  .rightbar { display: none; }
}
@media (max-width: 900px) {
  .topbar { flex-wrap: wrap; }
  .topbar-search { order: 3; max-width: none; width: 100%; }
  .layout { grid-template-columns: minmax(0, 1fr); padding: .6rem; }
  .sidebar {
    position: fixed; inset: 56px 20% 0 0; z-index: 50; border-radius: 0;
    transform: translateX(-105%); transition: transform .2s ease; max-height: none;
  }
  .sidebar.open { transform: translateX(0); }
  .chat-layout { grid-template-columns: minmax(0, 1fr); }
  .chat-messages { max-height: 60vh; }
  .user-name { display: none; }
  h1 { font-size: 1.25rem; }
}
@media (max-width: 600px) {
  .two-col, .stats-grid { grid-template-columns: 1fr; }
  .file-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .gallery { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
  .pdf-frame { height: 60vh; }
  .page-head { flex-direction: column; }
}
@media print {
  .topbar, .sidebar, .rightbar, .chat-composer, .page-head-actions { display: none; }
  .layout { display: block; }
}
