/* ================================
   GLOBAL LAYOUT
================================ */

:root {
  --bg: #f5f5f5;
  --card-bg: #ffffff;
  --text: #222;
  --text-light: #555;
  --border: #ddd;
  --primary: #1a1a1a;
  --primary-hover: #333;
  --radius: 10px;
  --shadow: 0 4px 12px rgba(0,0,0,0.08);
  --transition: 0.2s ease;
  --spacing: 20px;
}

body {
  font-family: "Inter", "Poppins", Arial, sans-serif;
  color: var(--text);
  margin: 0;
  padding: 0 !important;
  line-height: 1.6;
  background: #f5f5f5 !important;
  min-height: 100vh;
  color: #222;
}

/* Admin login page content wrapper */
#loginForm {
  max-width: 420px;
  width: min(95%, 420px);
  margin: 120px auto 20px;
  padding: 30px 24px;
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}

#loginForm label {
  display: block;
  margin-bottom: 14px;
  color: #2c2c2c;
  font-weight: 500;
}

#loginForm input {
  width: 100%;
  padding: 12px 14px;
  margin-top: 6px;
  border: 1px solid rgba(170, 170, 170, 0.6);
  border-radius: 8px;
  background: #fff;
  color: #222;
  box-sizing: border-box;
}

#loginForm input:focus {
  outline: 2px solid rgba(34, 102, 182, 0.55);
  background: #fff;
}

@media (max-width: 500px) {
  #loginForm {
    margin: 100px auto 16px;
    padding: 20px;
  }

  #loginForm input {
    padding: 10px 12px;
  }

  #loginForm button {
    width: 100%;
    padding: 11px 14px;
  }
}

button {
  background: #d4af37;
  color: #1b1b1b;
  font-weight: 600;
}

.forgot-password {
    display: block;
    margin-top: 12px;
    font-size: 0.95rem;
    opacity: 0.95;
    cursor: pointer;
    text-align: right;
    color: #f9e7a0;
    text-decoration: underline;
    font-weight: 600;
}
.forgot-password:hover {
    opacity: 1;
    color: #fffbdb;
}

.forgot-password:hover {
    opacity: 1;
}




.navbar {
    height: 95px;
    padding: 0 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center; /* center the whole row */
    background: rgba(10, 18, 15, 0.75);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 8px 24px rgba(0,0,0,0.45);
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 2000;
}



.logo {
    display: flex;
    align-items: center;
}

.logo-img {
    height: 80px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 0 6px rgba(0,0,0,0.4));
    transition: transform 0.25s ease, filter 0.25s ease;
}

.logo1-img {
    height: 150px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 0 6px rgba(0,0,0,0.4));
    transition: transform 0.25s ease, filter 0.25s ease;
}


/* ================================
   HEADERS & TEXT
================================ */

h1 {
  font-size: 2rem;
  font-family: Georgia, 'Times New Roman', Times, serif;
  margin-top: 100px;
  margin-bottom: 100px;
  font-weight: 600;
}

h2 {
  margin-top: 40px;
  font-size: 1.4rem;
  font-weight: 600;
  color: rgb(228, 221, 180);
}

.admin-home-logo {
    position: absolute;
    top: 15px;
    right: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.admin-home-logo img {
    height: 170px; /* adjust to match your brand */
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 0 6px rgba(0,0,0,0.4));
    transition: transform 0.25s ease, filter 0.25s ease;
}

.admin-home-logo img:hover {
    transform: translateY(-2px);
    filter: drop-shadow(0 0 10px rgba(212,175,55,0.45));
}



/* ================================
   BUTTONS
================================ */

button {
  background: var(--primary);
  color: white;
  border: none;
  padding: 10px 18px;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 0.95rem;
  transition: var(--transition);
}

button:hover {
  background: var(--primary-hover);
}

/* ================================
   CARD SECTIONS
================================ */

.section {
  background: var(--card-bg);
  padding: var(--spacing);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-top: 30px;
}

/* ================================
   TABLES
================================ */

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 15px;
  background: white;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.table-wrapper {
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  border-radius: var(--radius);
}
th {
  background: #fafafa;
  padding: 12px;
  text-align: left;
  font-weight: 600;
  border-bottom: 1px solid var(--border);
}

td {
  padding: 12px;
  border-bottom: 1px solid var(--border);
  color: var(--text-light);
  user-select: text;
  pointer-events: none;
}

td.has-read-more {
  pointer-events: auto;
}

td .read-more-btn {
  pointer-events: auto;
}

.actions button {
  pointer-events: auto;
}


tr:last-child td {
  border-bottom: none;
}

tr:hover td {
  background: #f9f9f9;
}

/* ================================
   READ MORE FUNCTIONALITY
================================ */

.read-more-btn {
  background: var(--primary);
  color: white;
  border: none;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.75rem;
  cursor: pointer;
  margin-left: 5px;
  transition: var(--transition);
}

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

/* ================================
   TEXT MODAL
================================ */

.text-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000;
}

.text-modal-content {
  background: white;
  border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  max-width: 600px;
  max-height: 80vh;
  width: 90%;
  display: flex;
  flex-direction: column;
}

.text-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid var(--border);
}

.text-modal-header h3 {
  margin: 0;
  color: var(--text);
}

.close-text-modal {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--text-light);
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.close-text-modal:hover {
  color: var(--text);
}

