:root {
  --officly-primary: #6366f1;
  --officly-primary-dark: #4f46e5;
  --officly-accent: #8b5cf6;
  --officly-dark: #0f172a;
  --officly-dark-soft: #1e293b;
  --officly-surface: #ffffff;
  --officly-bg: #f1f5f9;
  --officly-border: #e2e8f0;
  --officly-text: #0f172a;
  --officly-muted: #64748b;
  --officly-radius: 14px;
  --officly-shadow: 0 4px 24px rgba(15, 23, 42, 0.06);
  --officly-shadow-lg: 0 20px 50px rgba(15, 23, 42, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  font-size: 15px;
  scroll-behavior: smooth;
}

body {
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, sans-serif;
  background: var(--officly-bg);
  color: var(--officly-text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* —— Navbar —— */
.officly-navbar {
  background: linear-gradient(135deg, var(--officly-dark) 0%, var(--officly-dark-soft) 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding: 0.65rem 0;
}

.officly-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none !important;
  color: #fff !important;
}

.officly-brand-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--officly-primary), var(--officly-accent));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1rem;
  color: #fff;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.45);
}

.officly-logo {
  object-fit: contain;
  display: block;
  flex-shrink: 0;
}

.officly-logo-sm {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
}

.officly-logo-lg {
  width: 72px;
  height: 72px;
  border-radius: 14px;
  margin-bottom: 2rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
}

.officly-logo-md {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  margin: 0 auto 0.75rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.officly-brand-text {
  line-height: 1.15;
}

.officly-brand-name {
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.officly-brand-tag {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.55);
}

.officly-navbar .nav-link {
  color: rgba(255, 255, 255, 0.75) !important;
  font-weight: 500;
  font-size: 0.9rem;
  padding: 0.45rem 0.85rem !important;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.officly-navbar .nav-link:hover,
.officly-navbar .nav-link.active,
.officly-navbar .nav-link.show {
  color: #fff !important;
  background: rgba(255, 255, 255, 0.1);
}

.officly-dropdown {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 0.35rem;
  margin-top: 0.35rem;
  background: var(--officly-dark-soft) !important;
}

.officly-dropdown .dropdown-item {
  border-radius: 8px;
  padding: 0.5rem 0.85rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
}

.officly-dropdown .dropdown-item:hover,
.officly-dropdown .dropdown-item:focus {
  background: rgba(99, 102, 241, 0.35);
  color: #fff;
}

.officly-dropdown .dropdown-divider {
  border-color: rgba(255, 255, 255, 0.1);
  margin: 0.35rem 0;
}

.officly-user-pill {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  padding: 0.35rem 0.9rem;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.9);
}

.btn-officly-outline {
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  border-radius: 8px;
  font-weight: 500;
  font-size: 0.85rem;
  padding: 0.4rem 1rem;
}

.btn-officly-outline:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.4);
  color: #fff;
}

/* —— Main content —— */
.officly-main {
  padding: 2rem 0 3rem;
}

.page-header {
  margin-bottom: 1.75rem;
}

.page-header h1 {
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 0.25rem;
}

.page-header .subtitle {
  color: var(--officly-muted);
  font-size: 0.95rem;
  margin: 0;
}

/* —— Cards —— */
.officly-card {
  background: var(--officly-surface);
  border: 1px solid var(--officly-border);
  border-radius: var(--officly-radius);
  box-shadow: var(--officly-shadow);
}

.officly-card .card-header {
  background: transparent;
  border-bottom: 1px solid var(--officly-border);
  font-weight: 600;
  padding: 1rem 1.25rem;
}

.stat-card {
  border: 1px solid var(--officly-border) !important;
  border-radius: var(--officly-radius) !important;
  box-shadow: var(--officly-shadow);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border-left: none !important;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--officly-shadow-lg);
}

.stat-card .card-body {
  padding: 1.35rem 1.5rem;
  position: relative;
}

.stat-card-accent {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
}

