/* Essential resets and base styling */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #111;
  color: #eee;
  line-height: 1.6;
  padding: 10px;
}

/* Header with logo, profile icon, hamburger */
header {
  background-color: #1a1a1a;
  padding: 15px 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #444;
  flex-wrap: wrap;
  position: relative;
  z-index: 1500;
}
.logo {
  font-size: 1.5em;
  font-weight: bold;
  color: #00f2ff;
}
.menu-icon {
  display: none;
  font-size: 28px;
  cursor: pointer;
  color: #00f2ff;
  margin-left: auto;
  padding: 10px;
}

/* Navigation links */
nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
nav a {
  color: #ddd;
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 8px;
  transition: background 0.3s;
  font-size: 0.95em;
  background-color: #222;
  margin-left: 20px;
  font-weight: bold;
}
nav a:hover {
  background-color: #333;
  color: #00f2ff;
}

/* Core layout container */
.container {
  margin: 40px auto;
  padding: 20px;
  max-width: 960px;
  text-align: center;
  background: #1e1e1e;
  border-radius: 12px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.4);
}

/* Headers */
h1, h2, h3 {
  color: #00f2ff;
  margin-bottom: 10px;
  text-align: center;
  font-size: 2em;
}

/* Inputs and forms */
input[type="text"], input[type="email"], input[type="password"], select {
  width: 100%;
  max-width: 400px;
  padding: 10px 15px;
  margin: 10px auto;
  display: block;
  background: #222;
  color: #fff;
  border: 1px solid #444;
  border-radius: 6px;
  font-size: 0.95em;
}
button, .cta-button {
  background: #00f2ff;
  border: none;
  padding: 10px 20px;
  margin-top: 20px;
  font-size: 1em;
  cursor: pointer;
  color: #000;
  font-weight: bold;
  border-radius: 6px;
  text-decoration: none;
  display: inline-block;
  transition: background-color 0.3s ease;
  max-width: 200px;
}
button:hover {
  background-color: #00a2cc;
}

/* Table and risk levels */
table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 15px;
  background-color: #1a1a1a;
}
th, td {
  padding: 12px;
  text-align: center;
  border: 1px solid #444;
}
th {
  background-color: #111;
  color: cyan;
}
td {
  color: #ccc;
}
tr:hover {
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
  transform: scale(1.01);
  transition: all 0.2s ease-in-out;
}
tr.risk-low    { background-color: #eaffea; }
tr.risk-medium { background-color: #fffbe6; }
tr.risk-high   { background-color: #ffe6e6; }

.risk-low    { background-color: #e0f7e9; }
.risk-medium { background-color: #fff4d3; }
.risk-high   { background-color: #ffd6d6; }

.risk-cell::before {
  font-weight: bold;
}
.risk-cell.risk-low::before    { content: "🟢 "; }
.risk-cell.risk-medium::before { content: "🟠 "; }
.risk-cell.risk-high::before   { content: "🔴 "; }

/* Post gallery and modals */
.post-gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}
.post-gallery a {
  width: 160px;
  height: 160px;
  overflow: hidden;
  border-radius: 10px;
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.25);
}
.post-gallery img.post-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.2s ease-in-out;
}
.post-gallery img.post-img:hover {
  transform: scale(1.05);
}
.modal {
  position: fixed;
  z-index: 999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.85);
}
.modal-content {
  background-color: #111;
  margin: 15% auto;
  padding: 20px;
  border: 1px solid #333;
  width: 60%;
  border-radius: 10px;
}
.close {
  color: #aaa;
  float: right;
  font-size: 28px;
  cursor: pointer;
}

/* Profile icon and dropdown */
.profile-area {
  position: relative;
  margin-left: auto;
}
.profile-icon {
  width: 32px;
  height: 32px;
  cursor: pointer;
  border-radius: 50%;
  border: 2px solid #00f2ff;
}
.profile-dropdown {
  position: absolute;
  top: 45px;
  right: 0;
  background-color: #222;
  border: 1px solid #444;
  border-radius: 6px;
  width: 160px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  box-shadow: 0 2px 12px rgba(0,0,0,0.6);
}
.profile-dropdown a {
  padding: 10px 15px;
  color: #eee;
  text-decoration: none;
  font-size: 0.9em;
  border-bottom: 1px solid #333;
}
.profile-dropdown a:hover {
  background-color: #333;
  color: #00f2ff;
}
.hidden {
  display: none;
}

/* Mobile Fix */
@media (max-width: 768px) {
 
.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  width: 100%;
}


.menu-icon {
  font-size: 28px;
  color: #00f2ff;
  cursor: pointer;
  padding: 0 8px;
}

.profile-area {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: auto;
}
 
	
	.menu-icon {
  font-size: 26px;
  color: #00f2ff;
  cursor: pointer;
  margin: 0 12px 0 auto;
}
	
  
  nav {
    display: none;
    flex-direction: column;
    width: 100%;
    background-color: #1a1a1a;
    padding: 10px 0;
  }
  nav.active {
    display: flex;
  }
  nav a {
    width: 90%;
    margin: 6px auto;
    padding: 12px 16px;
    font-size: 1em;
    background-color: #222;
    color: #00f2ff;
    text-align: center;
  }
  header {
    flex-direction: column;
    align-items: flex-start;
  }
  
  
.logo {
  font-size: 1.3em;
  font-weight: bold;
  color: #00f2ff;
}
  
  
  #testimonial-rotator {
    flex-direction: column;
    align-items: center;
  }

  .testimonial {
    max-width: 90%;
  }

  .banner {
    max-width: 90vw;
  }

  .video-section {
    padding: 0 10px;
  }
  
  .image-upload-form form {
    flex-direction: column;
    align-items: center;
  }
  
  header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #1a1a1a;
    padding: 12px 16px;
    flex-wrap: nowrap;
  }

  .logo {
    margin-bottom: 0;
    font-size: 1.3em;
  }

  .menu-icon {
    display: block;
    font-size: 28px;
    cursor: pointer;
    color: #00f2ff;
    margin-right: 10px;
  }

  .profile-area {
  margin-left: 12px;
}
  
  .top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
}

