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

:root {
  --primary: #2c5171;
  --primary-mid: #4682b4;
  --primary-light: #6a9bc3;
  --accent: #e8a838;
  --danger: #e53e3e;
  --success: #38a169;
  --text: #1a202c;
  --text-muted: #718096;
  --bg: #f7fafc;
  --surface: rgba(255,255,255,0.92);
  --border: rgba(44,81,113,0.18);
  --shadow: 0 4px 24px rgba(44,81,113,0.13);
  --radius: 10px;
  --navbar-h: 56px;
  --footer-h: 40px;
  --font: 'Figtree', system-ui, sans-serif;
}

body {
  font-family: var(--font);
  background: linear-gradient(135deg, #2c5171 0%, #4682b4 50%, #6a9bc3 100%);
  min-height: 100vh;
  color: var(--text);
  font-size: 14px;
}

/* NAVBAR */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--navbar-h);
  background: rgba(255,255,255,0.88);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 20px;
  box-shadow: 0 2px 12px rgba(44,81,113,0.1);
}
.navbar-brand { display: flex; align-items: center; gap: 10px; }
.navbar-logo { height: 28px; width: 28px; }
.navbar-title {
  font-size: 1.2rem; font-weight: 700;
  background: linear-gradient(135deg, #2c5171, #4682b4);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.navbar-nav { display: flex; align-items: center; gap: 8px; }

/* FOOTER */
.app-footer {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 100;
  height: var(--footer-h);
  background: rgba(255,255,255,0.88);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  gap: 12px; font-size: 12px; color: var(--text-muted);
}
.footer-separator { color: var(--border); }

/* MAIN */
.app-main {
  margin-top: var(--navbar-h);
  margin-bottom: var(--footer-h);
  height: calc(100vh - var(--navbar-h) - var(--footer-h));
  overflow: hidden;
}

/* BUTTONS */
.btn {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 7px 16px; border-radius: 7px; border: none; cursor: pointer;
  font-family: var(--font); font-size: 13px; font-weight: 500;
  background: linear-gradient(135deg, var(--primary), var(--primary-mid));
  color: #fff; transition: opacity .15s, transform .1s;
  text-decoration: none;
}
.btn:hover { opacity: .88; }
.btn:active { transform: scale(.97); }
.btn-sm { padding: 5px 12px; font-size: 12px; }
.btn-xs { padding: 3px 8px; font-size: 11px; border-radius: 5px; }
.btn-outline {
  background: transparent;
  border: 1.5px solid var(--primary-mid);
  color: var(--primary);
}
.btn-outline:hover { background: rgba(70,130,180,.08); }
.btn-warning {
  background: linear-gradient(135deg, #b7791f, var(--accent));
}
.btn-danger { background: linear-gradient(135deg, #c53030, var(--danger)); }

/* FORMS */
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 12px; font-weight: 600; color: var(--text-muted); margin-bottom: 4px; text-transform: uppercase; letter-spacing: .4px; }
.form-control {
  width: 100%; padding: 8px 12px; border-radius: 7px;
  border: 1.5px solid var(--border); background: #fff;
  font-family: var(--font); font-size: 13px; color: var(--text);
  transition: border-color .15s;
}
.form-control:focus { outline: none; border-color: var(--primary-mid); box-shadow: 0 0 0 3px rgba(70,130,180,.15); }
.form-control[readonly] { background: #f0f4f8; color: var(--text-muted); }
.form-row { display: flex; gap: 12px; }
.flex-1 { flex: 1; }
.form-section-title { font-size: 11px; font-weight: 700; color: var(--primary); text-transform: uppercase; letter-spacing: .6px; margin: 16px 0 10px; border-bottom: 1px solid var(--border); padding-bottom: 4px; }
.select-sm { padding: 4px 8px; border-radius: 6px; border: 1.5px solid var(--border); font-size: 12px; font-family: var(--font); }
.cb-label { display: flex; align-items: center; gap: 4px; font-size: 12px; cursor: pointer; color: var(--text-muted); }

/* SLIDE PANELS */
.slide-panel {
  position: fixed; top: 0; right: -50%; width: 45%; min-width: 45vw;
  height: 100vh; z-index: 200;
  background: var(--surface); backdrop-filter: blur(20px);
  border-left: 1px solid var(--border);
  box-shadow: -8px 0 40px rgba(44,81,113,0.18);
  transition: right .3s cubic-bezier(.4,0,.2,1);
  display: flex; flex-direction: column;
}
.slide-panel.open { right: 0; }
.panel-wide { width: 60%; min-width: 60vw; right: -65%; }
.panel-backdrop {
  position: fixed; inset: 0; z-index: 199;
  background: rgba(44,81,113,0.35); opacity: 0; pointer-events: none;
  transition: opacity .3s;
}
.panel-backdrop.open { opacity: 1; pointer-events: all; }
.panel-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border);
}
.panel-header h2 { font-size: 1rem; font-weight: 700; color: var(--primary); }
.panel-close { background: none; border: none; cursor: pointer; font-size: 18px; color: var(--text-muted); padding: 4px; }
.panel-close:hover { color: var(--danger); }
.panel-body { flex: 1; overflow-y: auto; padding: 20px 24px; }
.panel-actions { display: flex; gap: 10px; padding-top: 16px; }

/* TOAST */
.toast {
  position: fixed; bottom: 60px; right: 24px; z-index: 300;
  padding: 12px 20px; border-radius: 9px;
  background: #1a202c; color: #fff;
  font-size: 13px; font-weight: 500;
  opacity: 0; transform: translateY(10px);
  transition: opacity .25s, transform .25s;
  pointer-events: none; max-width: 320px;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast.error { background: var(--danger); }
.toast.success { background: var(--success); }

/* NAV LINK */
.nav-link { color: var(--primary-mid); text-decoration: none; font-size: 12px; }
.nav-link:hover { text-decoration: underline; }
