/* ==========================================================
   Custom Styles — Color Palette
   --primary-dark:  #073b4c
   --primary:       #118ab2
   --primary-light: #06d6a0
   --accent:        #ef476f
   --accent-yellow: #ffd166
   ========================================================== */

:root {
  --primary-dark: #073b4c;
  --primary: #118ab2;
  --primary-light: #06d6a0;
  --accent: #ef476f;
  --accent-yellow: #ffd166;
  --bg: #f0f6f8;
  --text: #073b4c;
  --text-muted: #6c7a89;
  --white: #ffffff;
  --border: #d0e4ec;
  --shadow: 0 2px 16px rgba(7, 59, 76, 0.08);
  --shadow-lg: 0 8px 32px rgba(7, 59, 76, 0.14);
  --radius: 12px;
  --radius-sm: 8px;
  --transition: 0.2s ease;
}

/* --- Base --- */
body {
  font-family: 'Poppins', sans-serif;
  background-color: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--primary-dark);
  font-weight: 600;
}

a {
  color: var(--primary);
  transition: color var(--transition);
}

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

/* --- Navbar --- */
.navbar {
  background: var(--primary-dark) !important;
  border-bottom: 1px solid rgba(6, 214, 160, 0.2);
  padding: 0.75rem 0;
}

.navbar .navbar-brand {
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--white);
  letter-spacing: -0.02em;
}

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

.navbar .form-select {
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  padding: 0.35rem 2rem 0.35rem 0.75rem;
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--white);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.navbar .form-select:focus {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(6, 214, 160, 0.25);
}

.navbar .form-select option {
  background-color: var(--primary-dark);
  color: var(--white);
}

/* --- Hero Section --- */
.hero-section {
  padding: 4rem 0 3rem;
  text-align: center;
}

.hero-section h1 {
  font-size: 2.75rem;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 1rem;
}

.hero-section .lead {
  color: var(--text-muted);
  font-size: 1.15rem;
  max-width: 600px;
  margin: 0 auto 2rem;
  font-weight: 400;
}

.hero-section .hero-image {
  max-width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hero-section .hero-image:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(7, 59, 76, 0.2);
}

/* --- Cards & Panels --- */
.card-modern {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2rem;
  transition: transform var(--transition), box-shadow var(--transition);
}

.card-modern:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* --- Icon Cards --- */
.icon-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem 1rem;
  text-align: center;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.icon-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-light);
}

.icon-card i {
  color: var(--primary) !important;
  margin-bottom: 0.75rem;
  transition: color var(--transition);
}

.icon-card:hover i {
  color: var(--primary-light) !important;
}

.icon-card p {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
  margin: 0;
}

/* --- Section Headings --- */
.section-title {
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--primary-dark);
  margin-bottom: 1.5rem;
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 40px;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
}

.section-title.text-center::after {
  left: 50%;
  transform: translateX(-50%);
}

/* --- Table --- */
.table-modern {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.table-modern .table {
  margin-bottom: 0;
}

.table-modern .table thead {
  background: var(--primary-dark);
  color: var(--white);
}

.table-modern .table thead th {
  border: none;
  font-weight: 500;
  font-size: 0.9rem;
  padding: 0.85rem 1rem;
  letter-spacing: 0.02em;
}

.table-modern .table tbody tr {
  transition: background-color var(--transition);
}

.table-modern .table tbody tr:hover {
  background-color: rgba(6, 214, 160, 0.08);
}

.table-modern .table tbody td {
  padding: 0.8rem 1rem;
  font-size: 0.9rem;
  border-color: var(--border);
  vertical-align: middle;
}

/* --- Buttons --- */
.btn-primary {
  background-color: var(--primary);
  border-color: var(--primary);
  border-radius: var(--radius-sm);
  font-weight: 500;
  padding: 0.6rem 1.5rem;
  transition: all var(--transition);
}

.btn-primary:hover,
.btn-primary:focus {
  background-color: var(--primary-dark);
  border-color: var(--primary-dark);
  box-shadow: 0 4px 12px rgba(17, 138, 178, 0.35);
}

/* --- Alerts --- */
.alert {
  border-radius: var(--radius-sm);
  border: none;
  font-size: 0.9rem;
}

.alert-info {
  background-color: rgba(6, 214, 160, 0.12);
  color: var(--primary-dark);
}

.alert-warning {
  background-color: rgba(255, 209, 102, 0.25);
  color: #7a5c00;
}

.alert-danger {
  background-color: rgba(239, 71, 111, 0.1);
  color: #9b1a35;
}

/* --- Footer --- */
.footer {
  background: var(--primary-dark) !important;
  border-top: 1px solid rgba(6, 214, 160, 0.2);
  padding: 1.5rem 0;
  margin-top: auto;
}

.footer p {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.85rem;
  margin: 0;
}

/* --- Error Pages --- */
.error-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 70vh;
}

