/* Global Styles & Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary-blue: #003DA5;
  --primary-dark: #001F54;
  --primary-light: #0052D4;
  --gold: #FFD700;
  --gold-dark: #DAA520;
  --gold-light: #FFF4B3;
  --text-dark: #1a1a1a;
  --text-medium: #444;
  --text-light: #666;
  --bg-main: #F5F7FA;
  --bg-light: #FFFFFF;
  --border-light: #E0E4E8;
  --shadow-sm: 0 2px 8px rgba(0, 61, 165, 0.08);
  --shadow-md: 0 4px 16px rgba(0, 61, 165, 0.12);
  --shadow-lg: 0 8px 32px rgba(0, 61, 165, 0.16);
  --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

body {
  font-family: var(--font-family);
  background: var(--bg-main);
  color: var(--text-dark);
  line-height: 1.6;
  min-height: 100vh;
  padding-top: 140px;
}

/* Modern Header with Logo in Top-Left */
header {
  background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-dark) 100%);
  color: white;
  padding: 2rem 2.5rem;
  box-shadow: var(--shadow-md);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 140px;
  border-bottom: 5px solid var(--gold);
}

header .header-left {
  display: flex;
  align-items: center;
  gap: 2rem;
}

header .header-left a {
  display: inline-block;
  line-height: 0;
}

header .logo {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  border: 6px solid var(--gold);
  object-fit: cover;
  box-shadow: 0 6px 16px rgba(255, 215, 0, 0.4);
  background: white;
  padding: 4px;
  transition: all 0.3s ease;
  object-position: center;
}

header .header-left a:hover .logo {
  transform: scale(1.08) rotate(5deg);
  box-shadow: 0 8px 24px rgba(255, 215, 0, 0.6);
}

header .header-title {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

header h1 {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--gold);
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
  letter-spacing: 0.5px;
  margin: 0;
}

header p {
  font-size: 1.3rem;
  color: var(--gold-light);
  font-weight: 500;
  margin: 0;
  letter-spacing: 0.3px;
}

/* Hamburger Menu */
.hamburger {
  display: flex !important;
  position: fixed;
  top: 1.25rem;
  right: 1.5rem;
  z-index: 1500;
  background: var(--gold) !important;
  border: none !important;
  border-radius: 6px !important;
  padding: 8px 10px !important;
  cursor: pointer;
  box-shadow: var(--shadow-md) !important;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  transition: all 0.3s ease;
  width: 40px !important;
  height: 34px !important;
  margin: 0 !important;
}

.hamburger:hover {
  background: var(--gold-dark) !important;
  transform: scale(1.05) !important;
  box-shadow: var(--shadow-md) !important;
  border-color: transparent !important;
}

.hamburger span {
  display: block;
  width: 22px;
  height: 3px;
  background: var(--primary-blue);
  border-radius: 2px;
  transition: all 0.3s ease;
  position: relative;
}

.hamburger.open span:nth-child(1) {
  transform: rotate(45deg);
  top: 7px;
}

.hamburger.open span:nth-child(2) {
  opacity: 0;
}

.hamburger.open span:nth-child(3) {
  transform: rotate(-45deg);
  top: -7px;
}

/* Sidebar - Mobile */
.sidebar {
  position: fixed;
  top: 0;
  right: -300px;
  width: 280px;
  height: 100vh;
  background: linear-gradient(180deg, var(--primary-blue) 0%, var(--primary-dark) 100%);
  box-shadow: -4px 0 24px rgba(0,0,0,0.2);
  transition: right 0.3s ease;
  z-index: 1250;
  padding: 7.5rem 0 2rem 0;
  overflow-y: auto;
}

.sidebar.open {
  right: 0;
}

.sidebar nav {
  display: flex;
  flex-direction: column;
  padding: 0;
}

.sidebar a {
  padding: 1.25rem 2rem;
  color: white;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 215, 0, 0.2);
  transition: all 0.3s ease;
  font-weight: 500;
  font-size: 1.05rem;
}