.text-modal-body {
  padding: 20px;
  overflow-y: auto;
  white-space: pre-wrap;
  word-wrap: break-word;
  color: var(--text);
}

/* ================================
   STATUS BADGES (optional)
================================ */

.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge.success {
  background: #e8f8ed;
  color: #2e8b57;
}

.badge.warning {
  background: #fff4e5;
  color: #b36b00;
}

.badge.error {
  background: #fdeaea;
  color: #c0392b;
}

/* ================================
   FORMS (login page)
================================ */

form {
  background: var(--card-bg);
  padding: var(--spacing);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  max-width: 400px;
  margin: 40px auto;
}

label {
  display: block;
  margin-bottom: 10px;
  font-weight: 500;
}

input {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-top: 5px;
  font-size: 1rem;
  transition: var(--transition);
}

input:focus {
  border-color: var(--primary);
  outline: none;
}

/* ================================
   ERROR TEXT
================================ */

#error {
  color: #c0392b;
  margin-top: 10px;
  font-size: 0.9rem;
}

/* ================================
   TOP BAR (optional)
================================ */

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--card-bg);
  padding: 15px 20px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 30px;
}

.topbar .username {
  font-weight: 600;
  color: var(--text);
}

/* ================================
   MOBILE NAVBAR STYLING
================================ */

@media (max-width: 768px) {
  .navbar {
    height: 75px;
    padding: 0 1rem;
  }

  .logo-img {
    height: 50px;
  }

  .logo1-img {
    height: 90px;
  }
}

@media (max-width: 600px) {
  .navbar {
    height: 65px;
    padding: 0 0.75rem;
  }

  .logo-img {
    height: 40px;
  }

  .logo1-img {
    height: 70px;
  }
}

@media (max-width: 400px) {
  .navbar {
    height: 60px;
    padding: 0 0.5rem;
  }

  .logo-img {
    height: 32px;
  }

  .logo1-img {
    height: 55px;
  }
}

/* ================================
   ADMIN DASHBOARD LAYOUT
================================ */

.admin-layout {
  display: flex;
  height: 100vh;
  background: var(--bg);
}

/* SIDEBAR */
.sidebarad {
  width: 260px;
  background: #2e3932f5;
  color: white;
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  box-shadow: 4px 0 12px rgba(0,0,0,0.15);
}

.sidebarad h2 {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.sidebarad button {
  width: 100%;
  padding: 0.85rem 1rem;
  background: #1f2937;
  border: none;
  color: white;
  text-align: left;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.95rem;
  transition: 0.2s ease;
}

.sidebarad button:hover,
.sidebarad button.active {
  background: #374151;
}

/* MAIN CONTENT */
.content {
  flex: 1;
  padding: 2rem;
  overflow-y: auto;
}

.content h1 {
  margin-top: 0;
  margin-bottom: 1.5rem;
  font-size: 1.8rem;
  font-family: Georgia, serif;
  color: var(--text);
}

/* TABS */
.tab {
  display: none;
}

.tab.active {
  display: block;
}

/* SEARCH BAR */
.search-bar {
  margin-bottom: 1rem;
}

.search-bar input {
  width: 300px;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  font-size: 0.95rem;
  transition: var(--transition);
}

.search-bar input:focus {
  border-color: var(--primary);
}

/* TABLES (enhanced) */
table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  margin-top: 1rem;
}

th {
  background: #f3f4f6;
  padding: 14px;
  font-weight: 600;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  user-select: none;
}

td {
  padding: 14px;
  border-bottom: 1px solid var(--border);
  color: var(--text-light);
}

tr:hover td {
  background: #fafafa;
}

.actions button {
  padding: 6px 12px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  font-size: 0.85rem;
}

.edit-btn {
  background: #0f7e1e;
  color: white;
}

.edit-btn:hover {
  background: #083517;
}

.delete-btn {
  background: #4f1111;
  color: white;
}

.delete-btn:hover {
  background: #692424;
}

/* ================================
   MODAL
================================ */

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 2000;
}

.modal-content {
  background: white;
  padding: 2rem;
  border-radius: 12px;
  width: 420px;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: var(--shadow);
}

.modal-content h3 {
  margin-top: 0;
  margin-bottom: 1rem;
  font-size: 1.3rem;
  font-weight: 600;
}

.modal-content label {
  font-weight: 500;
  margin-bottom: 6px;
  display: block;
}

.modal-content input {
  width: 100%;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  margin-bottom: 14px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  margin-top: 1rem;
}

#saveEdit {
  background: #2563eb;
  color: white;
}

#saveEdit:hover {
  background: #1d4ed8;
}

#closeModal {
  background: #6b7280;
  color: white;
}

#closeModal:hover {
  background: #4b5563;
}

/* ================================
   RESPONSIVE DASHBOARD
================================ */

@media (max-width: 900px) {
  .sidebarad {
    width: 220px;
  }
}

@media (max-width: 700px) {
  .admin-layout {
    flex-direction: column;
  }

  .sidebarad {
    width: 100%;
    flex-direction: row;
    overflow-x: auto;
    padding: 1rem;
  }

  .sidebarad button {
    flex: 1;
    text-align: center;
  }

  .text-modal-content {
    width: 95%;
    max-height: 90vh;
  }

  .text-modal-header {
    padding: 15px;
  }

  .text-modal-body {
    padding: 15px;
  }
}