.error-page .error-code {
  font-size: 7rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.error-page h2 {
  font-size: 1.5rem;
  color: var(--primary-dark);
  margin-bottom: 1rem;
}

.error-page p {
  color: var(--text-muted);
  max-width: 400px;
  margin: 0 auto 2rem;
}

/* --- Language Selector --- */
.lang-globe-icon {
  color: rgba(255, 255, 255, 0.6);
}

.lang-select {
  width: auto;
}

/* --- Dashboard --- */
.dashboard-header {
  padding: 2.5rem 0 1.5rem;
}

.dashboard-header h1 {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 0.25rem;
}

.dashboard-welcome {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin: 0;
}

.dashboard-tiles {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  padding-bottom: 3rem;
}

.dashboard-tile {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-decoration: none;
  color: var(--text);
  width: 320px;
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.dashboard-tile:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-light);
  color: var(--text);
}

.dashboard-tile-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.dashboard-tile-icon i {
  color: var(--white);
  font-size: 1.4rem;
}

.dashboard-tile-body {
  flex: 1;
}

.dashboard-tile-body h2 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--primary-dark);
  margin: 0 0 0.2rem;
}

.dashboard-tile-body p {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0;
}

.dashboard-tile-arrow {
  color: var(--border);
  font-size: 0.85rem;
  transition: color var(--transition), transform var(--transition);
}

.dashboard-tile:hover .dashboard-tile-arrow {
  color: var(--primary-light);
  transform: translateX(3px);
}

/* --- Inner Pages --- */
.page-header {
  padding: 2.5rem 0 1.5rem;
}

.page-back {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-decoration: none;
  margin-bottom: 0.75rem;
  transition: color var(--transition);
}

.page-back:hover {
  color: var(--primary);
}

.page-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.page-header h1 {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--primary-dark);
  margin: 0;
}

.page-content {
  padding-bottom: 3rem;
}

/* --- Member Cards --- */
.member-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
  padding-bottom: 3rem;
}

.member-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: transform var(--transition), box-shadow var(--transition);
}

.member-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.member-card-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: var(--white);
  font-size: 1.1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 0.02em;
  flex-shrink: 0;
  overflow: hidden;
}

.member-card-avatar--photo {
  background: none;
  object-fit: cover;
}

/* --- Photo Upload --- */
.photo-upload-row {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.photo-preview {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 2px dashed var(--border);
  flex-shrink: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
}

.photo-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.member-card-name {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--primary-dark);
  margin: 0 0 0.75rem;
}

.member-card-info {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.member-card-info li {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.member-card-info i {
  width: 14px;
  text-align: center;
  color: var(--primary);
  flex-shrink: 0;
}

.member-card-actions {
  display: flex;
  gap: 0.25rem;
  justify-content: flex-end;
  border-top: 1px solid var(--border);
  padding-top: 0.75rem;
  margin-top: auto;
}

/* --- Icon Action Buttons --- */
.btn-icon {
  background: none;
  border: none;
  padding: 0.3rem 0.45rem;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  cursor: pointer;
  transition: color var(--transition), background var(--transition);
  font-size: 0.85rem;
}

.btn-icon:hover {
  color: var(--primary);
  background: rgba(17, 138, 178, 0.08);
}

.btn-icon-danger:hover {
  color: var(--accent);
  background: rgba(239, 71, 111, 0.08);
}

/* --- Alert success --- */
.alert-success {
  background-color: rgba(6, 214, 160, 0.12);
  color: #055a42;
}

/* --- Empty State --- */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-muted);
}

.empty-state-icon {
  font-size: 3.5rem;
  color: var(--border);
  margin-bottom: 1.25rem;
  display: block;
}

.empty-state h2 {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.empty-state p {
  font-size: 0.9rem;
  max-width: 320px;
  margin: 0 auto;
}

/* --- Login Page --- */
.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
}

.login-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 3rem 2.5rem;
  text-align: center;
  width: 100%;
  max-width: 420px;
}

.login-logo {
  margin-bottom: 1.5rem;
}

.login-logo-text {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary-dark);
  letter-spacing: -0.03em;
}

.login-title {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--primary-dark);
  margin-bottom: 0.5rem;
}

.login-subtitle {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 2rem;
}

.btn-google {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--white);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  transition: box-shadow var(--transition), border-color var(--transition);
  width: 100%;
  justify-content: center;
}

.btn-google:hover {
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
  color: var(--text);
}

.btn-google-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* --- Navbar user info --- */
.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.user-name {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.875rem;
  font-weight: 500;
}

.btn-logout {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.875rem;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--radius-sm);
  padding: 0.25rem 0.75rem;
  transition: all var(--transition);
}

.btn-logout:hover {
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.7);
}

/* --- Utility --- */
.bg-app {
  background-color: var(--bg);
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .hero-section h1 {
    font-size: 2rem;
  }

  .hero-section .lead {
    font-size: 1rem;
  }

  .card-modern {
    padding: 1.5rem;
  }
}
