/* assets/css/style.css */

:root {
  --primary-color: #092d5e; /* Deep Blue */
  --primary-dark: #051a36; /* Darker Blue for Footer/Hover */
  --secondary-color: #b1f1ff; /* Light Cyan */
  --accent-bg: #f4f7f6; /* Light Grey for backgrounds */
  --text-dark: #333333;
  --text-light: #ffffff;
  --border-color: rgba(255, 255, 255, 0.1);
  --transition: all 0.3s ease-in-out;
  --max-width: 1200px; /* The width limit for "Boxed" look */
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

body {
  background-color: var(--accent-bg);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* --- LAYOUT UTILITY (The Key Change) --- */
.container {
  max-width: var(--max-width);
  margin: 0 auto; /* Centers the content */
  padding: 0 20px; /* Left/Right Padding */
  width: 100%;
}

/* --- TOP BAR --- */
.top-bar {
  background-color: var(--secondary-color);
  color: var(--primary-color);
  padding: 8px 0; /* Padding handled by container */
  font-size: 0.9rem;
  font-weight: 600;
}

.top-bar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.top-bar a {
  color: var(--primary-color);
  text-decoration: none;
  margin-left: 20px;
  font-weight: 700;
}

/* --- HEADER --- */
header {
  background-color: var(--primary-color);
  padding: 15px 0;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Logo Styling */
.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.logo img {
  height: 45px;
  width: auto;
  object-fit: contain;
  background: transparent;
  padding: 3px;
  border-radius: 4px;
}

.logo h2 {
  color: white;
  font-size: 1.5rem;
  margin-left: 10px;
}

/* Nav Links */
.nav-links {
  list-style: none;
  display: flex;
  gap: 30px;
}

.nav-links li a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: var(--transition);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.nav-links li a:hover {
  color: var(--secondary-color);
}

.btn-nav {
  background-color: var(--secondary-color);
  color: var(--primary-color) !important;
  padding: 8px 25px;
  border-radius: 50px; /* Pill shape */
  font-weight: bold !important;
}

.btn-nav:hover {
  background-color: #fff !important;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.hamburger {
  display: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
}

/* --- MAIN CONTENT --- */
main {
  flex: 1;
}

/* --- PREMIUM FOOTER --- */
footer {
  background: var(--primary-dark); /* Darker blue for contrast */
  color: var(--text-light);
  margin-top: auto;
  border-top: 4px solid var(--secondary-color);
}

.footer-top {
  padding: 70px 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.2fr; /* Wider first/last columns */
  gap: 40px;
}

.footer-col h3 {
  color: var(--secondary-color);
  margin-bottom: 25px;
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 700;
}

.footer-col p {
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.8;
  margin-bottom: 20px;
  font-size: 0.95rem;
}

.footer-links li {
  list-style: none;
  margin-bottom: 12px;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  transition: var(--transition);
  display: flex;
  align-items: center;
}

.footer-links a:hover {
  color: var(--secondary-color);
  transform: translateX(5px);
}

.footer-links i {
  margin-right: 10px;
  color: var(--secondary-color);
  width: 20px;
}

/* Footer Social Icons */
.social-icons a {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border-radius: 50%;
  margin-right: 10px;
  transition: var(--transition);
  text-decoration: none;
}

.social-icons a:hover {
  background: var(--secondary-color);
  color: var(--primary-color);
}

/* Sub Footer */
.sub-footer {
  background-color: #020f1f; /* Very dark blue */
  padding: 20px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.85rem;
}

.sub-footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: rgba(255, 255, 255, 0.5);
}

.sub-links a {
  color: rgba(255, 255, 255, 0.5);
  text-decoration: none;
  margin-left: 20px;
  transition: var(--transition);
}

.sub-links a:hover {
  color: var(--secondary-color);
}

/* --- RESPONSIVE --- */
@media (max-width: 992px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .top-bar {
    display: none;
  }
  .hamburger {
    display: block;
  }

  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: var(--primary-color);
    flex-direction: column;
    align-items: center;
    max-height: 0;
    overflow: hidden;
  }
  .nav-links.active {
    padding: 20px 0;
    max-height: 500px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }
  .sub-footer-inner {
    flex-direction: column;
    gap: 10px;
  }
}

/* ==========================================
ADMIN DASHBOARD STYLES
============================================= */

/* --- ADMIN DASHBOARD STYLES --- */

/* 1. Layout Structure */
body.admin-body {
  display: flex;
  background-color: #f4f6f9;
  min-height: 100vh;
}

/* 2. Sidebar (Desktop Default) */
.admin-sidebar {
  width: 260px;
  background-color: var(--primary-color);
  color: white;
  height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
  overflow-y: auto;
  transition: transform 0.3s ease-in-out;
  box-shadow: 4px 0 10px rgba(0, 0, 0, 0.1);
}

/* Sidebar Logo Area */
.sidebar-header {
  padding: 20px;
  text-align: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.2);
}

