/* 
 * eRespon Specific Mockup Design System 
 * Fonts: Google Inter
 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
  /* Brand Colors matching mockup */
  --uitm-purple: #4A148C; /* Deep Purple from mockup */
  --uitm-dark: #1F1F1F; /* Black/Dark gray for header */
  --uitm-gold: #FDD835; /* Yellow/Gold for subheader text */
  --btn-purple: #311B92; /* Very dark purple for login button */
  
  /* Background & Surface */
  --bg-input: #F3F4F6;
  --surface-solid: #FFFFFF;
  
  /* Text */
  --text-main: #333333;
  --text-muted: #666666;

  /* Layout */
  --border-radius: 12px;
  --border-radius-sm: 6px;
  --container-width: 1200px;
}

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

body {
  font-family: 'Inter', sans-serif;
  color: var(--text-main);
  line-height: 1.4;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--uitm-purple);
  /* The background image with a purple overlay */
  background-image: linear-gradient(rgba(74, 20, 140, 0.85), rgba(74, 20, 140, 0.85)), url('../images/b_pentadbiran.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

/* Custom Split Header */
.custom-header {
  display: flex;
  position: relative;
  background: white;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  overflow: hidden;
  z-index: 10;
}

.header-left {
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 1;
  background: linear-gradient(135deg, #311B92 0%, #6A1B9A 100%);
}

.header-brand {
  background-color: transparent;
  padding: 0.5rem 3rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.header-brand h1 {
  color: white;
  margin: 0;
  font-size: 2.6rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  line-height: 1.1;
  text-shadow: 
    1px 1px 0 #000,
    2px 2px 0 #000,
    3px 3px 0 #000,
    4px 4px 0 #000,
    5px 5px 0 #000,
    6px 6px 8px rgba(0,0,0,0.6);
}

.header-sub {
  background-color: rgba(0, 0, 0, 0.15);
  padding: 0.3rem 3rem;
}

.header-sub p {
  color: #FDE047;
  margin: 0;
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.5px;
  text-shadow: 
    1px 1px 0 #000,
    2px 2px 0 #000,
    3px 3px 0 #000,
    4px 4px 5px rgba(0,0,0,0.6);
}

.header-right {
  position: relative;
  background-color: white;
  padding: 0 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 350px;
  z-index: 2;
}

.slant-decor {
  position: absolute;
  top: -10%;
  left: -45px;
  width: 85px;
  height: 120%;
  background-color: white;
  transform: skewX(-18deg);
  border-left: 4px solid #FDE047;
  box-shadow: -5px 0 15px rgba(0,0,0,0.15);
}

.header-right img {
  height: 95px;
  object-fit: contain;
  position: relative;
  z-index: 3;
  transform: scale(1.85) translateY(4px);
  transform-origin: center;
}

/* Layout Grid */
.container {
  width: 95%;
  max-width: var(--container-width);
  margin: 0 auto;
}

.main-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  padding: 1rem 0;
  flex: 1;
  align-items: stretch;
}

.left-column {
  flex: 1;
  min-width: 260px;
  max-width: 300px;
  display: flex;
  align-items: flex-start;
}

.right-column {
  flex: 2.5;
  min-width: 300px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 0.75rem;
}

/* Solid Cards */
.solid-card {
  background: var(--surface-solid);
  border-radius: var(--border-radius);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

/* Login Card Specifics */
.login-card {
  flex: 1;
  padding: 1.5rem; 
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  width: 100%;
}

.login-logo {
  height: 85px;
  margin-bottom: 1rem;
}

.login-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text-main);
}

.login-form {
  width: 100%;
}

.login-form .form-group {
  margin-bottom: 0.8rem;
}

.login-form .form-control {
  background-color: #F8F9FA;
  border: 1px solid #E5E7EB;
  border-radius: var(--border-radius-sm);
  padding: 0.6rem 1rem;
  width: 100%;
  font-size: 0.9rem;
  font-family: 'Inter', sans-serif;
  color: var(--text-main);
}

.login-form .form-control:focus {
  outline: none;
  box-shadow: 0 0 0 2px var(--uitm-purple);
}

.btn-login {
  background-color: var(--btn-purple);
  color: white;
  width: 100%;
  padding: 0.6rem;
  border: none;
  border-radius: var(--border-radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  margin-top: 0.5rem;
  cursor: pointer;
  transition: background-color 0.2s;
}

.btn-login:hover {
  background-color: var(--uitm-purple);
}

.login-links {
  margin-top: 1rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.login-links a {
  color: var(--text-muted);
  text-decoration: none;
}

.login-links a:hover {
  color: var(--uitm-purple);
  text-decoration: underline;
}

.lang-toggle {
  margin-top: 1rem;
  font-size: 0.8rem;
  font-weight: 600;
}

.lang-toggle a {
  color: var(--text-muted);
  text-decoration: none;
  margin: 0 0.2rem;
}

.lang-toggle a.active {
  color: var(--uitm-purple);
  text-decoration: underline;
}

/* Info Card Specifics */
.info-card {
  padding: 1.5rem 2rem;
  position: relative;
}

.info-header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.info-header h2 {
  color: var(--uitm-purple);
  font-size: 1.15rem;
  font-weight: 700;
}

.btn-manual {
  position: absolute;
  right: 2rem;
  top: 2rem;
  background-color: var(--btn-purple);
  color: white;
  padding: 0.4rem 1rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.btn-manual:hover {
  background-color: var(--btn-purple);
}

.info-content p {
  margin-bottom: 0.8rem;
  font-size: 0.9rem;
  color: var(--text-main);
}

.info-content .disclaimer {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-style: italic;
  margin-top: 1.2rem;
  border-top: 1px solid #E5E7EB;
  padding-top: 0.8rem;
}

/* Action Buttons Specifics */
.action-buttons {
  display: flex;
  gap: 1.5rem;
}

.action-btn {
  flex: 1;
  background: white;
  padding: 1rem 1.5rem;
  border-radius: var(--border-radius);
  text-decoration: none;
  color: var(--text-main);
  font-weight: 600;
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s, box-shadow 0.2s;
}

.action-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.action-btn i {
  color: #4DD0E1; 
  font-size: 1.3rem;
}

/* Footer */
.modern-footer {
  text-align: center;
  padding: 0.6rem 0;
  background-color: rgba(0, 0, 0, 0.4);
  color: rgba(255,255,255,0.9);
  font-size: 0.72rem;
  margin-top: auto;
}

/* Responsive */
@media (max-width: 900px) {
  .header-brand::after, .header-brand::before {
    display: none;
  }
  .header-top {
    flex-direction: column;
  }
  .header-logo {
    justify-content: center;
    padding: 1rem;
  }
  .header-brand {
    justify-content: center;
  }
  .main-wrapper {
    flex-direction: column;
    padding: 1.5rem 0;
  }
  .left-column, .right-column {
    max-width: 100%;
    width: 100%;
  }
  .action-buttons {
    flex-direction: column;
  }
  .btn-manual {
    position: static;
    margin-bottom: 1rem;
    display: inline-block;
  }
}

/* =============================================
   FORM PAGE LAYOUT (p_borang, p_semak, etc.)
   ============================================= */

.page-wrapper {
  display: flex;
  gap: 1.5rem;
  padding: 0.8rem 0;
  flex: 1;
  align-items: flex-start;
  justify-content: center;
  margin-bottom: 1rem;
}

/* Sidebar */
.page-sidebar {
  width: 180px;
  flex-shrink: 0;
}

.sidebar-nav {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-nav li {
  margin-bottom: 0.4rem;
}

.sidebar-nav a {
  display: block;
  padding: 0.5rem 1rem;
  color: white;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: var(--border-radius-sm);
  transition: background 0.2s;
}

.sidebar-nav a:hover {
  background: rgba(255,255,255,0.15);
}

.sidebar-nav a.active {
  background: rgba(255,255,255,0.25);
  font-weight: 700;
}

/* Page Main Content */
.page-content {
  flex: 1;
  min-width: 0;
}

/* Form Card */
.form-card {
  background: white;
  border-radius: var(--border-radius);
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  overflow: hidden;
}

.form-card-title {
  background-color: var(--btn-purple);
  color: white;
  text-align: center;
  padding: 0.45rem 1.5rem;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.5px;
}

.form-card-body {
  padding: 0.6rem 1rem;
}

.form-required-note {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-style: italic;
  margin-bottom: 0.6rem;
}

.form-required-note span {
  color: red;
}

/* Section Header (gold bar) */
.form-section-header {
  background-color: #C9AA71;
  color: #2D1A00;
  font-weight: 700;
  font-size: 0.88rem;
  padding: 0.3rem 1rem;
  border-radius: 3px;
  margin-bottom: 0.6rem;
  letter-spacing: 0.3px;
}

/* Form Row */
.form-row {
  display: grid;
  grid-template-columns: 200px 1fr;
  align-items: center;
  gap: 0.3rem 0.8rem;
  margin-bottom: 0.25rem;
}

.form-row label {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-main);
  padding-top: 0.2rem;
}

.form-row .input-hint {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.form-row .input-hint input {
  flex-shrink: 0;
  width: 130px;
}

.form-row .input-hint span {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-style: italic;
}

/* Form Controls */
.form-input {
  width: 100%;
  padding: 0.3rem 0.6rem;
  border: 1px solid #CCCCCC;
  border-radius: 4px;
  font-size: 0.88rem;
  font-family: 'Inter', sans-serif;
  color: var(--text-main);
  background: white;
  transition: border-color 0.2s;
}

.form-input:focus {
  outline: none;
  border-color: var(--uitm-purple);
  box-shadow: 0 0 0 2px rgba(74,20,140,0.1);
}

textarea.form-input {
  min-height: 130px;
  resize: vertical;
}

.form-select {
  padding: 0.3rem 0.6rem;
  border: 1px solid #CCCCCC;
  border-radius: 4px;
  font-size: 0.88rem;
  font-family: 'Inter', sans-serif;
  color: var(--text-main);
  background: white;
  cursor: pointer;
  width: 200px;
}

/* Jenis + Unit row */
.jenis-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.unit-label {
  font-size: 0.88rem;
  color: var(--text-muted);
}

/* File inputs */
.file-input-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* Divider */
.form-divider {
  border: none;
  border-top: 2px solid var(--btn-purple);
  margin: 0.4rem 0;
}

/* Submit button */
.btn-submit {
  display: block;
  margin: 0 auto;
  background-color: white;
  color: var(--text-main);
  border: 1px solid #AAAAAA;
  padding: 0.5rem 3rem;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
  letter-spacing: 0.5px;
}

.btn-submit:hover {
  background-color: var(--uitm-purple);
  color: white;
  border-color: var(--uitm-purple);
}

/* =============================================
   SEMAK PAGE SPECIFIC STYLES
   ============================================= */

/* Inline search row */
.semak-search-row {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 0.8rem;
  flex-wrap: wrap;
}

.semak-label {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-main);
  white-space: nowrap;
}

.semak-input {
  width: 120px !important;
  text-align: center;
  letter-spacing: 3px;
  font-weight: 600;
  flex-shrink: 0;
}

.btn-semak {
  background-color: white;
  color: var(--text-main);
  border: 1px solid #AAAAAA;
  padding: 0.4rem 1.2rem;
  font-size: 0.88rem;
  font-weight: 600;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.btn-semak:hover {
  background-color: var(--uitm-purple);
  color: white;
  border-color: var(--uitm-purple);
}

/* Results table */
.semak-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.semak-table thead tr th {
  background-color: #C9AA71;
  color: #2D1A00;
  font-weight: 700;
  padding: 0.5rem 0.75rem;
  border: 1px solid #B8964A;
  text-align: left;
}

.semak-table thead tr th.col-bil,
.semak-table thead tr th.col-lengkap {
  text-align: center;
}

.col-bil     { width: 5%; }
.col-jenis   { width: 15%; }
.col-subjek  { width: 70%; }
.col-lengkap { width: 10%; }

.semak-table tbody tr td {
  padding: 0.35rem 0.5rem;
  border: 1px solid #E5E7EB;
  color: var(--text-main);
  vertical-align: middle;
}

.semak-table tbody tr:nth-child(even) {
  background-color: #FAFAFA;
}

.semak-table tbody tr:hover {
  background-color: #F3F4F6;
}

.text-center {
  text-align: center;
}

/* Lengkap / Detail link */
.btn-lengkap {
  display: inline-block;
  color: var(--uitm-purple);
  font-weight: 600;
  font-size: 0.82rem;
  text-decoration: none;
  border: 1px solid var(--uitm-purple);
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  transition: background 0.2s, color 0.2s;
}

.btn-lengkap:hover {
  background-color: var(--uitm-purple);
  color: white;
}

/* =============================================
   DETAIL PAGE (p_semak1) STYLES
   ============================================= */

.detail-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.detail-table td {
  border: 1px solid #E8D99A;
  padding: 0.35rem 0.6rem;
  vertical-align: middle;
}

.detail-label {
  background-color: #C9AA71;
  color: #2D1A00;
  font-weight: 600;
  width: 170px;
  white-space: nowrap;
}

.detail-value {
  background-color: white;
  color: var(--text-main);
}

.btn-lihat {
  background-color: white;
  color: var(--text-main);
  border: 1px solid #AAAAAA;
  padding: 0.3rem 0.8rem;
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-lihat:hover {
  background-color: var(--uitm-purple);
  color: white;
  border-color: var(--uitm-purple);
}

/* Mobile Responsive Adjustments for Form Pages */
@media (max-width: 768px) {
  .container {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 1.5rem !important;
  }
  .page-wrapper {
    flex-direction: column;
    align-items: stretch !important;
    padding: 1.5rem 0;
  }
  .page-sidebar {
    width: 100%;
  }
  .page-content {
    width: 100%;
  }
  .sidebar-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  .sidebar-nav li {
    margin-bottom: 0;
    flex: 1 1 100px;
  }
  .sidebar-nav a {
    text-align: center;
    padding: 0.6rem;
  }
  .form-card-body, .detail-wrap {
    padding: 1.5rem !important;
  }
  .form-row {
    grid-template-columns: 1fr;
    gap: 0.2rem;
  }
  .form-row label {
    padding-top: 0.5rem;
  }
  .form-row .input-hint {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.3rem;
  }
  .form-row .input-hint input {
    width: 100% !important;
  }
  .form-select, .form-input {
    width: 100% !important;
    max-width: 100% !important;
  }
  .semak-search-row {
    flex-direction: column;
    align-items: stretch;
  }
  .semak-input {
    width: 100% !important;
  }
  .btn-semak {
    width: 100%;
  }
  .semak-table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
  .detail-table, .detail-table tbody, .detail-table tr, .detail-table td {
    display: block;
    width: 100%;
  }
  .detail-label {
    width: 100% !important;
    margin-top: 0;
    border-bottom: none !important;
  }
  .detail-value {
    border-top: none !important;
    margin-bottom: 0.5rem;
  }
  /* Maklumat Respon overrides */
  .d-row {
    grid-template-columns: 1fr !important;
  }
  .d-row-2 {
    grid-template-columns: 1fr !important;
  }
  .d-label {
    border-right: none !important;
    border-bottom: 1px solid #B8964A;
  }
  .d-value.border-left {
    border-left: none !important;
  }
  .d-label-center {
    border-left: none !important;
    border-bottom: 1px solid #B8964A;
  }
  .d-row-tarikh-header {
    display: none !important;
  }
  .d-row-tarikh-values {
    display: flex !important;
    flex-direction: column;
    grid-template-columns: none !important;
  }
  .d-row-tarikh-values .d-value {
    display: none !important;
  }
  .d-value-center {
    border-left: none !important;
    text-align: left !important;
    display: flex;
    flex-direction: column;
    border-bottom: 1px solid #eee;
  }
  .d-value-center:nth-child(2)::before {
    content: "Tarikh Hantar";
    font-weight: 600;
    color: #2D1A00;
    margin-bottom: 0.3rem;
  }
  .d-value-center:nth-child(3)::before {
    content: "Tarikh Maklumbalas";
    font-weight: 600;
    color: #2D1A00;
    margin-bottom: 0.3rem;
  }
  .d-value-center:nth-child(4)::before {
    content: "Tarikh Jawapan";
    font-weight: 600;
    color: #2D1A00;
    margin-bottom: 0.3rem;
  }
}

/* =============================================
   ADMIN & PENYELARAS DASHBOARD STYLES
   ============================================= */

/* Horizontal Navigation Bar */
.admin-navbar {
  background: rgba(49, 27, 146, 0.95); /* Deep dark purple matching header */
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
  z-index: 9;
  backdrop-filter: blur(10px);
}

.nav-container {
  width: 95%;
  max-width: var(--container-width);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-menu {
  list-style: none;
  display: flex;
  margin: 0;
  padding: 0;
}

.nav-menu.main-menu {
  flex: 1;
  justify-content: space-evenly;
  gap: 2rem;
}

.nav-menu.right-menu {
  justify-content: flex-end;
}

.nav-item {
  position: relative;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.2rem;
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.2s;
  border-bottom: 3px solid transparent;
}

.nav-link:hover, .nav-item:hover .nav-link {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
  border-bottom-color: var(--uitm-gold);
}

.nav-link i {
  color: #888;
  transition: color 0.2s;
}

.nav-link:hover i, .nav-item:hover .nav-link i {
  color: var(--uitm-purple);
}

.nav-link.logout-link {
  color: var(--uitm-gold);
}
.logout-link:hover {
  background: rgba(212, 172, 13, 0.1) !important;
  color: var(--uitm-gold) !important;
  border-bottom-color: var(--uitm-gold) !important;
}

/* Dropdown Menu */
.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: white;
  min-width: 200px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.1);
  border-radius: 0 0 var(--border-radius-sm) var(--border-radius-sm);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.2s;
  list-style: none;
  padding: 0.5rem 0;
  z-index: 10;
  border: 1px solid rgba(0,0,0,0.05);
  border-top: none;
}

.nav-item:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 1.2rem;
  color: var(--text-main);
  text-decoration: none;
  font-size: 0.88rem;
  transition: background 0.2s, color 0.2s;
}

.dropdown-item i {
  width: 16px;
  text-align: center;
  color: #888;
}

.dropdown-item:hover {
  background: #F3F4F6;
  color: var(--uitm-purple);
}

.dropdown-item:hover i {
  color: var(--uitm-purple);
}

/* Admin Data Table */
.admin-card {
  background: white;
  border-radius: var(--border-radius);
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  overflow: hidden;
  margin-bottom: 1rem;
  width: 100%;
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
}

.admin-card-header {
  padding: 0.5rem 1rem 0.2rem;
}

.admin-card-title {
  color: var(--uitm-purple);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.admin-card-subtitle {
  color: var(--text-muted);
  font-size: 0.85rem;
  font-style: italic;
  margin-bottom: 0.4rem;
}

.admin-table-container {
  overflow-x: auto;
  padding: 0 0.8rem 0.8rem;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  border: 1px solid #E5E7EB;
}

.admin-table th, .admin-table td {
  padding: 0.3rem 0.5rem;
  border: 1px solid #E5E7EB;
  vertical-align: middle;
}

.admin-table th.title-red {
  background-color: rgba(49, 27, 146, 0.95);
  color: white;
  text-align: center;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 1px;
  padding: 0.5rem;
}

.admin-table th.header-yellow {
  background-color: #C9AA71;
  color: #2D1A00;
  font-weight: 700;
}

.admin-table tbody tr:nth-child(even) {
  background-color: #FAFAFA;
}

.admin-table tbody tr:hover {
  background-color: #F3F4F6;
}

/* Action Links in Admin Table */
.action-link {
  color: var(--uitm-purple);
  text-decoration: none;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s;
}

.action-link:hover {
  opacity: 0.7;
}

/* Nav wrapper: flex row on desktop, toggled on mobile */
.nav-hamburger {
  display: none;
}

.nav-menu-wrapper {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: space-between;
}

/* Responsive Admin Layout - Hamburger Menu */
@media (max-width: 900px) {
  .nav-container {
    flex-wrap: wrap;
    padding: 0;
  }

  /* Hamburger button */
  .nav-hamburger {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0.75rem 1rem;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
  }

  /* Hide full nav by default on mobile */
  .nav-menu-wrapper {
    display: none;
    width: 100%;
    flex-direction: column;
  }
  .nav-menu-wrapper.open {
    display: flex;
  }

  .nav-menu {
    flex-direction: column;
    width: 100%;
  }

  .nav-link {
    justify-content: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
  }

  /* Dropdowns: hidden by default on mobile, toggle via JS */
  .dropdown-menu {
    position: static;
    opacity: 0;
    visibility: hidden;
    max-height: 0;
    overflow: hidden;
    transform: none;
    box-shadow: none;
    border: none;
    background: rgba(255,255,255,0.05);
    transition: max-height 0.3s ease, opacity 0.2s;
  }
  .nav-item.open .dropdown-menu {
    opacity: 1;
    visibility: visible;
    max-height: 500px;
  }

  .dropdown-item {
    justify-content: center;
    padding: 0.75rem 1rem;
    color: rgba(255,255,255,0.85);
    border-bottom: 1px solid rgba(255,255,255,0.05);
  }
  .dropdown-item:hover {
    background: rgba(255,255,255,0.1);
    color: white;
  }
  .dropdown-item i {
    color: rgba(255,255,255,0.5);
  }
}

/* btn-back reused across modules */
.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--uitm-purple);
    font-weight: 600;
    font-size: 0.85rem;
    text-decoration: none;
    background: white;
    border: 1px solid var(--uitm-purple);
    padding: 0.45rem 1.2rem;
    border-radius: 4px;
    transition: background 0.2s, color 0.2s;
}
.btn-back:hover {
    background: var(--uitm-purple);
    color: white;
}

/* Hide empty images */
img[src="foto/"], img[src="foto/ "] { display: none !important; }