.logo {
  font-size: 1.3em;
  font-weight: bold;
  color: #00f2ff;
  margin-right: auto;
}

.menu-icon {
  font-size: 26px;
  color: #00f2ff;
  cursor: pointer;
  margin: 0 12px;
}

.profile-area {
  margin-left: auto;
}


.logo {
  font-size: 1.3em;
  font-weight: bold;
  color: #00f2ff;
}

.menu-icon {
  display: block;
  font-size: 26px;
  color: #00f2ff;
  cursor: pointer;
}

.profile-area {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: auto;
}

.profile-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid #00f2ff;
  cursor: pointer;
}


  nav {
    display: none;
    flex-direction: column;
    width: 100%;
    background-color: #1a1a1a;
    padding: 10px 0;
  }

  nav.active {
    display: flex;
  }

  nav a {
    width: 90%;
    margin: 6px auto;
    padding: 12px 16px;
    font-size: 1em;
    background-color: #222;
    color: #00f2ff;
    text-align: center;
  }
  
  
}

/* Sidebar Desktop Layout */
@media (min-width: 769px) {
  #mainNav {
    position: fixed;
	  top: 0;
	  left: 0;
	  width: 220px;
	  height: 100vh;
	  background-color: #1a1a1a;
	  display: flex;
	  flex-direction: column;
	  flex-wrap: nowrap; /* 🔥 force items in one column */
	  overflow-y: auto;
	  padding-top: 80px;
	  gap: 8px; /* keep vertical gap, but no wrapping */
  }

  #mainNav a {
    width: 90%;                /* ⬅ make sure buttons are same width */
	  margin: 4px auto;          /* ⬅ center inside the sidebar */
	  padding: 12px;
	  background-color: #222;
	  border-radius: 8px;
	  color: #ddd;
	  font-weight: bold;
	  font-size: 0.95em;
	  white-space: nowrap;
	  overflow: hidden;
	  text-overflow: ellipsis;
  }

  #mainNav a:hover {
    background-color: #333;
    color: #00f2ff;
  }

  .top-bar {
    position: fixed;
    left: 220px;
    right: 0;
    top: 0;
    height: 60px;
    background-color: #1a1a1a;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    z-index: 1100;
    border-bottom: 1px solid #333;
  }

  .container {
    margin-left: 240px;
    padding: 20px;
  }
}


/* Main layout balance */
main {
  max-width: 1024px;
  margin: auto;
}

/* Responsive image & video */
.banner {
  width: 100%;
  max-width: 600px;
  height: auto;
  margin: 30px 0;
}

/* Testimonial layout */
.testimonial-section {
  margin-top: 30px;
  margin-bottom: 30px;
}
.testimonial-section h2 {
  color: #00f2ff;
  font-size: 1.8em;
  margin-bottom: 20px;
}

#testimonial-rotator {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
}
.testimonial {
  background-color: #222;
  padding: 15px;
  border-radius: 10px;
  max-width: 250px;
  flex: 1;
  color: #ccc;
  text-align: left;
  box-shadow: 0 0 8px rgba(0,0,0,0.3);
}
.testimonial img {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  margin-bottom: 10px;
}

/* Video section */
.video-section {
  margin-top: 30px;
  margin-bottom: 30px;
  display: flex;
  justify-content: center;
}
.video-section video {
  width: 100%;
  max-width: 720px;
  border-radius: 8px;
}

/* Footer alignment */
footer {
  margin-top: 40px;
}


