/* ═══════════════════════════════════════════════════════
   FORBB PERSONEL PORTALI — style.css
   Tasarım: Kurumsal · Koyu Tema · Rafine Minimal
═══════════════════════════════════════════════════════ */

/* ── TOKENS ─────────────────────────────────────────── */
:root {
  --bg-base:      #0d0f14;
  --bg-surface:   #13161e;
  --bg-elevated:  #1a1e2a;
  --bg-hover:     #1f2436;

  --border:       rgba(255,255,255,0.07);
  --border-focus: rgba(99,179,237,0.5);

  --accent:       #4f9cf9;
  --accent-hover: #70b0ff;
  --accent-glow:  rgba(79,156,249,0.18);

  --warning:      #f6c90e;
  --warning-bg:   rgba(246,201,14,0.09);
  --warning-border: rgba(246,201,14,0.25);

  --danger:       #fc5c7d;
  --danger-bg:    rgba(252,92,125,0.09);

  --success:      #56cfb2;

  --text-primary:   #eef0f6;
  --text-secondary: #8892aa;
  --text-muted:     #555e72;

  --radius-sm:  6px;
  --radius-md:  10px;
  --radius-lg:  16px;
  --radius-xl:  22px;

  --shadow-sm:  0 1px 3px rgba(0,0,0,0.4);
  --shadow-md:  0 4px 16px rgba(0,0,0,0.5);
  --shadow-lg:  0 8px 32px rgba(0,0,0,0.6);
  --shadow-accent: 0 4px 24px rgba(79,156,249,0.22);

  --transition: 0.2s cubic-bezier(0.4,0,0.2,1);

  --font-body:  'Sora', sans-serif;
  --font-mono:  'IBM Plex Mono', monospace;
}

/* ── RESET ───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  background: var(--bg-base);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }

button {
  font-family: var(--font-body);
  cursor: pointer;
  border: none;
  background: none;
}

input {
  font-family: var(--font-body);
}

/* ── SCREEN UTILITY ──────────────────────────────────── */
.screen { min-height: 100vh; }

/* ══════════════════════════════════════════════════════
   LOGIN SCREEN
══════════════════════════════════════════════════════ */
#login-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  min-height: 100vh;
  padding: 24px;
}

/* Background effects */
.login-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.login-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(79,156,249,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(79,156,249,0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, black 40%, transparent 100%);
}

.login-glow {
  position: absolute;
  top: -10%;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 400px;
  background: radial-gradient(ellipse, rgba(79,156,249,0.12) 0%, transparent 70%);
  border-radius: 50%;
}

/* Card */
.login-container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 460px;
}

.login-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 40px 36px;
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(255,255,255,0.03);
  animation: fadeSlideUp 0.5s ease both;
}

@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Brand */
.login-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 28px;
}

.login-logo {
  height: 220px;
  width: auto;
  object-fit: contain;
  border-radius: var(--radius-md);
}

.brand-badge {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.12em;
  color: var(--accent);
  background: var(--accent-glow);
  border: 1px solid rgba(79,156,249,0.3);
  border-radius: var(--radius-sm);
  padding: 4px 10px;
}

.brand-separator {
  width: 1px;
  height: 20px;
  background: var(--border);
}

.brand-subtitle {
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  line-height: 1.4;
  max-width: 160px;
}

/* Header */
.login-header {
  margin-bottom: 28px;
}

.login-header h1 {
  font-size: 22px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}

.login-header p {
  font-size: 13px;
  color: var(--text-secondary);
}

/* Form */
.login-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.input-group label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.input-wrapper {
  position: relative;
}

.input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
  display: flex;
  align-items: center;
}

.input-wrapper input {
  width: 100%;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 11px 14px 11px 42px;
  font-size: 14px;
  color: var(--text-primary);
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
  outline: none;
}

.input-wrapper input::placeholder {
  color: var(--text-muted);
}

.input-wrapper input:focus {
  border-color: var(--border-focus);
  background: var(--bg-hover);
  box-shadow: 0 0 0 3px rgba(79,156,249,0.1);
}

/* Error */
.error-message {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--danger-bg);
  border: 1px solid rgba(252,92,125,0.25);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  font-size: 13px;
  color: var(--danger);
  animation: fadeSlideUp 0.25s ease both;
}

/* Primary button */
.btn-primary {
  width: 100%;
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius-md);
  padding: 12px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background var(--transition), box-shadow var(--transition), transform var(--transition);
  position: relative;
  overflow: hidden;
}

.btn-primary:hover {
  background: var(--accent-hover);
  box-shadow: var(--shadow-accent);
}

