/* Complete redesign with dark blue professional theme from design inspiration */

/* Import Plus Jakarta Sans from Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #0a1628;
  --primary-light: #1a2b45;
  --secondary: #ff6b35;
  --accent: #4a90e2;
  --success: #10b981;
  --danger: #ef4444;
  --warning: #f59e0b;

  --background: #0f1c2e;
  --card: #1a2b45;
  --card-hover: #243550;
  --border: #2d3e5f;

  --text: #e5e7eb;
  --text-muted: #9ca3af;
  --text-dark: #1f2937;

  --shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.4);
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--background);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Login Page */
.login-container {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  position: relative;
  overflow: hidden;
}

.background-effects {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.effect-circle {
  position: absolute;
  border-radius: 50%;
  opacity: 0.1;
}

.effect-1 {
  width: 400px;
  height: 400px;
  background: var(--secondary);
  top: -100px;
  left: -100px;
  filter: blur(80px);
}

.effect-2 {
  width: 500px;
  height: 500px;
  background: var(--accent);
  bottom: -150px;
  right: -150px;
  filter: blur(100px);
}

.login-card {
  background: var(--card);
  backdrop-filter: blur(10px);
  padding: 40px;
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 450px;
  border: 1px solid var(--border);
  position: relative;
  z-index: 1;
}

.logo-section {
  text-align: center;
  margin-bottom: 32px;
}

.logo-icon {
  font-size: 48px;
  margin-bottom: 16px;
  display: inline-block;
  padding: 16px;
  background: rgba(74, 144, 226, 0.1);
  border-radius: 16px;
  border: 2px solid rgba(74, 144, 226, 0.2);
}

.logo-section h1 {
  color: var(--text);
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 8px;
}

.subtitle {
  color: var(--text-muted);
  font-size: 14px;
}

/* Tabs */
.tabs {
  display: flex;
  margin-bottom: 24px;
  background: var(--primary);
  padding: 4px;
  border-radius: 8px;
  gap: 4px;
}

.tab-btn {
  flex: 1;
  padding: 12px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border-radius: 6px;
  transition: background 0.2s ease, color 0.2s ease;
  outline: none;
  box-shadow: none;
}

.tab-btn.active {
  background: var(--card);
  color: var(--text);
}

.tab-btn:focus {
  outline: none;
}

/* Forms */
.login-form { display: none; }
.login-form.active { display: block; }

.form-group { margin-bottom: 20px; }
.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: var(--text);
  font-size: 14px;
}
.form-group input,
.form-group select {
  width: 100%;
  padding: 12px 16px;
  background: var(--primary);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  color: var(--text);
  transition: all 0.3s;
}
.form-group input::placeholder { color: var(--text-muted); }
.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

/* Buttons */
.btn {
  width: 100%;
  padding: 14px 24px;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.btn-primary { background: var(--accent); color: white; }
.btn-primary:hover { background: #3b7bc7; transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-secondary { background: var(--secondary); color: white; }
.btn-secondary:hover { background: #e55a2a; transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-success { background: var(--success); color: white; padding: 8px 16px; font-size: 13px; width: auto; }
.btn-danger { background: var(--danger); color: white; padding: 8px 16px; font-size: 13px; width: auto; }
.btn-warning { background: var(--warning); color: var(--text-dark); padding: 8px 16px; font-size: 13px; width: auto; }
.btn-icon { font-size: 18px; }

/* Dashboard Layout */
.dashboard { min-height: 100vh; display: flex; flex-direction: column; }
.dashboard-header { background: var(--card); border-bottom: 1px solid var(--border); padding: 16px 24px; box-shadow: var(--shadow); position: sticky; top: 0; z-index: 100; }
.header-content { display: flex; justify-content: space-between; align-items: center; max-width: 1600px; margin: 0 auto; }
.header-content h1 { font-size: 22px; color: var(--text); font-weight: 700; }
.header-actions { display: flex; align-items: center; gap: 16px; }
.user-name { font-size: 14px; color: var(--text-muted); font-weight: 500; }
.dashboard-container { display: flex; flex: 1; max-width: 1600px; width: 100%; margin: 0 auto; background: var(--background); }

/* Mobile Menu Button */
.mobile-menu-btn {
  display: none;
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 24px;
  cursor: pointer;
  padding: 8px;
  margin-right: 12px;
}

@media (max-width: 767px) {
  .mobile-menu-btn {
    display: block;
  }

  .header-content h1 {
    font-size: 18px;
  }

  .user-name {
    display: none;
  }
}

/* Mobile Menu Overlay */
.mobile-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
}

.mobile-overlay.active {
  display: block;
}

/* Sidebar Navigation */
.sidebar {
  background: var(--card);
  border-right: 1px solid var(--border);
  padding: 24px 0;
}

/* Desktop sidebar */
@media (min-width: 768px) {
  .sidebar {
    width: 260px;
  }
}

/* Mobile sidebar - hide by default, show as full width when active */
@media (max-width: 767px) {
  .sidebar {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: 1000;
    padding-top: 70px;
  }

  .sidebar.mobile-open {
    display: block;
  }
}

.nav-btn {
  width: 100%;
  padding: 14px 24px;
  border: none;
  background: transparent;
  text-align: left;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-muted);
  border-left: 3px solid transparent;
}
.nav-btn:hover { background: var(--card-hover); color: var(--text); }
.nav-btn.active { background: rgba(74, 144, 226, 0.1); color: var(--accent); border-left-color: var(--accent); }
.nav-btn .icon { font-size: 20px; }

/* Main Content */
.main-content {
  flex: 1;
  padding: 32px;
  overflow-y: auto;
}

@media (max-width: 767px) {
  .main-content {
    padding: 16px;
  }
}
.content-section { display: none; }
.content-section.active { display: block; }
.section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; flex-wrap: wrap; gap: 16px; }
.section-header h2 { font-size: 28px; color: var(--text); font-weight: 700; }