.image-upload-form {
  display: flex;
  justify-content: center;
  margin-top: 40px;
}

.image-upload-form form {
  display: flex;
  gap: 20px;
  align-items: center;
  flex-wrap: wrap;
  background-color: #1a1a1a;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(255,255,255,0.05);
}

.image-upload-form input[type="file"] {
  color: #eee;
  background-color: #222;
  border: 1px solid #444;
  padding: 8px;
  border-radius: 6px;
  max-width: 260px;
}

.image-upload-form button {
  background: #00f2ff;
  border: none;
  padding: 10px 20px;
  font-size: 1em;
  cursor: pointer;
  color: #000;
  font-weight: bold;
  border-radius: 6px;
  transition: background-color 0.3s ease;
}

.image-upload-form button:hover {
  background-color: #00a2cc;
}

.edit-profile-form {
  max-width: 500px;
  margin: auto;
  display: flex;
  flex-direction: column;
  gap: 15px;
}


.container {
  max-width: 600px;
  margin: 20px auto;
  background-color: #1e1e1e;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0,0,0,0.4);
  color: #fff;
}

.edit-profile-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.edit-profile-form input,
.edit-profile-form button {
  padding: 12px;
  font-size: 1em;
  border: none;
  border-radius: 5px;
}

.edit-profile-form input {
  background: #333;
  color: #fff;
}

.edit-profile-form button {
  background-color: #00f2ff;
  color: #000;
  font-weight: bold;
  cursor: pointer;
}

.edit-profile-form button:hover {
  background-color: #00c2cc;
}

@media (max-width: 768px) {
  .container {
    width: 90%;
    margin: 20px auto;
  }
}

/* Mobile Responsive Fixes */
@media (max-width: 768px) {
  .container {
    width: 90%;
    margin: 0 auto;
    padding: 15px;
  }

  .edit-profile-box {
    background-color: #1a1a1a;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 0 10px rgba(0,0,0,0.6);
    max-width: 100%;
    width: 100%;
  }

  .edit-profile-box input {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border-radius: 6px;
    border: none;
    background-color: #222;
    color: #fff;
    font-size: 16px;
  }

  .edit-profile-box h2 {
    font-size: 22px;
    margin-bottom: 20px;
    color: #0ff;
    text-align: center;
  }

  .edit-profile-box button {
    width: 100%;
    padding: 12px;
    background-color: #00e0ff;
    border: none;
    color: #000;
    font-weight: bold;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
  }
}

/* Edit Profile Styling */
.edit-profile-box {
  background-color: #1a1a1a;
  padding: 25px;
  border-radius: 12px;
  max-width: 480px;
  margin: 30px auto;
  box-shadow: 0 0 12px rgba(0, 255, 255, 0.2);
  text-align: center;
}

.edit-profile-box h2 {
  font-size: 24px;
  color: #00e0ff;
  margin-bottom: 20px;
}

.edit-profile-box input {
  width: 100%;
  padding: 12px;
  margin-bottom: 16px;
  font-size: 16px;
  border: none;
  border-radius: 6px;
  background-color: #222;
  color: #eee;
}

.edit-profile-box button {
  width: 100%;
  padding: 12px;
  background-color: #00e0ff;
  border: none;
  border-radius: 6px;
  color: #000;
  font-weight: bold;
  font-size: 16px;
  cursor: pointer;
}

.success-msg {
  color: #00ff99;
  font-weight: bold;
  margin-bottom: 10px;
}

.error-msg {
  color: #ff4444;
  font-weight: bold;
  margin-bottom: 10px;
}

/* Responsive Enhancements */
@media (max-width: 768px) {
  .edit-profile-box {
    width: 90%;
    padding: 20px;
  }

  .edit-profile-box h2 {
    font-size: 20px;
  }

  .edit-profile-box input,
  .edit-profile-box button {
    font-size: 15px;
  }
}

.post-img {
  max-width: 100px;
  height: 200px;
  border-radius: 8px;
  box-shadow: 0 0 5px rgba(255, 255, 255, 0.3);
}

#loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #111;
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    z-index: 9999;
}

.spinner {
    border: 6px solid #444;
    border-top: 6px solid #fff;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin-bottom: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@media (min-width: 1200px){
  #mainNav { padding-right: 12px; overflow-x: hidden; }

  /* Key fixes */
  #mainNav a{
    display: block;
    width: auto;                  /* don't force 100% width */
    box-sizing: border-box;       /* include padding + border in width calc */
    overflow: visible;            /* don't clip the text */
    white-space: nowrap;          /* one line */
    padding-right: 14px;          /* breathing room near scrollbar */
  }
}

/* ====== NAVIGATION & TOP BAR ====== */
.nav-header {
  background: #0e0e0e;
  color: #fff;
}

.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
}

.logo {
  font-weight: 800;
  font-size: 22px;
  color: #5ee7ff;
}

