/* Eryürekli App — paylaşılan stiller */

:root {
  --navy: #1B3A6B;
  --navy2: #2563a8;
  --green: #16a34a;
  --red: #dc2626;
  --orange: #d97706;
  --gray: #64748b;
  --light: #f0f4f8;
  --border: #e2e8f0;
  --text: #1a2332;
  --sidebar-w: 250px;
  --header-h: 56px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  color: var(--text);
  background: var(--light);
}

a { color: var(--navy2); text-decoration: none; }
a:hover { text-decoration: underline; }

/* === LOGIN === */
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy2) 100%);
  padding: 20px;
}
.login-card {
  background: #fff;
  border-radius: 16px;
  padding: 36px 32px;
  width: 100%;
  max-width: 380px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}
.login-logo {
  text-align: center;
  font-size: 2.4rem;
  margin-bottom: 8px;
}
.login-title {
  font-size: 1.4rem;
  font-weight: 800;
  text-align: center;
  color: var(--navy);
  margin: 0 0 4px;
}
.login-sub {
  text-align: center;
  color: var(--gray);
  font-size: 0.85rem;
  margin-bottom: 24px;
}
.field {
  margin-bottom: 14px;
}
.field label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}
.field input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.15s;
}
.field input:focus { border-color: var(--navy2); }

.btn-login {
  width: 100%;
  padding: 12px;
  background: var(--navy);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  margin-top: 8px;
}
.btn-login:hover { background: var(--navy2); }
.btn-login:disabled { opacity: 0.6; cursor: not-allowed; }

.error-msg {
  background: #fee2e2;
  color: var(--red);
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 0.85rem;
  margin-bottom: 14px;
  display: none;
}
.error-msg.show { display: block; }

/* === LAYOUT (auth pages) === */
.app-layout {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: var(--sidebar-w);
  background: #fff;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  overflow-y: auto;
}

.sidebar-brand {
  padding: 16px 18px;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy2) 100%);
  color: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand-mark { font-size: 1.6rem; }
.brand-title { font-weight: 800; font-size: 1rem; line-height: 1; }
.brand-sub { font-size: 0.7rem; opacity: 0.85; margin-top: 2px; }

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

.nav-item, .nav-group-title {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 18px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
}
.nav-item { text-decoration: none; }
.nav-item:hover { background: var(--light); text-decoration: none; }
.nav-item.active { background: rgba(37, 99, 168, 0.1); color: var(--navy); border-left: 3px solid var(--navy); padding-left: 15px; font-weight: 700; }
.nav-icon { width: 22px; text-align: center; font-size: 0.95rem; }

.nav-group-title {
  color: var(--gray);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding-top: 14px;
  padding-bottom: 4px;
  cursor: default;
}
.nav-children { display: flex; flex-direction: column; }
.nav-child {
  padding: 7px 18px 7px 50px;
  font-size: 0.85rem;
  color: var(--text);
  text-decoration: none;
}
.nav-child:hover { background: var(--light); text-decoration: none; }

.sidebar-footer {
  padding: 14px 18px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: #fafbfc;
}
.user-info { min-width: 0; flex: 1; }
.user-name {
  font-weight: 700;
  font-size: 0.85rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.user-role { color: var(--gray); font-size: 0.72rem; }
.btn-logout {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--gray);
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
}
.btn-logout:hover { background: var(--red); color: #fff; border-color: var(--red); }

/* === MAIN CONTENT === */
.main {
  margin-left: var(--sidebar-w);
  flex: 1;
  min-height: 100vh;
}
.page-header {
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 14px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.page-title { font-size: 1.2rem; font-weight: 700; margin: 0; }
.page-subtitle { color: var(--gray); font-size: 0.85rem; }

.page-content {
  padding: 24px 28px;
}

/* === CARDS / KPI === */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.kpi-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 20px;
}
.kpi-label { color: var(--gray); font-size: 0.78rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.kpi-value { font-size: 1.6rem; font-weight: 800; color: var(--navy); margin-top: 6px; }
.kpi-hint { color: var(--gray); font-size: 0.78rem; margin-top: 4px; }

.placeholder-block {
  background: #fff;
  border: 1px dashed var(--border);
  border-radius: 12px;
  padding: 30px;
  text-align: center;
  color: var(--gray);
}

/* Loading state */
.loading {
  text-align: center;
  padding: 40px;
  color: var(--gray);
}
