:root {
  /* Elegant Beige & Gold Palette */
  --primary: #2D2D2D;
  --primary-hover: #1a1a1a;
  --accent: #C2A878;
  --accent-hover: #B39968;

  --bg-surface: #FAF3E0;
  --bg-subtle: #F5EDD5;
  --bg-border: #E8DDBF;

  --text-main: #2D2D2D;
  --text-muted: #6B6B6B;
  --text-on-dark: #FAF3E0;

  --success: #7D9B76;
  --warning: #D4A574;
  --danger: #C17B7B;

  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;

  --shadow-sm: 0 1px 2px 0 rgba(45, 45, 45, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(45, 45, 45, 0.1), 0 2px 4px -1px rgba(45, 45, 45, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(45, 45, 45, 0.1), 0 4px 6px -2px rgba(45, 45, 45, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(45, 45, 45, 0.1), 0 10px 10px -5px rgba(45, 45, 45, 0.04);

  --primary-glow: rgba(194, 168, 120, 0.2);
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(20px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(-8px);
  }
}

/* Base */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background-color: var(--bg-surface);
  color: var(--text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.15s;
}

a:hover {
  color: var(--accent-hover);
}

/* Dashboard Specific Styles */
.dashboard-wrap {
  min-height: 100vh;
  background: linear-gradient(135deg, #FAF3E0 0%, #F5EDD5 50%, #EFE4C8 100%);
  background-attachment: fixed;
  padding: 2rem;
  position: relative;
  overflow-x: hidden;
}

.dashboard-wrap::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(circle at 20% 50%, rgba(194, 168, 120, 0.08), transparent 25%),
    radial-gradient(circle at 80% 80%, rgba(212, 165, 116, 0.08), transparent 25%),
    radial-gradient(circle at 40% 20%, rgba(194, 168, 120, 0.06), transparent 25%);
  pointer-events: none;
  animation: float 20s ease-in-out infinite;
}

.dashboard-container {
  max-width: 1400px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.dashboard-header {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 20px;
  padding: 1.5rem 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 8px 32px 0 rgba(194, 168, 120, 0.12), 0 2px 8px 0 rgba(45, 45, 45, 0.04);
  border: 1px solid rgba(194, 168, 120, 0.2);
  display: flex;
  justify-content: space-between;
  align-items: center;
  animation: fadeIn 0.5s ease-out;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 2rem;
  animation: fadeIn 0.6s ease-out 0.1s backwards;
}

/* Profile Card */
.profile-card {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 24px;
  padding: 2rem;
  box-shadow: 0 20px 60px 0 rgba(194, 168, 120, 0.15), 0 8px 24px 0 rgba(45, 45, 45, 0.06);
  border: 1px solid rgba(194, 168, 120, 0.25);
  position: relative;
  overflow: hidden;
  animation: fadeIn 0.7s ease-out 0.2s backwards;
}

.profile-card::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.08) 0%, transparent 70%);
  animation: float 15s ease-in-out infinite;
}

.profile-avatar-section {
  text-align: center;
  margin-bottom: 2rem;
  position: relative;
  z-index: 1;
}

.profile-avatar-wrapper {
  position: relative;
  display: inline-block;
  margin-bottom: 1rem;
}

.profile-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid rgba(194, 168, 120, 0.3);
  box-shadow: 0 8px 32px rgba(194, 168, 120, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.profile-avatar:hover {
  transform: scale(1.05);
  box-shadow: 0 12px 48px rgba(194, 168, 120, 0.3);
}

.avatar-edit-btn {
  position: absolute;
  bottom: 5px;
  right: 5px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #C2A878 0%, #B39968 100%);
  color: white;
  border: 3px solid white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(194, 168, 120, 0.3);
}

.avatar-edit-btn:hover {
  background: linear-gradient(135deg, #B39968 0%, #A68858 100%);
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(194, 168, 120, 0.5);
}

.profile-name {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
  color: #0f172a;
}

.profile-meta {
  color: #64748b;
  font-size: 0.875rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-top: 1.5rem;
  position: relative;
  z-index: 1;
}

.stat-box {
  background: linear-gradient(135deg, #FFFBF3 0%, #FFF8E7 100%);
  border-radius: 16px;
  padding: 1rem;
  text-align: center;
  transition: all 0.3s ease;
  border: 1px solid rgba(194, 168, 120, 0.15);
}

.stat-box:hover {
  transform: translateY(-4px);
  background: linear-gradient(135deg, #FFF8E7 0%, #FFEDC2 100%);
  box-shadow: 0 8px 24px rgba(194, 168, 120, 0.15);
}

.stat-label {
  font-size: 0.75rem;
  color: #C2A878;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.stat-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: #2D2D2D;
}

/* Content Cards */
.content-section {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.summary-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  animation: fadeInRight 0.8s ease-out 0.3s backwards;
}

.summary-card {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 20px;
  padding: 1.75rem;
  box-shadow: 0 8px 32px 0 rgba(194, 168, 120, 0.1), 0 2px 8px 0 rgba(45, 45, 45, 0.04);
  border: 1px solid rgba(194, 168, 120, 0.2);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.summary-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 16px 48px 0 rgba(194, 168, 120, 0.18), 0 4px 16px 0 rgba(45, 45, 45, 0.06);
}

.summary-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, #C2A878 0%, #D4A574 50%, #B39968 100%);
}

.summary-card::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 100px;
  height: 100px;
  background: radial-gradient(circle, rgba(194, 168, 120, 0.08) 0%, transparent 70%);
  border-radius: 50%;
  transform: translate(50%, -50%);
}

.card-title {
  font-size: 0.875rem;
  color: #C2A878;
  margin-bottom: 0.5rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.card-value {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  color: #2D2D2D;
}

.card-subtitle {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.data-card {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 20px;
  padding: 2rem;
  box-shadow: 0 8px 32px 0 rgba(194, 168, 120, 0.1), 0 2px 8px 0 rgba(45, 45, 45, 0.04);
  border: 1px solid rgba(194, 168, 120, 0.2);
  animation: fadeInRight 0.9s ease-out 0.4s backwards;
}

.data-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid rgba(194, 168, 120, 0.2);
}

.data-card-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #2D2D2D;
}

.data-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.data-item {
  background: linear-gradient(135deg, rgba(255, 251, 243, 0.8) 0%, rgba(255, 248, 231, 0.8) 100%);
  border-radius: 16px;
  padding: 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.3s ease;
  border: 1px solid rgba(194, 168, 120, 0.15);
}

.data-item:hover {
  background: linear-gradient(135deg, rgba(255, 248, 231, 0.9) 0%, rgba(255, 237, 194, 0.9) 100%);
  box-shadow: 0 8px 24px rgba(194, 168, 120, 0.15);
  transform: translateX(8px);
  border-color: rgba(194, 168, 120, 0.25);
}

.data-item-content h4 {
  font-weight: 600;
  margin-bottom: 0.25rem;
  color: #2D2D2D;
}

.data-item-meta {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.badge {
  padding: 0.5rem 1rem;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 600;
}

.badge-paid {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(5, 150, 105, 0.15) 100%);
  color: #047857;
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.badge-due {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.15) 0%, rgba(220, 38, 38, 0.15) 100%);
  color: #dc2626;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

/* Buttons */
.btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  padding: 0.625rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: 12px;
  cursor: pointer;
  border: none;
  transition: all 0.3s ease;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.btn-primary {
  background: linear-gradient(135deg, #C2A878 0%, #B39968 100%);
  color: white;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #B39968 0%, #A68858 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(194, 168, 120, 0.3);
}

.btn-secondary {
  background: white;
  color: var(--text-main);
  border: 1px solid rgba(194, 168, 120, 0.3);
}

.btn-secondary:hover {
  background: rgba(255, 251, 243, 1);
  border-color: rgba(194, 168, 120, 0.5);
  transform: translateY(-2px);
}

.btn-danger {
  background: linear-gradient(135deg, #C17B7B 0%, #B06B6B 100%);
  color: white;
}

.btn-danger:hover {
  background: linear-gradient(135deg, #B06B6B 0%, #9F5B5B 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(193, 123, 123, 0.3);
}

.btn-success {
  background: linear-gradient(135deg, #7D9B76 0%, #6D8B66 100%);
  color: white;
}

.btn-success:hover {
  background: linear-gradient(135deg, #6D8B66 0%, #5D7B56 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(125, 155, 118, 0.3);
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.8125rem;
}

.w-100 {
  width: 100%;
}

/* Modal for Profile Picture */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn 0.3s ease-out;
}

.modal-overlay.active {
  display: flex;
}

.modal-content {
  background: white;
  border-radius: var(--radius-xl);
  padding: 2rem;
  max-width: 600px;
  width: 90%;
  box-shadow: var(--shadow-xl);
  animation: fadeIn 0.3s ease-out;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.modal-title {
  font-size: 1.5rem;
  font-weight: 700;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-muted);
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s;
}

.modal-close:hover {
  background: var(--bg-subtle);
  color: var(--text-main);
}

.crop-container {
  max-width: 100%;
  max-height: 400px;
  margin-bottom: 1.5rem;
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.modal-actions {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
}

/* Form Elements */
.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--text-main);
}

.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--text-main);
  background-color: #fff;
  border: 1px solid var(--bg-border);
  border-radius: var(--radius-md);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

/* Responsive */
@media (max-width: 1024px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-header {
    flex-direction: column;
    gap: 1rem;
  }
}

@media (max-width: 768px) {
  .dashboard-wrap {
    padding: 1rem;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .summary-cards {
    grid-template-columns: 1fr;
  }
}

/* Glass Effect Utilities */
.glass-panel {
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.1);
  border-radius: var(--radius-lg);
  padding: 40px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.glass-panel:hover {
  box-shadow: 0 12px 48px 0 rgba(31, 38, 135, 0.15);
  transform: translateY(-2px);
}

.glass-input {
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(4px);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  width: 100%;
  font-size: 15px;
  color: var(--text-main);
  transition: all 0.2s ease;
}

.glass-input:focus {
  background: rgba(255, 255, 255, 0.9);
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-glow);
  outline: none;
}

.hover-lift {
  transition: transform 0.2s ease;
}

.hover-lift:hover {
  transform: translateY(-3px);
}

.bg-mesh-glass {
  background-color: #f0fdfa;
  background-image:
    radial-gradient(at 0% 0%, hsla(192, 100%, 50%, 0.2) 0px, transparent 50%),
    radial-gradient(at 100% 100%, hsla(268, 100%, 60%, 0.2) 0px, transparent 50%),
    radial-gradient(at 50% 50%, hsla(340, 100%, 76%, 0.1) 0px, transparent 50%);
  background-attachment: fixed;
}

.bg-shape {
  position: fixed;
  border-radius: 50%;
  filter: blur(70px);
  z-index: -1;
  opacity: 0.6;
}

.shape-1 {
  background: #60a5fa;
  width: 400px;
  height: 400px;
  top: -100px;
  right: -100px;
  animation: float 10s infinite;
}

.shape-2 {
  background: #a78bfa;
  width: 300px;
  height: 300px;
  bottom: -50px;
  left: -50px;
  animation: float 14s infinite reverse;
}

.centered-layout {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}

/* Split Screen Layouts */
.split-screen {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
  width: 100%;
}

.split-visual {
  background-color: #0f172a;
  background-image: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 48px;
  color: white;
  overflow: hidden;
}

.split-visual::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at top right, rgba(59, 130, 246, 0.15), transparent 40%),
    radial-gradient(circle at bottom left, rgba(6, 182, 212, 0.1), transparent 40%);
  pointer-events: none;
}

.split-content {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  background: var(--bg-surface);
}

.login-wrapper {
  width: 100%;
  max-width: 400px;
}

.heading-xl {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.5px;
  line-height: 1.2;
  margin-bottom: 16px;
}

.heading-lg {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.3px;
  margin-bottom: 8px;
}

.text-body {
  color: var(--text-muted);
  font-size: 15px;
  margin-bottom: 32px;
}

/* Admin Dashboard Support */
.app-wrap {
  display: flex;
  min-height: 100vh;
  background: var(--bg-subtle);
}

.sidebar {
  width: 260px;
  background: var(--primary);
  color: white;
  display: flex;
  flex-direction: column;
  padding: 24px;
  flex-shrink: 0;
}

.sidebar .brand {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 32px;
  color: white;
  display: block;
}

.nav-item {
  display: flex;
  align-items: center;
  padding: 12px;
  margin-bottom: 4px;
  color: #94a3b8;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
}

.nav-item:hover,
.nav-item.active {
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

.content {
  flex: 1;
  padding: 32px;
  overflow-y: auto;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--bg-border);
}

.card {
  background: white;
  border: 1px solid var(--bg-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  margin-bottom: 24px;
  overflow: hidden;
}

.card-header {
  padding: 16px 24px;
  border-bottom: 1px solid var(--bg-border);
  font-weight: 600;
  font-size: 16px;
}

.card-body {
  padding: 24px;
}

.row-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
  margin-bottom: 32px;
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table th {
  text-align: left;
  padding: 12px 16px;
  font-size: 13px;
  color: var(--text-muted);
  text-transform: uppercase;
  border-bottom: 1px solid var(--bg-border);
  font-weight: 600;
}

.table td {
  padding: 16px;
  border-bottom: 1px solid var(--bg-border);
  font-size: 14px;
  color: var(--text-main);
}

.table tr:last-child td {
  border-bottom: none;
}

@media (max-width: 900px) {
  .split-screen {
    grid-template-columns: 1fr;
  }

  .split-visual {
    display: none;
  }

  .app-wrap {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    flex-direction: row;
    align-items: center;
    overflow-x: auto;
    padding: 16px;
  }

  .sidebar .brand {
    margin-bottom: 0;
    margin-right: 20px;
  }
}