.stat-card-accent.warning { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.stat-card-accent.primary { background: linear-gradient(90deg, var(--officly-primary), var(--officly-accent)); }
.stat-card-accent.success { background: linear-gradient(90deg, #10b981, #34d399); }

.stat-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--officly-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.35rem;
}

.stat-value {
  font-size: 2.1rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.stat-value.warning { color: #d97706; }
.stat-value.primary { color: var(--officly-primary); }
.stat-value.success { color: #059669; }

/* —— Tables —— */
.officly-table-wrap {
  background: var(--officly-surface);
  border: 1px solid var(--officly-border);
  border-radius: var(--officly-radius);
  box-shadow: var(--officly-shadow);
  overflow: hidden;
}

.officly-table-wrap .table {
  margin-bottom: 0;
}

.officly-table-wrap .table thead th {
  background: #f8fafc;
  border-bottom: 1px solid var(--officly-border);
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--officly-muted);
  padding: 0.9rem 1.25rem;
}

.officly-table-wrap .table tbody td {
  padding: 1rem 1.25rem;
  vertical-align: middle;
  border-color: #f1f5f9;
}

.officly-table-wrap .table tbody tr:hover {
  background: #fafbff;
}

.officly-pagination .page-link {
  border-color: var(--officly-border);
  color: var(--officly-primary);
  border-radius: 8px !important;
  min-width: 2.25rem;
  text-align: center;
  margin: 0 0.15rem;
}

.officly-pagination .page-link:hover {
  background: rgba(99, 102, 241, 0.08);
  border-color: var(--officly-primary);
  color: var(--officly-primary-dark);
}

.officly-pagination .page-item.active .page-link {
  background: linear-gradient(135deg, var(--officly-primary), var(--officly-primary-dark));
  border-color: transparent;
}

/* —— Buttons —— */
.btn-officly {
  background: linear-gradient(135deg, var(--officly-primary), var(--officly-primary-dark));
  border: none;
  color: #fff;
  font-weight: 600;
  border-radius: 10px;
  padding: 0.55rem 1.25rem;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
  transition: all 0.2s ease;
}

.btn-officly:hover {
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.45);
  background: linear-gradient(135deg, var(--officly-primary-dark), #4338ca);
}

.btn-officly-outline-primary {
  border: 1.5px solid var(--officly-primary);
  color: var(--officly-primary);
  font-weight: 600;
  border-radius: 10px;
  background: transparent;
}

.btn-officly-outline-primary:hover {
  background: var(--officly-primary);
  color: #fff;
}

/* —— Badges —— */
.badge-officly-success {
  background: #d1fae5;
  color: #047857;
  font-weight: 600;
  padding: 0.4em 0.75em;
  border-radius: 6px;
}

.badge-officly-danger {
  background: #fee2e2;
  color: #b91c1c;
  font-weight: 600;
  padding: 0.4em 0.75em;
  border-radius: 6px;
}

.badge-officly-warning {
  background: #fef3c7;
  color: #b45309;
  font-weight: 600;
  padding: 0.4em 0.75em;
  border-radius: 6px;
}

/* —— Alerts —— */
.alert-officly-success {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #047857;
  border-radius: var(--officly-radius);
}

/* —— Filter pills —— */
.filter-pills .btn {
  border-radius: 999px;
  font-weight: 500;
  font-size: 0.85rem;
  padding: 0.35rem 1rem;
}

/* —— Login —— */
.login-page {
  min-height: 100vh;
  display: flex;
}

.login-brand-panel {
  flex: 1;
  background: linear-gradient(145deg, var(--officly-dark) 0%, #312e81 50%, var(--officly-primary-dark) 100%);
  display: none;
  flex-direction: column;
  justify-content: center;
  padding: 3rem;
  position: relative;
  overflow: hidden;
}

.login-brand-panel::before {
  content: "";
  position: absolute;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: rgba(99, 102, 241, 0.2);
  top: -100px;
  right: -100px;
}

.login-brand-panel::after {
  content: "";
  position: absolute;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: rgba(139, 92, 246, 0.15);
  bottom: -80px;
  left: -80px;
}

.login-brand-content {
  position: relative;
  z-index: 1;
  color: #fff;
  max-width: 420px;
}

.login-brand-content .brand-icon-lg {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--officly-primary), var(--officly-accent));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.4rem;
  margin-bottom: 2rem;
  box-shadow: 0 8px 32px rgba(99, 102, 241, 0.5);
}

.login-brand-content h2 {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
}

.login-brand-content p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 1.05rem;
  line-height: 1.6;
}

.login-form-panel {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: var(--officly-bg);
}

.login-form-inner {
  width: 100%;
  max-width: 400px;
}

.login-mobile-brand {
  text-align: center;
  margin-bottom: 2rem;
}

.login-mobile-brand .brand-icon-lg {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--officly-primary), var(--officly-accent));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: #fff;
  margin-bottom: 0.75rem;
}

