/* ============================================================
   UTP HUB — Ana Stil Dosyası
   ============================================================ */

:root {
  --primary:       #1a56db;
  --primary-dark:  #1341b0;
  --primary-light: #e8f0fe;
  --accent:        #f59e0b;
  --accent-light:  #fef3c7;
  --danger:        #ef4444;
  --danger-light:  #fee2e2;
  --success:       #22c55e;
  --success-light: #dcfce7;
  --warn:          #f97316;
  --warn-light:    #ffedd5;

  --bg:            #f1f5f9;
  --bg-card:       #ffffff;
  --bg-sidebar:    #0f172a;
  --bg-topbar:     #ffffff;

  --text-main:     #1e293b;
  --text-muted:    #64748b;
  --text-light:    #94a3b8;
  --text-inverse:  #f8fafc;

  --border:        #e2e8f0;
  --border-dark:   #cbd5e1;

  --sidebar-w:     250px;
  --topbar-h:      60px;
  --radius:        10px;
  --radius-sm:     6px;
  --radius-lg:     16px;
  --shadow:        0 1px 4px rgba(0,0,0,.08), 0 2px 12px rgba(0,0,0,.05);
  --shadow-md:     0 4px 20px rgba(0,0,0,.10);
  --shadow-lg:     0 8px 40px rgba(0,0,0,.14);

  --transition:    0.18s ease;
}

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

html { font-size: 15px; }

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text-main);
  line-height: 1.5;
  overflow-x: hidden;
}

a { text-decoration: none; color: inherit; cursor: pointer; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, textarea, select { font-family: inherit; }

svg {
  width: 18px; height: 18px;
  stroke: currentColor; fill: none;
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
  flex-shrink: 0;
}

/* ============================================================
   LOGIN
   ============================================================ */
.login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 60%, #1a56db 100%);
}

.login-box {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 48px 44px;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow-lg);
  text-align: center;
}

.login-logo {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 6px;
  margin-bottom: 20px;
}

.logo-mark {
  background: var(--primary);
  color: #fff;
  font-size: 28px;
  font-weight: 900;
  letter-spacing: -1px;
  padding: 8px 14px;
  border-radius: var(--radius);
}

.logo-sub {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-muted);
  letter-spacing: 2px;
  margin-bottom: 2px;
}

.login-box h2 {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.login-desc {
  color: var(--text-muted);
  font-size: 0.88rem;
  margin-bottom: 28px;
}

.form-group {
  text-align: left;
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: .4px;
}

.form-group input {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--border-dark);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  transition: border var(--transition);
  outline: none;
}

.form-group input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.login-error {
  background: var(--danger-light);
  color: var(--danger);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 0.87rem;
  margin-bottom: 14px;
  text-align: left;
}

.login-hint {
  margin-top: 18px;
  font-size: 0.78rem;
  color: var(--text-light);
}

/* ============================================================
   APP LAYOUT
   ============================================================ */
.app {
  display: flex;
  min-height: 100vh;
}

/* SIDEBAR */
.sidebar {
  width: var(--sidebar-w);
  height: 100vh;
  background: var(--bg-sidebar);
  color: var(--text-inverse);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0;
  z-index: 200;
  transition: transform var(--transition);
  overflow-y: auto;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 18px;
  border-bottom: 1px solid rgba(255,255,255,.07);
}

.brand-logo {
  background: var(--primary);
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  padding: 6px 9px;
  border-radius: var(--radius-sm);
  letter-spacing: .5px;
}

