:root {
  --fc-primary: #1e5f5b;
  --fc-primary-dark: #143f3c;
  --fc-accent: #e8a13a;
  --fc-bg: #f4f6f7;
  --fc-sidebar-bg: #123331;
  --fc-sidebar-text: #cfe3e0;
  --fc-sidebar-active: #1e5f5b;
  --fc-border: #e3e7e8;
  --fc-text: #1f2b2a;
  --fc-muted: #6b7877;
  --fc-danger: #c94b4b;
  --fc-success: #2f8f5b;
}

* { box-sizing: border-box; }

body {
  background: var(--fc-bg);
  color: var(--fc-text);
  font-family: "Segoe UI", Roboto, -apple-system, BlinkMacSystemFont, sans-serif;
}

.fc-app {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.fc-sidebar {
  width: 250px;
  flex-shrink: 0;
  background: var(--fc-sidebar-bg);
  color: var(--fc-sidebar-text);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 1030;
  transition: transform .2s ease;
}

.fc-brand {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: 1.25rem 1.2rem;
  color: #fff;
  text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.fc-brand .fc-logo {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--fc-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #123331;
  font-size: 1.1rem;
}

.fc-brand strong {
  font-size: 1.05rem;
  line-height: 1.1;
  display: block;
}

.fc-brand small {
  color: #9fc4bf;
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.fc-nav {
  flex: 1;
  overflow-y: auto;
  padding: .75rem;
}

.fc-nav-section {
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #7fa39e;
  margin: 1rem .6rem .4rem;
}

.fc-nav a {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .55rem .75rem;
  border-radius: 8px;
  color: var(--fc-sidebar-text);
  text-decoration: none;
  font-size: .92rem;
  margin-bottom: .15rem;
}

.fc-nav a:hover {
  background: rgba(255,255,255,.06);
  color: #fff;
}

.fc-nav a.active {
  background: var(--fc-sidebar-active);
  color: #fff;
  font-weight: 600;
}

.fc-nav a i { width: 18px; text-align: center; }

.fc-sidebar-footer {
  padding: .9rem 1.2rem;
  border-top: 1px solid rgba(255,255,255,.08);
  font-size: .8rem;
  color: #8fb5b0;
}

/* Main area */
.fc-main {
  margin-left: 250px;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.fc-topbar {
  background: #fff;
  border-bottom: 1px solid var(--fc-border);
  padding: .75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 1020;
}

.fc-topbar h1 {
  font-size: 1.15rem;
  font-weight: 600;
  margin: 0;
  color: var(--fc-text);
}

.fc-user-chip {
  display: flex;
  align-items: center;
  gap: .6rem;
}

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

.fc-content {
  padding: 1.5rem;
  flex: 1;
}

/* Cards */
.card {
  border: 1px solid var(--fc-border);
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(16,24,23,.04);
}

.stat-card {
  border-radius: 14px;
  padding: 1.1rem 1.25rem;
  background: #fff;
  border: 1px solid var(--fc-border);
  display: flex;
  align-items: center;
  gap: 1rem;
}

.stat-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: #fff;
  flex-shrink: 0;
}

.stat-card .stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.1;
}

.stat-card .stat-label {
  color: var(--fc-muted);
  font-size: .82rem;
}

.btn-primary {
  background: var(--fc-primary);
  border-color: var(--fc-primary);
}
.btn-primary:hover, .btn-primary:focus {
  background: var(--fc-primary-dark);
  border-color: var(--fc-primary-dark);
}
.btn-outline-primary {
  color: var(--fc-primary);
  border-color: var(--fc-primary);
}
.btn-outline-primary:hover {
  background: var(--fc-primary);
  border-color: var(--fc-primary);
}

.text-primary-fc { color: var(--fc-primary) !important; }

.table thead th {
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--fc-muted);
  border-bottom-width: 1px;
  white-space: nowrap;
}

.badge-low { background: var(--fc-danger); }
.badge-ok { background: var(--fc-success); }

.fc-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .75rem;
  margin-bottom: 1.25rem;
}

.fc-page-header h2 {
  font-size: 1.35rem;
  font-weight: 700;
  margin: 0;
}

.fc-page-header p {
  color: var(--fc-muted);
  margin: .15rem 0 0;
  font-size: .88rem;
}

.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--fc-sidebar-bg), var(--fc-primary));
}

.login-card {
  width: 100%;
  max-width: 380px;
  background: #fff;
  border-radius: 16px;
  padding: 2.2rem;
  box-shadow: 0 20px 50px rgba(0,0,0,.25);
}

@media (max-width: 992px) {
  .fc-sidebar { transform: translateX(-100%); }
  .fc-sidebar.open { transform: translateX(0); }
  .fc-main { margin-left: 0; }
}

.fc-sidebar-toggle {
  display: none;
  border: none;
  background: transparent;
  font-size: 1.3rem;
  color: var(--fc-text);
}

@media (max-width: 992px) {
  .fc-sidebar-toggle { display: inline-flex; }
}

@media print {
  .fc-sidebar, .fc-topbar, .no-print { display: none !important; }
  .fc-main { margin-left: 0 !important; }
}