.login-form-inner h1 {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.login-form-inner .form-label {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--officly-text);
}

.login-form-inner .form-control {
  border-radius: 10px;
  border: 1.5px solid var(--officly-border);
  padding: 0.65rem 1rem;
}

.login-form-inner .form-control:focus {
  border-color: var(--officly-primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.demo-box {
  background: #f8fafc;
  border: 1px dashed var(--officly-border);
  border-radius: 10px;
  padding: 1rem;
  margin-top: 1.5rem;
}

.demo-box p {
  font-size: 0.8rem;
  color: var(--officly-muted);
  margin-bottom: 0.25rem;
}

/* —— Footer —— */
.officly-footer {
  text-align: center;
  padding: 1.5rem;
  color: var(--officly-muted);
  font-size: 0.8rem;
  border-top: 1px solid var(--officly-border);
  margin-top: auto;
}

.officly-footer strong {
  color: var(--officly-primary);
}

/* —— Section title —— */
.section-title {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.empty-state {
  text-align: center;
  padding: 3rem 2rem;
  color: var(--officly-muted);
}

.empty-state-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

.izin-aralik-form .form-control {
  border-radius: 10px;
  border: 1.5px solid var(--officly-border);
}

.izin-aralik-form .form-control:focus {
  border-color: var(--officly-primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.duyuru-kart {
  border-left: 4px solid var(--officly-primary) !important;
}

.duyuru-icerik {
  white-space: pre-wrap;
  line-height: 1.6;
  color: var(--officly-text);
  font-size: 0.95rem;
}

.duyuru-belge-goruntule {
  overflow: hidden;
}

.duyuru-pdf-frame {
  display: block;
  width: 100%;
  min-height: 75vh;
  border: 0;
  background: #525659;
}

.duyuru-gorsel {
  max-height: 75vh;
  object-fit: contain;
}

/* —— İzin takvimi —— */
.officly-takvim {
  border: 1px solid var(--officly-border);
  border-radius: var(--officly-radius);
  overflow: hidden;
  background: var(--officly-surface);
}

.officly-takvim-baslik,
.officly-takvim-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
}

.officly-takvim-hafta-gun {
  padding: 0.5rem 0.25rem;
  text-align: center;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--officly-muted);
  background: #f8fafc;
  border-bottom: 1px solid var(--officly-border);
}

.officly-takvim-gun {
  min-height: 72px;
  padding: 0.35rem 0.4rem;
  border-right: 1px solid var(--officly-border);
  border-bottom: 1px solid var(--officly-border);
  text-decoration: none !important;
  color: inherit;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  transition: background 0.15s ease, box-shadow 0.15s ease;
}

.officly-takvim-gun:nth-child(7n) {
  border-right: none;
}

.officly-takvim-gun:hover {
  background: #f1f5f9;
}

.officly-takvim-gun-diger-ay {
  background: #fafbfc;
  opacity: 0.55;
}

.officly-takvim-gun-bugun .officly-takvim-gun-no {
  background: var(--officly-primary);
  color: #fff;
  border-radius: 50%;
  width: 1.6rem;
  height: 1.6rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.officly-takvim-gun-secili {
  background: rgba(99, 102, 241, 0.12) !important;
  box-shadow: inset 0 0 0 2px var(--officly-primary);
  opacity: 1;
}

.officly-takvim-gun-izinli .officly-takvim-gun-sayi {
  background: rgba(245, 158, 11, 0.2);
  color: #b45309;
}

.officly-takvim-gun-no {
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.2;
}

.officly-takvim-gun-sayi {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.1rem 0.35rem;
  border-radius: 999px;
  margin-top: auto;
}

.officly-takvim-detay {
  border-top: 1px dashed var(--officly-border);
  padding-top: 1rem;
}

@media (max-width: 576px) {
  .officly-takvim-gun {
    min-height: 58px;
    padding: 0.25rem;
  }

  .officly-takvim-gun-sayi {
    font-size: 0.6rem;
  }
}

@media (min-width: 992px) {
  .login-brand-panel {
    display: flex;
  }

  .login-mobile-brand {
    display: none;
  }
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}
