:root {
  --primary: #6366f1;
  --primary-hover: #4f46e5;
  --bg: #0b0f1a;
  --card-bg: rgba(22, 30, 48, 0.6);
  --text: #f8fafc;
  --text-dim: #94a3b8;
  --border: rgba(255, 255, 255, 0.08);
  --glass: rgba(255, 255, 255, 0.02);
  --success: #10b981;
  --error: #ef4444;
  --sidebar-w: 260px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Outfit', sans-serif;
}

body {
  background: var(--bg);
  background-image: 
    radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.12) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(139, 92, 246, 0.1) 0px, transparent 50%);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

/* Auth Styles */
.auth-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 20px;
}

.auth-card {
  background: var(--card-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  padding: 48px;
  border-radius: 32px;
  width: 100%;
  max-width: 480px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
  animation: slideUp 0.6s ease-out;
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

.auth-card h1 {
  font-size: 2.8rem;
  margin-bottom: 8px;
  text-align: center;
  background: linear-gradient(135deg, #818cf8 0%, #c084fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 800;
}

.auth-card h2 {
  text-align: center;
  margin-bottom: 32px;
  font-size: 1.2rem;
  color: var(--text-dim);
  font-weight: 400;
}

.auth-card input {
  width: 100%;
  padding: 16px;
  margin-bottom: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 16px;
  color: white;
  outline: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.auth-card input:focus {
  border-color: var(--primary);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.auth-card button {
  width: 100%;
  padding: 16px;
  background: linear-gradient(135deg, var(--primary) 0%, #4f46e5 100%);
  border: none;
  border-radius: 16px;
  color: white;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 10px;
  box-shadow: 0 10px 15px -3px rgba(99, 102, 241, 0.3);
}

.auth-card button:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 20px 25px -5px rgba(99, 102, 241, 0.4);
}

.auth-card button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

/* Dashboard Layout */
.app-container {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  min-height: 100vh;
}

.sidebar {
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(30px);
  border-right: 1px solid var(--border);
  padding: 40px 24px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}

.nav-links {
  list-style: none;
  margin-top: 48px;
  flex-grow: 1;
}

.nav-links li {
  padding: 14px 20px;
  border-radius: 14px;
  margin-bottom: 10px;
  cursor: pointer;
  color: var(--text-dim);
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 14px;
  font-weight: 500;
}

.nav-links li i {
  font-size: 1.1rem;
  width: 24px;
  text-align: center;
}

.nav-links li:hover {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
}

.nav-links li.active {
  background: rgba(99, 102, 241, 0.1);
  color: var(--primary);
  box-shadow: inset 0 0 0 1px rgba(99, 102, 241, 0.2);
}

.content {
  padding: 48px;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 48px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-bottom: 48px;
}

.stat-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  padding: 32px;
  border-radius: 24px;
  transition: all 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-5px);
  border-color: rgba(99, 102, 241, 0.3);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2);
}

.stat-card h3 {
  font-size: 0.85rem;
  color: var(--text-dim);
  margin-bottom: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.stat-card p {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text);
}

/* Tables */
.table-wrapper {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

table {
  width: 100%;
  border-collapse: collapse;
}

th {
  text-align: left;
  padding: 20px 24px;
  background: rgba(255, 255, 255, 0.01);
  color: var(--text-dim);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.5px;
}

td {
  padding: 20px 24px;
  border-top: 1px solid var(--border);
  color: var(--text);
  font-size: 0.95rem;
}

tr:hover {
  background: rgba(255, 255, 255, 0.015);
}

.btn-icon {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  color: var(--text-dim);
  cursor: pointer;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.btn-icon:hover {
  background: rgba(239, 68, 68, 0.1);
  color: var(--error);
  border-color: rgba(239, 68, 68, 0.2);
}

/* Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-content {
  background: #111827;
  border: 1px solid var(--border);
  padding: 40px;
  border-radius: 32px;
  width: 100%;
  max-width: 500px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  animation: scaleIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes scaleIn {
  from { transform: scale(0.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.modal-content h2 {
    margin-bottom: 24px;
    font-size: 1.5rem;
}

.modal-content input, .modal-content select {
    width: 100%;
    margin-bottom: 16px;
    padding: 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: white;
    outline: none;
}

.modal-content input:focus {
    border-color: var(--primary);
}

.primary-btn {
    padding: 12px 24px;
    background: linear-gradient(135deg, var(--primary) 0%, #4f46e5 100%);
    border: none;
    border-radius: 12px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(99, 102, 241, 0.4);
}

/* Transitions */
.v-enter-active, .v-leave-active {
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.v-enter-from {
  opacity: 0;
  transform: translateY(10px);
}

.v-leave-to {
  opacity: 0;
  transform: translateY(-10px);
}

.badge {
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-paid { background: rgba(16, 185, 129, 0.1); color: var(--success); }
.badge-unpaid { background: rgba(239, 68, 68, 0.1); color: var(--error); }
.badge-partial { background: rgba(245, 158, 11, 0.1); color: #f59e0b; }