.sidebar-header img {
  max-height: 50px;
  background: white;
  padding: 5px;
  border-radius: 4px;
}

/* Sidebar Links */
.sidebar-menu {
  list-style: none;
  padding: 0;
  margin-top: 10px;
}

.sidebar-menu li a {
  display: flex;
  align-items: center;
  padding: 15px 25px;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  border-left: 4px solid transparent;
  transition: all 0.3s;
}

.sidebar-menu li a:hover,
.sidebar-menu li a.active {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border-left-color: var(--secondary-color);
}

.sidebar-menu li a i {
  width: 30px;
  font-size: 1.1rem;
}

/* 3. Main Content Area */
.admin-main {
  flex: 1;
  margin-left: 260px; /* Width of sidebar */
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  transition: margin-left 0.3s ease-in-out;
}

/* 4. Admin Header */
.admin-topbar {
  background: white;
  padding: 15px 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  position: sticky;
  top: 0;
  z-index: 900;
}

.hamburger-btn {
  display: none; /* Hidden on Desktop */
  font-size: 1.5rem;
  color: var(--primary-color);
  cursor: pointer;
}

/* User Profile Dropdown */
.user-profile {
  position: relative;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-avatar {
  width: 40px;
  height: 40px;
  background: var(--secondary-color);
  color: var(--primary-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 1.2rem;
  position: relative;
}

/* Live Status Dot */
.status-dot {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 12px;
  height: 12px;
  background-color: #28a745; /* Green */
  border: 2px solid white;
  border-radius: 50%;
}

.user-info {
  text-align: right;
}
.user-info h4 {
  margin: 0;
  font-size: 0.9rem;
  color: #333;
}
.user-info small {
  color: #888;
  font-size: 0.75rem;
}

/* Dropdown Menu */
.profile-dropdown {
  position: absolute;
  top: 60px;
  right: 0;
  background: white;
  width: 200px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  padding: 10px 0;
  display: none; /* Hidden by default */
  border: 1px solid #eee;
}

.profile-dropdown.show {
  display: block;
}

.profile-dropdown a {
  display: block;
  padding: 10px 20px;
  color: #333;
  text-decoration: none;
  transition: background 0.2s;
}

.profile-dropdown a:hover {
  background-color: #f8f9fa;
  color: var(--primary-color);
}

/* 5. Overlay (For Mobile Sidebar) */
.sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
}

.sidebar-overlay.active {
  display: block;
}

/* --- RESPONSIVE MOBILE STYLES --- */
@media (max-width: 992px) {
  .admin-sidebar {
    transform: translateX(-100%); /* Hide sidebar off-screen */
  }

  .admin-sidebar.active {
    transform: translateX(0); /* Show sidebar */
  }

  .admin-main {
    margin-left: 0; /* Full width content */
  }

  .hamburger-btn {
    display: block; /* Show hamburger */
  }

  .user-info {
    display: none;
  } /* Hide name on small screens */
}