.menu-icon {
  font-size: 26px;
  cursor: pointer;
}

.profile-area {
  position: relative;
}

.profile-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
}

.profile-dropdown {
  position: absolute;
  right: 0;
  top: 42px;
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
  border-radius: 8px;
  padding: 8px 0;
  min-width: 180px;
}

.profile-dropdown a {
  display: block;
  padding: 8px 12px;
  color: #fff;
  text-decoration: none;
}

.profile-dropdown a:hover {
  background: #242424;
}

.hidden {
  display: none;
}

/* ====== MOBILE NAVIGATION ====== */
#mainNav {
  padding: 10px;
  display: none;
}

#mainNav.active {
  display: block;
}

#mainNav a {
  display: block;
  padding: 11px 12px;
  margin: 6px 0;
  border-radius: 10px;
  background: #171717;
  color: #e9f3f4;
  text-decoration: none;
  border: 1px solid #242424;
}

/* ====== DESKTOP NAVIGATION ====== */
@media (min-width: 1200px) {
  /* hide hamburger */
  .menu-icon {
    display: none;
  }

  /* always show menu */
  #mainNav {
    display: block;
    padding: 12px;
    width: 260px;
    overflow-x: hidden;
  }

  /* nav groups */
  #mainNav .nav-group {
    margin-bottom: 14px;
    padding-bottom: 6px;
    border-bottom: 1px solid #1c1c1c;
  }

  #mainNav .nav-group:last-child {
    border-bottom: 0;
  }

  #mainNav .nav-heading {
    margin: 8px 6px 6px;
    font-size: 12px;
    font-weight: 800;
    color: #5ee7ff;
    text-transform: uppercase;
    letter-spacing: .6px;
    opacity: .95;
  }

  /* desktop links */
  #mainNav a {
    width: auto;
    box-sizing: border-box;
    padding: 11px 14px;
    margin: 6px 6px;
    white-space: nowrap;
    padding-right: 16px;
    transition: background .2s, border-color .2s, transform .04s;
  }

  @media (hover:hover) {
    #mainNav a:hover {
      background: #1d1d1d;
      border-color: #2e2e2e;
      transform: translateY(-1px);
    }
  }

  /* active link */
  #mainNav a.active {
    background: #0b2b2f;
    border-color: #0e3b41;
    box-shadow: 0 0 0 1px #0e3b41 inset;
  }
}

/* ===== Admin Dashboard Polish ===== */
body { background:#0e0e0e; color:#e8e8e8; }
.container {
  max-width: 1120px;
  margin: 40px auto;
  padding: 0 16px;
}
.hero h1, .hero h2 { text-align:center; margin: 8px 0 16px; }

/* Cards */
.card {
  background:#141414; border:1px solid #2c2c2c; border-radius:14px;
  padding:16px; margin:18px 0;
  box-shadow: 0 6px 20px rgba(0,0,0,0.28);
}

/* Forms & controls */
input[type="text"], textarea, select {
  width:100%;
  background:#1d1d1d; color:#f0f0f0; border:1px solid #3c3c3c;
  border-radius:8px; padding:10px 12px; outline:none;
}
input[type="text"]::placeholder { color:#9a9a9a; }
.inline-form { display:inline-flex; gap:10px; align-items:center; flex-wrap:wrap; }
label.small { font-size:12px; color:#a0a0a0; }

/* Buttons */
button, .btn {
  display:inline-block; border:0; border-radius:12px; padding:8px 14px;
  background:#00d1ff; color:#051319; font-weight:700; cursor:pointer;
  transition: transform .04s ease, filter .15s ease;
}
button:hover, .btn:hover { filter:brightness(1.1); }
button:active, .btn:active { transform: translateY(1px); }
.btn-danger { background:#ff4d4d; color:#fff; }

/* Tables */
.table-wrap { overflow-x:auto; -webkit-overflow-scrolling:touch; border-radius:12px; }
table {
  width:100%; border-collapse:separate; border-spacing:0; min-width:920px;
  background:#121212; border:1px solid #2b2b2b; border-radius:12px; overflow:hidden;
}
thead th {
  position:sticky; top:0; z-index:1; background:#1b1b1b; color:#f5f5f5;
  text-align:left; padding:12px; border-bottom:1px solid #2b2b2b;
}
tbody td { padding:12px; border-bottom:1px solid #222; vertical-align:middle; }
tbody tr:nth-child(even) { background:#121519; }
tbody tr:hover { background:#151a20; }
td input[type="checkbox"] { transform: scale(1.2); }

/* Flash banners */
.flash { background:#e6f7ff; border:1px solid #91d5ff; color:#003a8c;
         padding:10px 14px; border-radius:10px; margin: 10px auto; max-width:1120px; }
.flash.err { background:#fff1f0; border-color:#ffa39e; color:#a8071a; }
