:root {
  --primary: #0097D8;
  --primary-dark: #006699;
  --primary-light: #e0f2fe;
  --secondary: #F37023;
  --secondary-light: #fff7ed;
  --accent: #10b981;
  --purple: #8b5cf6;
  --sidebar-bg: #091322;
  --sidebar-hover: #16243f;
  --sidebar-active: #0097D8;
  --sidebar-text: #94a3b8;
  --sidebar-text-active: #ffffff;
  --topbar-bg: #ffffff;
  --bg-main: #f8fafc;
  --bg-gradient: linear-gradient(135deg, #091428 0%, #1e3a5f 100%);
  --card-bg: #ffffff;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.02);
  --shadow-md: 0 4px 16px -2px rgba(0,0,0,0.08), 0 2px 6px -1px rgba(0,0,0,0.04);
  --shadow-lg: 0 16px 36px -4px rgba(0,0,0,0.12), 0 8px 16px -4px rgba(0,0,0,0.06);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

body {
  background: var(--bg-main);
  color: var(--text-main);
  min-height: 100vh;
}

/* =========================================
   LOGIN SCREEN STYLES
   ========================================= */
.auth-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: var(--bg-gradient);
  padding: 24px;
}

.auth-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.45);
  width: 100%;
  max-width: 440px;
  padding: 42px 36px;
  text-align: center;
  border: 1px solid rgba(255,255,255,0.1);
}

.brand-header img {
  max-width: 270px;
  width: 100%;
  height: auto;
  margin-bottom: 24px;
  display: inline-block;
}

.auth-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 6px;
  letter-spacing: -0.4px;
}

.auth-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 26px;
}

.form-group {
  text-align: left;
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 6px;
}

.form-control {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  outline: none;
  background: #ffffff;
  color: var(--text-main);
  transition: all 0.2s ease;
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 151, 216, 0.15);
}

.btn-primary {
  width: 100%;
  padding: 12px 20px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(0, 151, 216, 0.28);
}

.btn-primary:hover {
  opacity: 0.94;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0, 151, 216, 0.38);
}

.btn-logout {
  background: #ffffff;
  border: 1.5px solid #fee2e2;
  color: #dc2626;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-logout:hover {
  background: #fee2e2;
}

.badge {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-admin { background: #fee2e2; color: #b91c1c; border: 1px solid #fecaca; }
.badge-president { background: #e0f2fe; color: #0369a1; border: 1px solid #bae6fd; }
.badge-sec-treas { background: #fef3c7; color: #92400e; border: 1px solid #fde68a; }

/* =========================================
   APP MASTER SHELL (Sidebar, Topbar, Main)
   ========================================= */
.app-shell {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 270px;
  background: var(--sidebar-bg);
  color: #fff;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 100;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 4px 0 24px rgba(0,0,0,0.18);
}

.main-wrapper {
  flex: 1;
  margin-left: 270px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: var(--bg-main);
  transition: margin-left 0.3s;
}

.topbar {
  height: 74px;
  background: var(--topbar-bg);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 36px;
  position: sticky;
  top: 0;
  z-index: 90;
  box-shadow: var(--shadow-sm);
}

.page-container {
  flex: 1;
  padding: 32px 36px;
  max-width: 1440px;
  width: 100%;
  margin: 0 auto;
}

.card-premium {
  background: var(--card-bg);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  padding: 28px;
  transition: box-shadow 0.2s, transform 0.2s;
}

.card-premium:hover {
  box-shadow: var(--shadow-md);
}

/* Modernized KPI Card */
.kpi-card {
  background: #ffffff;
  border-radius: var(--radius-md);
  padding: 24px 22px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 18px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.kpi-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.kpi-icon {
  width: 54px;
  height: 54px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
}

/* Floating Action Button */
.fab-container {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 999;
  display: flex;
  flex-direction: column-reverse;
  align-items: flex-end;
  gap: 12px;
}

.fab-main {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff;
  border: none;
  box-shadow: 0 10px 25px rgba(0, 151, 216, 0.45);
  font-size: 28px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.25s, box-shadow 0.25s;
}

.fab-main:hover {
  transform: scale(1.08) rotate(90deg);
  box-shadow: 0 14px 32px rgba(0, 151, 216, 0.6);
}

.bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 64px;
  background: #ffffff;
  border-top: 1px solid var(--border);
  box-shadow: 0 -4px 16px rgba(0,0,0,0.06);
  z-index: 95;
  justify-content: space-around;
  align-items: center;
}

/* Upload Dropzone Styling */
.upload-dropzone {
  border: 2px dashed #cbd5e1;
  background: #f8fafc;
  border-radius: 12px;
  padding: 36px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
}

.upload-dropzone:hover {
  border-color: var(--primary);
  background: #f0f9ff;
}

@media (max-width: 900px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.mobile-open {
    transform: translateX(0);
  }
  .main-wrapper {
    margin-left: 0;
  }
  .bottom-nav {
    display: flex;
  }
  .page-container {
    padding: 16px;
    padding-bottom: 84px;
  }
  .topbar {
    padding: 0 20px;
  }
}