.brand-text { display: flex; flex-direction: column; }
.brand-name { font-size: 1rem; font-weight: 800; letter-spacing: 1px; line-height: 1.1; }
.brand-sub  { font-size: 0.68rem; color: #64748b; letter-spacing: .4px; }

.sidebar-nav {
  flex: 1;
  padding: 12px 0;
}

.nav-section-label {
  padding: 14px 18px 5px;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 1px;
  color: #475569;
  text-transform: uppercase;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  font-size: 0.88rem;
  color: #94a3b8;
  border-left: 3px solid transparent;
  transition: all var(--transition);
  position: relative;
}

.nav-item svg { width: 16px; height: 16px; }

.nav-item:hover {
  background: rgba(255,255,255,.05);
  color: #f8fafc;
}

.nav-item.active {
  background: rgba(26,86,219,.18);
  color: #fff;
  border-left-color: var(--primary);
}

.nav-badge {
  margin-left: auto;
  background: var(--primary);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 99px;
}

.nav-lock { margin-left: auto; font-size: 0.8rem; }
.nav-item-restricted { opacity: 0.7; }

.sidebar-footer {
  padding: 14px 18px;
  border-top: 1px solid rgba(255,255,255,.07);
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-avatar {
  width: 34px; height: 34px;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.85rem;
  flex-shrink: 0;
}

.user-meta { flex: 1; min-width: 0; }
.user-name { display: block; font-size: 0.85rem; font-weight: 600; color: #f1f5f9; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-role { display: block; font-size: 0.7rem; color: #64748b; }

.btn-logout {
  color: #64748b;
  padding: 4px;
  border-radius: var(--radius-sm);
  transition: color var(--transition);
}
.btn-logout:hover { color: var(--danger); }
.btn-logout svg { width: 16px; height: 16px; }

/* MAIN CONTENT */
.main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* TOPBAR */
.topbar {
  height: var(--topbar-h);
  background: var(--bg-topbar);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 24px;
  position: sticky;
  top: 0; z-index: 100;
  box-shadow: 0 1px 0 var(--border);
}

.topbar-toggle {
  display: none;
  color: var(--text-muted);
  padding: 4px;
}
.topbar-toggle svg { width: 20px; height: 20px; }

.topbar-search {
  flex: 1;
  max-width: 500px;
  position: relative;
  display: flex;
  align-items: center;
}

.topbar-search svg {
  position: absolute;
  left: 12px;
  color: var(--text-light);
  width: 16px; height: 16px;
}

.topbar-search input {
  width: 100%;
  padding: 9px 14px 9px 38px;
  border: 1.5px solid var(--border);
  border-radius: 99px;
  font-size: 0.88rem;
  background: var(--bg);
  outline: none;
  transition: border var(--transition), box-shadow var(--transition);
}

.topbar-search input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
  background: #fff;
}

.search-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0; right: 0;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
  max-height: 400px;
  overflow-y: auto;
  z-index: 300;
}

.search-result-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  cursor: pointer;
  transition: background var(--transition);
  border-bottom: 1px solid var(--border);
}
.search-result-item:last-child { border-bottom: none; }
.search-result-item:hover { background: var(--bg); }

.search-result-icon {
  width: 34px; height: 34px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.7rem; font-weight: 700;
  flex-shrink: 0;
}

.search-result-info { flex: 1; min-width: 0; }
.search-result-name { font-size: 0.88rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-result-meta { font-size: 0.75rem; color: var(--text-muted); }

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.topbar-btn {
  padding: 7px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  transition: background var(--transition), color var(--transition);
}
.topbar-btn:hover { background: var(--bg); color: var(--primary); }

.topbar-notif {
  position: relative;
  padding: 7px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  cursor: pointer;
  transition: background var(--transition);
}
.topbar-notif:hover { background: var(--bg); color: var(--primary); }

.notif-dot {
  position: absolute;
  top: 6px; right: 6px;
  width: 8px; height: 8px;
  background: var(--danger);
  border-radius: 50%;
  border: 2px solid #fff;
}

.notif-panel {
  position: absolute;
  top: calc(var(--topbar-h) + 4px);
  right: 16px;
  width: 340px;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  z-index: 400;
}

.notif-header {
  padding: 14px 16px;
  font-weight: 700;
  font-size: 0.88rem;
  border-bottom: 1px solid var(--border);
}

.notif-item {
  display: flex;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 0.82rem;
  cursor: pointer;
  transition: background var(--transition);
}
.notif-item:hover { background: var(--bg); }
.notif-item:last-child { border-bottom: none; }

.notif-icon {
  width: 32px; height: 32px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.notif-body { flex: 1; }
.notif-title { font-weight: 600; margin-bottom: 2px; }
.notif-time { color: var(--text-muted); font-size: 0.75rem; }

/* PAGE CONTENT */
.page-content {
  flex: 1;
  padding: 28px 28px;
  max-width: 1400px;
  width: 100%;
}

/* UTILITIES */
.hidden { display: none !important; }

.search-overlay {
  position: fixed;
  inset: 0;
  z-index: 250;
}

/* SCROLLBAR */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-dark); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-light); }

/* RESPONSIVE */
@media (max-width: 900px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .main-content {
    margin-left: 0;
  }
  .topbar-toggle { display: flex; }
  .page-content { padding: 16px; }
}
