/* iOS-like Design System */
:root {
  /* iOS System Colors */
  --ios-blue: #007AFF;
  --ios-green: #34C759;
  --ios-red: #FF3B30;
  --ios-gray: #8E8E93;
  --ios-gray-2: #AEAEB2;
  --ios-gray-3: #C7C7CC;
  --ios-gray-4: #D1D1D6;
  --ios-gray-5: #E5E5EA;
  --ios-gray-6: #F2F2F7;

  /* Backgrounds */
  --bg-primary: #F2F2F7;
  /* System Grouped Background */
  --bg-card: rgba(255, 255, 255, 0.7);
  --bg-glass: rgba(255, 255, 255, 0.85);

  /* Text */
  --text-primary: #000000;
  --text-secondary: #3C3C4399;
  /* 60% opacity */

  /* Spacing & Radius */
  --radius-l: 20px;
  --radius-m: 12px;
  --radius-s: 8px;
  --spacing-unit: 16px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* Reset & Base */
* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg-primary);
  background-image: url('../images/background.png');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  color: var(--text-primary);
  margin: 0;
  padding: 0;
  line-height: 1.5;
  padding-bottom: env(safe-area-inset-bottom);
}

a {
  text-decoration: none;
  color: var(--ios-blue);
}

/* Layout */
.app-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.content-area {
  padding: var(--spacing-unit);
  padding-top: 80px;
  /* Space for fixed header */
  max-width: 800px;
  margin: 0 auto;
  width: 100%;
}

/* Glass Header */
.glass-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: rgba(255, 255, 255, 0.6);
  /* More transparent for layering */
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border-bottom: 0.5px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
  /* Soft shadow */
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 var(--spacing-unit);
}

.nav-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  max-width: 800px;
}

.nav-logo img {
  height: 36px;
  /* Smaller logo */
  width: auto;
  border-radius: 8px;
  /* Rounded corners */
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.nav-links {
  display: flex;
  gap: 20px;
  align-items: center;
}

.nav-item {
  font-weight: 600;
  font-size: 17px;
  color: var(--text-primary);
  opacity: 0.6;
  transition: opacity 0.2s;
}

.nav-item.active {
  color: var(--ios-blue);
  opacity: 1;
}

.nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  color: var(--text-primary);
  transition: all 0.2s ease;
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.nav-btn:hover {
  background: rgba(255, 255, 255, 0.8);
  transform: scale(1.05);
}

.nav-btn:active {
  transform: scale(0.95);
}

.nav-btn-admin {
  color: var(--ios-blue);
}

.nav-btn-logout {
  color: var(--ios-red);
}

/* Cards & Glass Panels */
.glass-panel {
  background: rgba(255, 255, 255, 0.65);
  /* More translucent */
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border-radius: var(--radius-l);
  padding: 20px;
  margin-bottom: 20px;
  box-shadow:
    0 4px 6px rgba(0, 0, 0, 0.05),
    /* Soft ambient shadow */
    0 10px 15px rgba(0, 0, 0, 0.1),
    /* Deeper shadow for lift */
    inset 0 0 0 1px rgba(255, 255, 255, 0.5);
  /* Inner light border for glass edge */
  border: 1px solid rgba(255, 255, 255, 0.3);
  /* Outer border */
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border-radius: 40px;
  /* Pill shape */
  font-weight: 600;
  font-size: 17px;
  border: none;
  cursor: pointer;
  transition: transform 0.1s, opacity 0.2s;
  width: 100%;
  text-align: center;
}

.btn:active {
  transform: scale(0.98);
  opacity: 0.8;
}

.btn-primary {
  background-color: var(--ios-blue);
  color: white;
}

.btn-success {
  background-color: var(--ios-green);
  color: white;
}

.btn-danger {
  background-color: var(--ios-red);
  color: white;
}

/* Forms */
.form-group {
  margin-bottom: 20px;
}

label {
  display: block;
  font-size: 13px;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 8px;
  font-weight: 500;
  padding-left: 12px;
}

input[type="text"],
input[type="number"],
input[type="date"],
input[type="datetime-local"],
input[type="password"],
select {
  width: 100%;
  padding: 12px 16px;
  border-radius: 10px;
  border: none;
  background: rgba(255, 255, 255, 0.8);
  font-size: 17px;
  color: var(--text-primary);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.1);
  /* Inner border */
  -webkit-appearance: none;
  appearance: none;
}

input:focus,
select:focus {
  outline: none;
  box-shadow: inset 0 0 0 2px var(--ios-blue);
  background: white;
}

/* Lists (iOS Table View style) */
.ios-list {
  list-style: none;
  padding: 0;
  margin: 0;
  background: var(--bg-card);
  border-radius: var(--radius-m);
  overflow: hidden;
}

.ios-list-item {
  padding: 16px;
  border-bottom: 0.5px solid rgba(0, 0, 0, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.5);
}

.ios-list-item:last-child {
  border-bottom: none;
}

/* Typography */
h1 {
  font-size: 34px;
  font-weight: 700;
  margin-bottom: 20px;
  letter-spacing: -0.5px;
}

h2 {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 16px;
}

/* Utilities */
.text-center {
  text-align: center;
}

.mt-2 {
  margin-top: 16px;
}

.mb-2 {
  margin-bottom: 16px;
}

.w-100 {
  width: 100%;
}

/* Responsive */
@media (min-width: 768px) {
  .btn {
    width: auto;
    min-width: 120px;
  }
}
/* Button reset for nav-btn when used as button element */
button.nav-btn {
  padding: 0;
  margin: 0;
  font: inherit;
  cursor: pointer;
}