.sidebar a:hover {
  background: rgba(255, 215, 0, 0.15);
  padding-left: 2.75rem;
  color: var(--gold);
}

/* Welcome Section */
.welcome-section {
  text-align: center;
  padding: 3rem 2rem 1rem 2rem;
  max-width: 900px;
  margin: 0 auto;
  animation: fadeIn 0.8s ease-in;
}

.welcome-section h2 {
  font-size: 2.5rem;
  color: var(--primary-blue);
  margin: 0 0 1rem 0;
  font-weight: 800;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.welcome-section p {
  font-size: 1.3rem;
  color: var(--primary-dark);
  margin: 0.5rem 0;
  font-weight: 600;
}

.welcome-section .subtitle {
  font-size: 1.1rem;
  color: var(--gold-dark);
  font-style: italic;
  font-weight: 500;
  margin-top: 1rem;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Main Navigation - Circular Buttons */
.nav-buttons {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 2rem;
  padding: 3rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.nav-btn {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-light) 100%);
  color: white;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  box-shadow: var(--shadow-lg);
  border: 5px solid var(--gold);
  transition: all 0.3s ease;
  padding: 1.5rem;
  line-height: 1.3;
}

.nav-btn:hover {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-blue) 100%);
  box-shadow: 0 8px 32px rgba(0, 61, 165, 0.3);
  transform: scale(1.1);
  border-color: var(--gold-light);
}

.nav-btn:active {
  transform: scale(1.05);
}

/* Main Content */
main {
  max-width: 1200px;
  margin: 2.5rem auto;
  padding: 0 2rem;
  animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Forms */
form {
  background: var(--bg-light);
  padding: 2.5rem;
  border-radius: 16px;
  box-shadow: var(--shadow-md);
  max-width: 650px;
  margin: 2rem auto;
  border: 2px solid var(--border-light);
  transition: all 0.3s ease;
}

form:hover {
  box-shadow: var(--shadow-lg);
}

form label {
  display: block;
  margin-top: 1.25rem;
  margin-bottom: 0.625rem;
  font-weight: 600;
  color: var(--primary-blue);
  font-size: 0.95rem;
  letter-spacing: 0.3px;
}

form input,
form textarea,
form select {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 2px solid var(--border-light);
  border-radius: 10px;
  font-family: inherit;
  font-size: 1rem;
  transition: all 0.3s ease;
  background: white;
}

form input:focus,
form textarea:focus,
form select:focus {
  outline: none;
  border-color: var(--primary-blue);
  box-shadow: 0 0 0 4px rgba(0, 61, 165, 0.1), 0 0 0 2px var(--gold-light);
}

form textarea {
  resize: vertical;
  min-height: 120px;
}

/* Buttons */
button:not(.hamburger),
.btn {
  background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-light) 100%);
  color: white;
  border: none;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  font-size: 1.15rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-lg);
  letter-spacing: 0.3px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  margin: 1rem;
  border: 4px solid var(--gold);
  padding: 1rem;
  line-height: 1.3;
}

button:not(.hamburger):hover,
.btn:hover {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-blue) 100%);
  box-shadow: 0 8px 32px rgba(0, 61, 165, 0.3);
  transform: scale(1.1);
  border-color: var(--gold-light);
}

button:not(.hamburger):active,
.btn:active {
  transform: scale(1.05);
  box-shadow: var(--shadow-md);
}

button.danger {
  background: linear-gradient(135deg, #d32f2f 0%, #b71c1c 100%);
  border-color: #ffcdd2;
}

button.danger:hover {
  background: linear-gradient(135deg, #b71c1c 0%, #8b0000 100%);
  border-color: #ef9a9a;
}

button.secondary {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
  color: var(--primary-dark);
  border-color: var(--primary-blue);
}

button.secondary:hover {
  background: linear-gradient(135deg, var(--gold-dark) 0%, #B8860B 100%);
  border-color: var(--primary-dark);
}

/* Button Container for Centering */
.button-container {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin: 2rem auto;
}

/* Items List */
#itemList,
#adminList,
#claimRequestsList,
#inquiriesList,
#claimedList {
  list-style: none;
  padding: 0;
}

#itemList li,
#adminList li,
#claimRequestsList li,
#inquiriesList li,
#claimedList li {
  background: var(--bg-light);
  margin-bottom: 1.5rem;
  padding: 2rem;
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
  border: 2px solid var(--border-light);
  border-left: 5px solid var(--gold);
}

#itemList li:hover,
#adminList li:hover,
#claimRequestsList li:hover,
#inquiriesList li:hover,
#claimedList li:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
  border-left-color: var(--primary-blue);
}