.btn-primary:active {
  transform: scale(0.985);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-text, .btn-loader {
  display: flex;
  align-items: center;
  gap: 8px;
}

.spin {
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Footer */
.login-footer {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  text-align: center;
}

.login-footer p {
  font-size: 12px;
  color: var(--text-muted);
}

/* ══════════════════════════════════════════════════════
   PORTAL SCREEN — HEADER
══════════════════════════════════════════════════════ */
.portal-header {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.header-badge {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.12em;
  color: var(--accent);
  background: var(--accent-glow);
  border: 1px solid rgba(79,156,249,0.3);
  border-radius: var(--radius-sm);
  padding: 3px 8px;
  flex-shrink: 0;
}

.header-logo {
  height: 36px;
  width: auto;
  object-fit: contain;
  flex-shrink: 0;
  border-radius: 4px;
}

.header-titles {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.header-main {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-user {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.user-info {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1px;
}

.user-kurum {
  font-size: 11px;
  color: var(--text-secondary);
  font-weight: 500;
  white-space: nowrap;
}

.user-ad {
  font-size: 13px;
  color: var(--text-primary);
  font-weight: 600;
  white-space: nowrap;
}

.btn-logout {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color var(--transition), background var(--transition), border-color var(--transition);
}

.btn-logout:hover {
  color: var(--danger);
  background: rgba(252,92,125,0.08);
  border-color: rgba(252,92,125,0.3);
}

/* ══════════════════════════════════════════════════════
   PORTAL SCREEN — MAIN
══════════════════════════════════════════════════════ */
.portal-main {
  padding: 32px 0 60px;
  animation: fadeIn 0.4s ease both;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.main-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

/* ── DUYURULAR ───────────────────────────────────────── */
.duyurular-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.duyuru-card {
  background: var(--warning-bg);
  border: 1px solid var(--warning-border);
  border-left: 3px solid var(--warning);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  animation: fadeSlideUp 0.3s ease both;
}

.duyuru-icon {
  color: var(--warning);
  flex-shrink: 0;
  margin-top: 1px;
}

.duyuru-baslik {
  font-size: 13px;
  font-weight: 600;
  color: var(--warning);
  margin-bottom: 3px;
}

.duyuru-aciklama {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.55;
}

/* ── FORMS SECTION ───────────────────────────────────── */
.forms-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.forms-title-block {
  display: flex;
  align-items: center;
  gap: 10px;
}

.forms-title-block h2 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.form-count-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--accent);
  background: var(--accent-glow);
  border: 1px solid rgba(79,156,249,0.25);
  border-radius: 20px;
  padding: 2px 10px;
}

/* Search */
.search-wrapper {
  position: relative;
  flex: 1;
  max-width: 300px;
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
  display: flex;
  align-items: center;
}

#search-input {
  width: 100%;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 9px 14px 9px 36px;
  font-size: 13px;
  color: var(--text-primary);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}

#search-input::placeholder { color: var(--text-muted); }

#search-input:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(79,156,249,0.08);
}

/* Category tabs */
.kategori-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.kategori-tab {
  font-size: 12px;
  font-weight: 500;
  padding: 5px 14px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--bg-surface);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
  letter-spacing: 0.02em;
}

.kategori-tab:hover {
  border-color: rgba(79,156,249,0.4);
  color: var(--text-primary);
}

.kategori-tab.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* Forms grid */
.forms-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

/* Form card */
.form-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
  animation: fadeSlideUp 0.3s ease both;
  position: relative;
  overflow: hidden;
}

.form-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent);
  opacity: 0;
  transition: opacity var(--transition);
}

.form-card:hover {
  border-color: rgba(79,156,249,0.3);
  box-shadow: var(--shadow-md), 0 0 0 1px rgba(79,156,249,0.08);
  transform: translateY(-2px);
}

.form-card:hover::before {
  opacity: 1;
}

.form-card-top {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.form-simge {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.form-meta {
  flex: 1;
  min-width: 0;
}

.form-ad {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  line-height: 1.35;
  margin-bottom: 4px;
}

.form-kategori {
  display: inline-block;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-glow);
  border: 1px solid rgba(79,156,249,0.2);
  border-radius: 4px;
  padding: 2px 7px;
}

.form-aciklama {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.6;
  flex: 1;
}

.form-card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
}

.form-guncelleme {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.form-guncelleme em {
  font-style: italic;
  font-size: 10px;
  color: var(--text-muted);
  opacity: 0.75;
}

.btn-form-ac {
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius-sm);
  padding: 7px 16px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.03em;
  display: flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  transition: background var(--transition), box-shadow var(--transition);
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-form-ac:hover {
  background: var(--accent-hover);
  box-shadow: 0 2px 12px rgba(79,156,249,0.3);
  color: #fff;
}

/* Empty state */
.forms-empty {
  text-align: center;
  padding: 64px 24px;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.forms-empty svg {
  opacity: 0.3;
}

.forms-empty p {
  font-size: 14px;
}

/* Loading */
.forms-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 64px 24px;
  gap: 16px;
  color: var(--text-muted);
}

.forms-loading p {
  font-size: 13px;
}

.loading-dots {
  display: flex;
  gap: 6px;
}

.loading-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  animation: loadingPulse 1.2s ease-in-out infinite;
}

.loading-dots span:nth-child(2) { animation-delay: 0.2s; }
.loading-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes loadingPulse {
  0%, 80%, 100% { opacity: 0.2; transform: scale(0.85); }
  40% { opacity: 1; transform: scale(1); }
}

/* ── FOOTER ──────────────────────────────────────────── */
.portal-footer {
  text-align: center;
  padding: 20px 24px;
  font-size: 11px;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.footer-sep {
  opacity: 0.4;
}

/* ══════════════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════════════ */
@media (max-width: 640px) {
  .login-card {
    padding: 28px 22px;
  }

  .header-inner {
    padding: 0 16px;
    height: 56px;
  }

  .header-main {
    font-size: 12px;
  }

  .user-kurum {
    display: none;
  }

  .main-inner {
    padding: 0 16px;
  }

  .portal-main {
    padding: 20px 0 48px;
  }

  .forms-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .search-wrapper {
    width: 100%;
    max-width: none;
  }

  .forms-grid {
    grid-template-columns: 1fr;
  }

  .brand-subtitle {
    display: none;
  }
}

@media (max-width: 400px) {
  .login-card {
    padding: 24px 18px;
    border-radius: var(--radius-lg);
  }
}

/* ── SCROLLBAR ───────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.1);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255,255,255,0.18);
}

/* ── SELECTION ───────────────────────────────────────── */
::selection {
  background: var(--accent-glow);
  color: var(--text-primary);
}