/* ========================================
   Protect Platform - Clean Professional Theme
   Inspired by MyHubCares design
   ======================================== */

/* ==================== CSS Variables ==================== */
:root {
  /* Primary Colors - Clean & Professional */
  --primary-color: #2c7da0;        /* Professional blue */
  --primary-dark: #1e5a7a;         /* Darker blue */
  --primary-light: #61a5c2;        /* Light blue */

  /* Accent Colors */
  --accent-color: #52b788;         /* Soft green accent */
  --accent-secondary: #f77f00;     /* Warm orange for CTAs */

  /* Neutral Colors */
  --background: #ffffff;
  --background-secondary: #f8f9fa;
  --background-tertiary: #e9ecef;

  /* Text Colors */
  --text-primary: #2b2d42;
  --text-secondary: #6c757d;
  --text-light: #8d99ae;

  /* Border & Shadow */
  --border-color: #dee2e6;
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.12);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.15);

  /* Spacing */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 1.5rem;
  --spacing-lg: 2rem;
  --spacing-xl: 3rem;

  /* Border Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;

  /* Typography */
  --font-primary: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-bold: 600;
}

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

body {
  font-family: var(--font-primary);
  background: var(--background);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ==================== Navigation ==================== */
.navbar {
  background: var(--background);
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.navbar .logo {
  color: var(--primary-color);
  font-size: 1.5rem;
  font-weight: var(--font-weight-bold);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}

.navbar .logo i {
  color: var(--accent-color);
}

.navbar ul {
  list-style: none;
  display: flex;
  gap: 2rem;
  align-items: center;
}

.navbar a {
  color: var(--text-primary);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: var(--font-weight-medium);
  transition: color 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.navbar a:hover {
  color: var(--primary-color);
}

.navbar a i {
  font-size: 0.9rem;
  color: var(--primary-light);
}

.navbar .btn-primary {
  background: var(--primary-color);
  color: white;
  padding: 0.6rem 1.2rem;
  border-radius: var(--radius-md);
  transition: all 0.3s ease;
}

.navbar .btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.navbar .btn-admin {
  background: var(--accent-secondary);
  color: white;
  padding: 0.6rem 1.2rem;
  border-radius: var(--radius-md);
}

/* ==================== User Sidebar Layout (Admin Style) ==================== */
.user-layout {
  display: flex;
  min-height: 100vh;
}

.user-sidebar {
  width: 280px;
  background: #1a1d29;
  padding: 0;
  position: fixed;
  height: 100vh;
  overflow-y: auto;
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
  z-index: 1000;
}

.user-sidebar .sidebar-logo {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  color: white;
  font-size: 1.5rem;
  font-weight: 700;
  padding: 1.5rem;
  margin-bottom: 0;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border-bottom: 3px solid var(--accent-color);
}

.user-sidebar .sidebar-logo i {
  font-size: 1.8rem;
  color: var(--accent-color);
}

.user-sidebar .sidebar-nav-section {
  margin: 1.5rem 0;
  padding: 0 1rem;
}

.user-sidebar .sidebar-nav-section h3 {
  color: #8b92a7;
  font-size: 0.75rem;
  text-transform: uppercase;
  padding: 0 0.75rem;
  margin-bottom: 0.75rem;
  letter-spacing: 1.2px;
  font-weight: 600;
}

.user-sidebar a {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.875rem 1rem;
  color: #cbd5e0;
  text-decoration: none;
  transition: all 0.3s ease;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 500;
  margin-bottom: 0.25rem;
}

.user-sidebar a i {
  width: 22px;
  text-align: center;
  font-size: 1.1rem;
}

.user-sidebar a:hover {
  background: rgba(44, 125, 160, 0.15);
  color: white;
  transform: translateX(5px);
}

.user-sidebar a.active {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
  color: white;
  box-shadow: 0 4px 12px rgba(44, 125, 160, 0.3);
}

.user-sidebar a.admin-link {
  background: rgba(247, 127, 0, 0.1);
  color: var(--accent-secondary);
  border: 1px solid rgba(247, 127, 0, 0.3);
}

.user-sidebar a.admin-link:hover {
  background: var(--accent-secondary);
  color: white;
}

.user-main-content {
  flex: 1;
  margin-left: 280px;
  padding: 2.5rem;
  background: var(--background-secondary);
  min-height: 100vh;
}

/* Page Header for Sidebar Layout */
.user-main-content .page-header {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  color: white;
  padding: 2.5rem;
  border-radius: 16px;
  margin-bottom: 2.5rem;
  box-shadow: 0 4px 20px rgba(44, 125, 160, 0.2);
}

.user-main-content .page-header h1 {
  font-size: 2.25rem;
  margin-bottom: 0.75rem;
  font-weight: 700;
}

.user-main-content .page-header p {
  font-size: 1.05rem;
  opacity: 0.95;
  line-height: 1.6;
}

/* Content area within sidebar layout */
.user-main-content .content-wrapper {
  background: white;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: var(--shadow-sm);
}

/* ==================== Hero Section ==================== */
.hero {
  position: relative;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  color: white;
  text-align: center;
  padding: 5rem 2rem;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="40" height="40" patternUnits="userSpaceOnUse"><path d="M 40 0 L 0 0 0 40" fill="none" stroke="rgba(255,255,255,0.05)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
  opacity: 0.3;
}

.hero-content {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
}

.hero h1 {
  font-size: 3rem;
  line-height: 1.2;
  margin-bottom: 1rem;
  font-weight: var(--font-weight-bold);
}

.hero .accent {
  color: var(--accent-color);
}

.hero p {
  font-size: 1.25rem;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 2rem;
  line-height: 1.6;
}

.hero .cta-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ==================== Buttons ==================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.75rem;
  border-radius: var(--radius-md);
  text-decoration: none;
  font-weight: var(--font-weight-medium);
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
  font-size: 1rem;
}

.btn-primary {
  background: var(--accent-secondary);
  color: white;
}

.btn-primary:hover {
  background: #e67300;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: white;
  color: var(--primary-color);
  border: 2px solid white;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

.btn-outline {
  background: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

.btn-outline:hover {
  background: var(--primary-color);
  color: white;
}

/* ==================== Info Section ==================== */
.info-section {
  background: var(--background-secondary);
  padding: 4rem 2rem;
}

.info-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 3rem;
}

.info-image {
  flex: 1 1 400px;
}

.info-image img {
  width: 100%;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

.info-text {
  flex: 1 1 400px;
}

.info-text h2 {
  font-size: 2.25rem;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
  line-height: 1.3;
}

.info-text h2 .accent {
  color: var(--primary-color);
}

.info-text p {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  line-height: 1.7;
}

/* ==================== Cards ==================== */
.cards-section {
  padding: 4rem 2rem;
  background: var(--background);
}

.cards-container {
  max-width: 1200px;
  margin: 0 auto;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
  border: 1px solid var(--border-color);
}

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

.card-icon {
  width: 60px;
  height: 60px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--primary-light), var(--primary-color));
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.card-icon i {
  font-size: 1.5rem;
  color: white;
}

.card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}

.card p {
  color: var(--text-secondary);
  line-height: 1.6;
}

.card-value {
  font-size: 2rem;
  font-weight: var(--font-weight-bold);
  color: var(--primary-color);
  margin: 0.5rem 0;
}

/* ==================== Dashboard Styles ==================== */
.dashboard {
  background: var(--background-secondary);
  min-height: 100vh;
  padding: 2rem;
}

.dashboard-header {
  max-width: 1200px;
  margin: 0 auto 2rem;
}

.dashboard-header h1 {
  font-size: 2.5rem;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.dashboard-header p {
  color: var(--text-secondary);
  font-size: 1.1rem;
}

.dashboard-content {
  max-width: 1200px;
  margin: 0 auto;
}

/* ==================== Tables ==================== */
table {
  width: 100%;
  background: white;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border-collapse: collapse;
}

thead {
  background: var(--background-tertiary);
}

th {
  padding: 1rem;
  text-align: left;
  font-weight: var(--font-weight-medium);
  color: var(--text-primary);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

td {
  padding: 1rem;
  border-top: 1px solid var(--border-color);
  color: var(--text-secondary);
}

tr:hover {
  background: var(--background-secondary);
}

/* ==================== Forms ==================== */
.form-container {
  max-width: 500px;
  margin: 2rem auto;
  background: white;
  padding: 2.5rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.form-group {
  margin-bottom: 1.5rem;
}

label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: var(--font-weight-medium);
  color: var(--text-primary);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="time"],
textarea,
select {
  width: 100%;
  padding: 0.85rem;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-family: var(--font-primary);
  transition: all 0.3s ease;
  background: var(--background);
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(44, 125, 160, 0.1);
}

/* ==================== Footer ==================== */
.footer {
  background: var(--text-primary);
  color: white;
  text-align: center;
  padding: 3rem 2rem;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
}

.footer .tagline {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  font-weight: var(--font-weight-medium);
}

.footer .tagline .accent {
  color: var(--accent-color);
}

.footer .social {
  margin: 2rem 0;
  display: flex;
  gap: 1.5rem;
  justify-content: center;
}

.footer .social a {
  color: white;
  font-size: 1.5rem;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
}

.footer .social a:hover {
  background: var(--primary-color);
  transform: translateY(-3px);
}

.footer .links {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer .links a {
  color: rgba(255, 255, 255, 0.8);
  margin: 0 1rem;
  font-size: 0.9rem;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer .links a:hover {
  color: white;
}

/* ==================== Alerts & Messages ==================== */
.alert {
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.alert-success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.alert-error {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.alert-info {
  background: #d1ecf1;
  color: #0c5460;
  border: 1px solid #bee5eb;
}

.alert-warning {
  background: #fff3cd;
  color: #856404;
  border: 1px solid #ffeeba;
}

/* ==================== Responsive Design ==================== */
@media (max-width: 1024px) {
  .user-sidebar {
    transform: translateX(-280px);
    transition: transform 0.3s ease;
  }

  .user-sidebar.active {
    transform: translateX(0);
  }

  .user-main-content {
    margin-left: 0;
  }

  /* Mobile menu toggle button */
  .mobile-menu-toggle {
    display: block;
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 1001;
    background: var(--primary-color);
    color: white;
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: var(--shadow-md);
  }
}

@media (min-width: 1025px) {
  .mobile-menu-toggle {
    display: none;
  }
}

@media (max-width: 768px) {
  .navbar {
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
  }

  .navbar ul {
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero p {
    font-size: 1rem;
  }

  .info-container {
    flex-direction: column;
  }

  .cards-grid {
    grid-template-columns: 1fr;
  }

  .dashboard {
    padding: 1rem;
  }

  .user-main-content {
    padding: 1rem;
  }

  .user-main-content .page-header {
    padding: 1.5rem;
  }

  .user-main-content .page-header h1 {
    font-size: 1.75rem;
  }

  table {
    font-size: 0.85rem;
  }

  th, td {
    padding: 0.5rem;
  }
}

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

.text-primary {
  color: var(--primary-color);
}

.text-accent {
  color: var(--accent-color);
}

.mt-1 { margin-top: var(--spacing-xs); }
.mt-2 { margin-top: var(--spacing-sm); }
.mt-3 { margin-top: var(--spacing-md); }
.mt-4 { margin-top: var(--spacing-lg); }

.mb-1 { margin-bottom: var(--spacing-xs); }
.mb-2 { margin-bottom: var(--spacing-sm); }
.mb-3 { margin-bottom: var(--spacing-md); }
.mb-4 { margin-bottom: var(--spacing-lg); }

.p-1 { padding: var(--spacing-xs); }
.p-2 { padding: var(--spacing-sm); }
.p-3 { padding: var(--spacing-md); }
.p-4 { padding: var(--spacing-lg); }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.section {
  padding: 4rem 2rem;
}

/* ==================== Back Button ==================== */
.back-button {
  position: fixed;
  top: 120px;
  left: 2rem;
  z-index: 999;
  background: var(--primary-color);
  color: white;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  font-size: 1.2rem;
  text-decoration: none;
}

.back-button:hover {
  background: var(--primary-dark);
  transform: translateX(-5px);
  box-shadow: var(--shadow-lg);
}

.back-button i {
  color: white;
}

@media (max-width: 768px) {
  .back-button {
    top: auto;
    bottom: 2rem;
    left: 1rem;
    width: 45px;
    height: 45px;
    font-size: 1rem;
  }
}