#itemList li strong {
  font-size: 1.35rem;
  color: var(--primary-blue);
  display: block;
  margin-bottom: 0.75rem;
  font-weight: 700;
}

#itemList li p,
#itemList li em {
  color: var(--text-light);
  margin: 0.625rem 0;
  line-height: 1.6;
}

.item-photo {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  margin: 1.25rem 0;
  box-shadow: var(--shadow-md);
  border: 3px solid var(--gold-light);
}

/* Search & Filter */
#searchInput,
#categoryFilter,
#pendingItemsSearch,
#inquiriesSearch,
#claimRequestsSearch,
#claimedItemsSearch {
  width: 100%;
  max-width: 550px;
  padding: 1rem 1.25rem;
  border: 2px solid var(--border-light);
  border-radius: 12px;
  font-size: 1rem;
  margin-bottom: 1.75rem;
  transition: all 0.3s ease;
  background: white;
  box-shadow: var(--shadow-sm);
}

#searchInput:focus,
#categoryFilter:focus {
  outline: none;
  border-color: var(--primary-blue);
  box-shadow: 0 0 0 4px rgba(0, 61, 165, 0.1), var(--shadow-md);
}

#categoryFilter {
  margin-left: 1rem;
  max-width: 220px;
  background: white;
}

/* Admin Sections */
.admin-section {
  background: var(--bg-light);
  margin-bottom: 2rem;
  border-radius: 16px;
  box-shadow: var(--shadow-md);
  overflow: hidden;
  transition: all 0.3s ease;
  border: 2px solid var(--border-light);
}

.admin-section:hover {
  box-shadow: var(--shadow-lg);
  border-color: var(--gold-light);
}

.section-toggle {
  width: 100%;
  padding: 1.5rem 2rem;
  background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-dark) 100%);
  border: none;
  cursor: pointer;
  text-align: left;
  font-size: 1.2rem;
  font-weight: 700;
  color: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.3s ease;
  letter-spacing: 0.5px;
}

.section-toggle:hover {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-blue) 100%);
  padding-left: 2.25rem;
}

.admin-section > div {
  padding: 2rem;
}

/* Login Modal */
.login-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 31, 84, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1200;
  backdrop-filter: blur(6px);
}

