/* ==========================================================================
   CSS STYLESHEET: QUẢN LÝ THI ĐUA BCH ĐOÀN TRƯỜNG THPT
   Color Scheme: Standard Youth Union (Blue #0056A6 & Flag Red #DA251D)
   Design Concept: Bright, Clean, Modern, Professional & Highly Readable
   ========================================================================== */

:root {
  --doan-blue: #0056a6;
  --doan-blue-hover: #004080;
  --doan-blue-light: #e6f0fa;
  --doan-red: #da251d;
  --doan-red-light: #fdeded;
  
  --bg-main: #f4f7fa;
  --card-bg: #ffffff;
  --border-color: #e2e8f0;
  
  --text-dark: #1e293b;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  
  --status-success: #10b981;
  --status-warning: #f59e0b;
  --status-danger: #ef4444;
  --status-info: #3b82f6;

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,86,166,0.08);
  --shadow-lg: 0 10px 25px rgba(0,86,166,0.12);
  
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

body {
  background-color: var(--bg-main);
  color: var(--text-dark);
  line-height: 1.5;
  min-height: 100vh;
}

/* Header Navbar */
.navbar {
  background: #ffffff;
  border-bottom: 2px solid var(--doan-blue);
  box-shadow: var(--shadow-sm);
  padding: 12px 24px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.navbar-container {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-badge {
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, var(--doan-blue), #003366);
  color: white;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  box-shadow: 0 2px 8px rgba(0, 86, 166, 0.3);
}

.brand-text h1 {
  font-size: 16px;
  font-weight: 700;
  color: var(--doan-blue);
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.brand-text p {
  font-size: 12px;
  color: var(--text-muted);
}

.user-profile-widget {
  display: flex;
  align-items: center;
  gap: 16px;
}

.user-info {
  text-align: right;
  line-height: 1.3;
}

.user-info .name {
  font-weight: 700;
  font-size: 14px;
  color: var(--text-dark);
}

.user-info .role-tag {
  font-size: 11px;
  color: var(--doan-blue);
  background: var(--doan-blue-light);
  padding: 2px 8px;
  border-radius: 12px;
  font-weight: 600;
  display: inline-block;
}

/* Main Layout */
.container {
  max-width: 1280px;
  margin: 24px auto;
  padding: 0 16px;
}

/* Cards & Panels */
.card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-md);
  margin-bottom: 24px;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 16px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
}

.card-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--doan-blue);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Buttons */
.btn {
  padding: 8px 16px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.btn-primary {
  background-color: var(--doan-blue);
  color: white;
}
.btn-primary:hover { background-color: var(--doan-blue-hover); }

.btn-danger {
  background-color: var(--doan-red-light);
  color: var(--doan-red);
  border-color: rgba(218, 37, 29, 0.2);
}
.btn-danger:hover { background-color: var(--doan-red); color: white; }

.btn-outline {
  background-color: white;
  border-color: var(--border-color);
  color: var(--text-dark);
}
.btn-outline:hover { background-color: #f8fafc; border-color: var(--text-muted); }

.btn-sm { padding: 5px 10px; font-size: 12px; }

/* Forms & Inputs */
.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text-dark);
}

.form-control {
  width: 100%;
  padding: 10px 14px;
  font-size: 14px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  outline: none;
  background-color: #fff;
  transition: border-color 0.2s ease;
}

.form-control:focus {
  border-color: var(--doan-blue);
  box-shadow: 0 0 0 3px rgba(0, 86, 166, 0.1);
}

/* Member Banner & Score Display */
.score-banner {
  background: linear-gradient(135deg, var(--doan-blue), #003366);
  color: white;
  border-radius: var(--radius-lg);
  padding: 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: var(--shadow-lg);
  margin-bottom: 24px;
}

.score-box {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  padding: 16px 28px;
  border-radius: var(--radius-md);
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.score-number {
  font-size: 42px;
  font-weight: 800;
  color: #ffeb3b;
  line-height: 1;
}

/* Data Tables */
.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13.5px;
}

.table th {
  background-color: #f8fafc;
  color: var(--text-muted);
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  padding: 12px 16px;
  border-bottom: 2px solid var(--border-color);
}

.table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-color);
  vertical-align: middle;
}

.table tbody tr:hover {
  background-color: var(--doan-blue-light);
}

/* Status Badges */
.badge {
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
  display: inline-block;
}
.badge-success { background: #d1fae5; color: #065f46; }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-danger { background: #fee2e2; color: #991b1b; }
.badge-info { background: #dbeafe; color: #1e40af; }

/* Modals */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 16px;
}

.modal-content {
  background: white;
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 550px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: modalFade 0.25s ease-out;
}
.modal-lg { max-width: 800px; }

@keyframes modalFade {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

.modal-header {
  padding: 16px 24px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f8fafc;
}

.modal-body { padding: 20px 24px; max-height: 75vh; overflow-y: auto; }

.modal-footer {
  padding: 14px 24px;
  background: #f8fafc;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* Utility Helpers */
.hidden { display: none !important; }
.text-muted { color: var(--text-muted); }
.text-danger { color: var(--doan-red); }
.text-success { color: var(--status-success); }
.font-mono { font-family: monospace; font-weight: 700; }