/* Tables */
.table-container

/* Modal Backdrop Enhancement */
.modal-backdrop {
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* Modal Styling - Glassmorphism Effect */
.modal-content {
  background: rgba(15, 28, 46, 0.85) !important;
  backdrop-filter: blur(30px) saturate(150%);
  -webkit-backdrop-filter: blur(30px) saturate(150%);
  border: 1px solid rgba(74, 144, 226, 0.4);
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6),
              0 0 80px rgba(74, 144, 226, 0.1);
}

.modal-header {
  background: rgba(10, 22, 40, 0.6) !important;
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border-bottom: 1px solid rgba(74, 144, 226, 0.3);
  color: var(--text) !important;
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
}

.modal-header .modal-title {
  color: var(--text) !important;
  font-weight: 600;
}

.modal-header .btn-close {
  filter: brightness(0) invert(1);
  opacity: 0.9;
}

.modal-header .btn-close:hover {
  opacity: 1;
}

.modal-body {
  background: transparent !important;
  color: var(--text) !important;
}

.modal-footer {
  background: rgba(10, 22, 40, 0.4) !important;
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border-top: 1px solid rgba(74, 144, 226, 0.3);
  border-bottom-left-radius: 16px;
  border-bottom-right-radius: 16px;
}

/* Add Recipient Form Styling */
#addRecipientForm {
  background: transparent;
  padding: 0;
}

#addRecipientForm .form-label {
  color: #e5e7eb !important;
  font-weight: 600;
  margin-bottom: 8px;
  font-size: 14px;
}

#addRecipientForm input,
#addRecipientForm select {
  background: var(--primary);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  padding: 12px 16px;
  font-size: 14px;
  transition: all 0.3s;
}

#addRecipientForm input::placeholder {
  color: var(--text-muted);
}

#addRecipientForm input:focus,
#addRecipientForm select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.2);
  outline: none;
}

#addRecipientForm .btn-primary {
  background: var(--accent);
  color: white;
  font-weight: 600;
  border-radius: 8px;
  padding: 12px 20px;
}

#addRecipientForm .btn-primary:hover {
  background: #3b7bc7;
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

#addRecipientForm .btn-secondary {
  background: var(--secondary);
  color: white;
  font-weight: 600;
  border-radius: 8px;
  padding: 12px 20px;
}

#addRecipientForm .btn-secondary:hover {
  background: #e55a2a;
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

/* Success and Error Messages */
.success-message,
.error-message {
  margin-top: 1rem;
}

.success-message .alert-success {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(16, 185, 129, 0.05));
  border: 1px solid var(--success);
  color: #10b981;
  border-radius: 8px;
  padding: 12px 16px;
  font-weight: 500;
}

.error-message .alert-danger {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), rgba(239, 68, 68, 0.05));
  border: 1px solid var(--danger);
  color: #ef4444;
  border-radius: 8px;
  padding: 12px 16px;
  font-weight: 500;
}

.alert .btn-close {
  filter: brightness(0) invert(1);
  opacity: 0.7;
}

.alert .btn-close:hover {
  opacity: 1;
}