.login-modal-content {
  background: white;
  padding: 3rem;
  border-radius: 20px;
  min-width: 380px;
  box-shadow: 0 12px 48px rgba(0, 61, 165, 0.3);
  animation: slideUp 0.4s ease;
  border: 3px solid var(--gold);
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.login-modal-content h2 {
  margin-top: 0;
  margin-bottom: 1.75rem;
  color: var(--primary-blue);
  font-size: 1.75rem;
  text-align: center;
  font-weight: 700;
}

.login-modal-content input {
  width: 100%;
  padding: 1rem;
  margin: 1.25rem 0;
  border: 2px solid var(--border-light);
  border-radius: 10px;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.login-modal-content input:focus {
  outline: none;
  border-color: var(--primary-blue);
  box-shadow: 0 0 0 4px rgba(0, 61, 165, 0.1);
}

.login-modal-content button {
  width: 100%;
  padding: 1rem;
  margin-top: 0.75rem;
  border-radius: 8px;
  height: auto;
  background: linear-gradient(135deg, #666 0%, #444 100%);
  border: none;
  font-size: 1rem;
}

.login-modal-content button:hover {
  background: linear-gradient(135deg, #555 0%, #333 100%);
  transform: scale(1.02);
}

/* Report Form Submit Button */
#reportForm button[type="submit"] {
  width: 100%;
  max-width: 400px;
  height: auto;
  border-radius: 8px;
  padding: 1rem 2rem;
  background: linear-gradient(135deg, #666 0%, #444 100%);
  border: none;
  font-size: 1.1rem;
  margin: 1.5rem auto;
  display: block;
}

#reportForm button[type="submit"]:hover {
  background: linear-gradient(135deg, #555 0%, #333 100%);
  transform: scale(1.02);
}

/* Admin Panel Buttons - Greyscale Rectangles */
#adminList button,
#claimRequestsList button,
#inquiriesList button,
#claimedList button,
.approveBtn,
.deleteBtn,
.approveClaimBtn,
.rejectClaimBtn,
.viewInquiriesBtn,
.clearInquiriesBtn,
.deleteClaimedBtn {
  width: auto;
  height: auto;
  border-radius: 6px;
  padding: 0.6rem 1.2rem;
  font-size: 0.95rem;
  background: linear-gradient(135deg, #666 0%, #444 100%);
  border: none;
  margin: 0.25rem;
}

#adminList button:hover,
#claimRequestsList button:hover,
#inquiriesList button:hover,
#claimedList button:hover {
  background: linear-gradient(135deg, #555 0%, #333 100%);
  transform: scale(1.05);
}

#adminList button.danger,
#claimRequestsList button.danger,
#inquiriesList button.danger,
#claimedList button.danger,
.deleteBtn,
.rejectClaimBtn,
.clearInquiriesBtn,
.deleteClaimedBtn {
  background: linear-gradient(135deg, #d32f2f 0%, #b71c1c 100%);
}

#adminList button.danger:hover,
#claimRequestsList button.danger:hover,
#inquiriesList button.danger:hover,
#claimedList button.danger:hover {
  background: linear-gradient(135deg, #b71c1c 0%, #8b0000 100%);
}

/* Claim Modal */
.claim-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 31, 84, 0.75);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1200;
  backdrop-filter: blur(6px);
}

.claim-modal.show {
  display: flex;
}

.claim-modal-content {
  background: white;
  padding: 2.5rem;
  border-radius: 20px;
  min-width: 380px;
  max-width: 500px;
  box-shadow: 0 12px 48px rgba(0, 61, 165, 0.3);
  animation: slideUp 0.4s ease;
  border: 3px solid var(--gold);
}

.claim-modal-content h3 {
  margin-top: 0;
  margin-bottom: 1.5rem;
  color: var(--primary-blue);
  font-size: 1.5rem;
}

.claim-modal-content input {
  width: 100%;
  padding: 1rem;
  margin: 1rem 0;
  border: 2px solid var(--border-light);
  border-radius: 10px;
  font-size: 1rem;
}

.claim-modal-content input:focus {
  outline: none;
  border-color: var(--primary-blue);
  box-shadow: 0 0 0 4px rgba(0, 61, 165, 0.1);
}

.claim-modal-content .button-group {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
}

.claim-modal-content .button-group button {
  width: auto;
  height: auto;
  border-radius: 10px;
  padding: 0.875rem 2rem;
  margin: 0;
  flex: 1;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  z-index: 1400;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.toast {
  min-width: 280px;
  padding: 1.25rem 1.5rem;
  border-radius: 12px;
  opacity: 0;
  transform: translateX(400px);
  transition: all 0.4s ease;
  box-shadow: var(--shadow-lg);
  font-weight: 600;
  border: 2px solid rgba(255,255,255,0.3);
}

.toast.show {
  opacity: 1;
  transform: translateX(0);
}

.toast--success {
  background: linear-gradient(135deg, #2e7d32 0%, #1b5e20 100%);
  color: white;
}

.toast--error {
  background: linear-gradient(135deg, #c62828 0%, #8b0000 100%);
  color: white;
}

.toast--info {
  background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-dark) 100%);
  color: white;
}

/* Confirm Dialog */
.confirm-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 31, 84, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1300;
  backdrop-filter: blur(6px);
}

.confirm-box {
  background: white;
  padding: 2.5rem;
  border-radius: 16px;
  box-shadow: 0 12px 48px rgba(0, 61, 165, 0.3);
  max-width: 440px;
  animation: slideUp 0.4s ease;
  border: 3px solid var(--gold);
}

.confirm-message {
  margin-bottom: 2rem;
  font-size: 1.15rem;
  color: var(--text-dark);
  line-height: 1.6;
}

.confirm-actions {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
}

.confirm-actions button {
  padding: 0.75rem 1.75rem;
}

.cancelBtn {
  background: linear-gradient(135deg, #757575 0%, #616161 100%);
}

.cancelBtn:hover {
  background: linear-gradient(135deg, #616161 0%, #424242 100%);
}

/* Stats Charts */
svg {
  width: 100%;
  height: auto;
  max-width: 750px;
  margin: 1.5rem 0;
}

svg text {
  font-family: var(--font-family);
  fill: var(--text-dark);
  font-weight: 600;
}

svg rect.chart-rect {
  transition: all 0.3s ease;
}

svg rect.chart-rect:hover {
  filter: brightness(1.1);
  stroke: var(--primary-blue);
  stroke-width: 2;
}

#statsTotals,
#categoryChart,
#locationChart {
  background: var(--bg-light);
  padding: 2rem;
  border-radius: 16px;
  box-shadow: var(--shadow-md);
  margin-bottom: 2rem;
  border: 2px solid var(--border-light);
  border-left: 5px solid var(--gold);
}

#statsTotals p {
  font-size: 1.15rem;
  margin: 0.75rem 0;
  color: var(--text-medium);
  font-weight: 500;
}

/* Responsive Design */
@media (max-width: 768px) {
  body {
    padding-top: 90px;
  }

  header {
    padding: 1rem 1.5rem;
    height: 90px;
  }

  header .logo {
    width: 70px;
    height: 70px;
  }

  header h1 {
    font-size: 1.65rem;
  }

  header p {
    font-size: 0.95rem;
  }
  
  main {
    margin: 1.5rem auto;
    padding: 0 1.25rem;
  }
  
  form {
    padding: 1.75rem;
  }
  
  #categoryFilter {
    margin-left: 0;
    margin-top: 0.75rem;
    max-width: 100%;
  }

  .login-modal-content {
    min-width: 90%;
    padding: 2rem;
  }

  .nav-buttons {
    gap: 1.5rem;
    padding: 2rem 1rem;
  }

  .nav-btn {
    width: 150px;
    height: 150px;
    font-size: 1.15rem;
  }

  button,
  .btn {
    width: 130px;
    height: 130px;
    font-size: 1rem;
    margin: 0.75rem;
  }
}

@media (max-width: 480px) {
  header h1 {
    font-size: 1.35rem;
  }

  header p {
    font-size: 0.85rem;
  }

  header .logo {
    width: 60px;
    height: 60px;
    border-width: 4px;
  }

  .nav-buttons {
    gap: 1rem;
    padding: 1.5rem 0.5rem;
  }

  .nav-btn {
    width: 130px;
    height: 130px;
    font-size: 1rem;
    padding: 1rem;
  }

  button,
  .btn {
    width: 110px;
    height: 110px;
    font-size: 0.9rem;
    margin: 0.5rem;
  }
}

/* Utility Classes */
.admin-only {
  display: none;
}

.hidden {
  display: none;
}

.section-search-input {
  width: 100%;
  max-width: 550px;
  padding: 0.875rem 1rem;
  margin: 1rem 0;
  border: 2px solid var(--border-light);
  border-radius: 10px;
  font-size: 1rem;
  transition: all 0.3s ease;
  background: white;
}

.section-search-input:focus {
  outline: none;
  border-color: var(--primary-blue);
  box-shadow: 0 0 0 4px rgba(0, 61, 165, 0.1);
}

hr {
  border: none;
  border-top: 3px solid var(--gold-light);
  margin: 2.5rem 0;
}
