/* KBPDM2 Website - Modern Professional Styles */
:root {
  --primary: #1a5f2a;
  --primary-dark: #0d3b18;
  --primary-light: #2e8b45;
  --accent: #f4a261;
  --accent-dark: #e76f51;
  --bg: #f8f9fa;
  --bg-card: #ffffff;
  --text: #212529;
  --text-muted: #6c757d;
  --border: #dee2e6;
  --success: #28a745;
  --danger: #dc3545;
  --info: #17a2b8;
  --shadow: 0 4px 12px rgba(0,0,0,0.1);
  --radius: 10px;
  --transition: all 0.3s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

/* ===== HEADER & NAV ===== */
.top-bar {
  background: var(--primary-dark);
  color: #fff;
  padding: 6px 20px;
  font-size: 0.85rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.top-bar a { color: #fff; opacity: 0.9; }
.top-bar a:hover { opacity: 1; text-decoration: underline; }

.header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 15px;
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: 1px;
}

.logo-icon {
  width: 42px;
  height: 42px;
  background: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: var(--primary-dark);
}

/* Main Navigation */
.main-nav ul {
  list-style: none;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.main-nav a {
  color: #fff;
  padding: 8px 14px;
  border-radius: 6px;
  font-weight: 500;
  font-size: 0.95rem;
}

.main-nav a:hover,
.main-nav a.active {
  background: rgba(255,255,255,0.2);
}

/* Tools Bar */
.tools-bar {
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 8px 20px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.tools-bar .tool-btn {
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 0.85rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
}

.tools-bar .tool-btn:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* Menu Bar (secondary / locations) */
.menu-bar {
  background: var(--primary-light);
  padding: 10px 20px;
  overflow-x: auto;
}

.menu-bar ul {
  list-style: none;
  display: flex;
  gap: 6px;
  flex-wrap: nowrap;
  min-width: max-content;
}

.menu-bar a {
  color: #fff;
  padding: 7px 14px;
  border-radius: 20px;
  font-size: 0.88rem;
  white-space: nowrap;
  background: rgba(255,255,255,0.15);
}

.menu-bar a:hover,
.menu-bar a.active {
  background: #fff;
  color: var(--primary-dark);
  font-weight: 600;
}

/* ===== MAIN CONTENT ===== */
.main-content {
  flex: 1;
  padding: 25px 20px;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}

.page-title {
  font-size: 1.9rem;
  color: var(--primary-dark);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.page-subtitle {
  color: var(--text-muted);
  margin-bottom: 25px;
}

/* Cards Grid */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.card {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: var(--transition);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

.card-img {
  height: 160px;
  background: linear-gradient(135deg, #a8e6cf, #56ab2f);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 3rem;
  position: relative;
}

.card-img.placeholder {
  background: linear-gradient(135deg, #d4d4d4, #9e9e9e);
}

.card-body {
  padding: 18px;
}

.card-body h3 {
  margin-bottom: 8px;
  color: var(--primary-dark);
}

.card-body p {
  font-size: 0.92rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.btn {
  display: inline-block;
  padding: 9px 18px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.9rem;
  border: none;
  cursor: pointer;
  transition: var(--transition);
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--primary-dark);
}

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

.btn-accent:hover {
  background: var(--accent-dark);
  color: #fff;
}

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

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

/* ===== GALLERY SLIDESHOW ===== */
.gallery-section {
  margin: 30px 0;
}

.gallery-section h2 {
  color: var(--primary-dark);
  margin-bottom: 15px;
}

.slideshow-container {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.slide {
  display: none;
  width: 100%;
  height: 380px;
  background: linear-gradient(135deg, #56ab2f, #a8e6cf);
  color: #fff;
  font-size: 2rem;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
  padding: 20px;
}

.slide.active {
  display: flex;
}

.slide-number {
  position: absolute;
  top: 12px;
  left: 16px;
  background: rgba(0,0,0,0.4);
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 0.85rem;
}

.prev, .next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.5);
  color: #fff;
  border: none;
  padding: 14px 16px;
  cursor: pointer;
  font-size: 1.3rem;
  border-radius: 4px;
  transition: var(--transition);
}

.prev { left: 12px; }
.next { right: 12px; }

.prev:hover, .next:hover {
  background: rgba(0,0,0,0.8);
}

.dots {
  text-align: center;
  padding: 14px 0;
}

.dot {
  height: 12px;
  width: 12px;
  margin: 0 5px;
  background: #bbb;
  border-radius: 50%;
  display: inline-block;
  cursor: pointer;
  transition: var(--transition);
}

.dot.active, .dot:hover {
  background: var(--primary);
}

/* Image placeholders grid */
.img-placeholders {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 15px;
  margin-top: 20px;
}

.img-box {
  height: 150px;
  background: linear-gradient(135deg, #e0e0e0, #bdbdbd);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #666;
  font-size: 0.9rem;
  border: 2px dashed #999;
}

/* ===== FORMS ===== */
.form-container {
  max-width: 500px;
  margin: 0 auto;
  background: var(--bg-card);
  padding: 30px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.form-container h2 {
  text-align: center;
  color: var(--primary-dark);
  margin-bottom: 20px;
}

.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  font-size: 0.92rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 1rem;
  transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26,95,42,0.15);
}

.form-actions {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

.form-actions .btn {
  flex: 1;
  text-align: center;
}

.alert {
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 18px;
  font-size: 0.95rem;
}

.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;
}

/* Dashboard / Tables */
.table-responsive {
  overflow-x: auto;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

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

th, td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

th {
  background: var(--primary);
  color: #fff;
  font-weight: 600;
}

tr:hover {
  background: #f1f8f3;
}

/* Stats cards */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 18px;
  margin-bottom: 30px;
}

.stat-card {
  background: #fff;
  padding: 20px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-align: center;
  border-top: 4px solid var(--primary);
}

.stat-card .number {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
}

.stat-card .label {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Footer */
.footer {
  background: var(--primary-dark);
  color: #fff;
  padding: 30px 20px 15px;
  margin-top: auto;
}

.footer-content {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 25px;
  margin-bottom: 20px;
}

.footer h4 {
  margin-bottom: 12px;
  color: var(--accent);
}

.footer a {
  color: rgba(255,255,255,0.8);
  display: block;
  margin-bottom: 6px;
  font-size: 0.9rem;
}

.footer a:hover {
  color: #fff;
}

.footer-bottom {
  text-align: center;
  padding-top: 15px;
  border-top: 1px solid rgba(255,255,255,0.15);
  font-size: 0.85rem;
  opacity: 0.8;
}

/* Auth pages specific */
.auth-wrapper {
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px 15px;
  background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
}

/* Responsive */
@media (max-width: 768px) {
  .header {
    flex-direction: column;
    text-align: center;
  }
  .main-nav ul {
    justify-content: center;
  }
  .slide {
    height: 260px;
    font-size: 1.4rem;
  }
  .page-title {
    font-size: 1.5rem;
  }
}

/* Utility */
.hidden { display: none !important; }
.text-center { text-align: center; }
.mt-20 { margin-top: 20px; }
.mb-20 { margin-bottom: 20px; }
.flex-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}