:root {
  --primary: cornflowerblue;
  --primary-glow: rgba(100, 149, 237, 0.35);
  --hover-glow: 0 0 12px var(--primary-glow), 0 0 24px var(--primary-glow);
  --bg-dark: #0f0f0f;
  --bg-darker: #1a1a1a;
  --text-muted: #ccc;
  --text-subtle: #888;
  --border-color: #2c2c2c;
  --fightclub-pink: #e72e77;
  --fightclub-glow: #ff66a3;
}

body {
  margin: 0;
  font-family: 'Segoe UI', sans-serif;
  background: linear-gradient(to bottom right, var(--bg-dark), var(--bg-darker));
  color: var(--text-muted);
}

/* 🔥 Topbar */
.top-ticker {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(to right, cornflowerblue, #6ea7ff, #3c77dd);
  color: white;
  padding: 0.75rem 1.5rem;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 9999;
  box-shadow: 0 0 12px rgba(100, 149, 237, 0.5), 0 0 24px rgba(100, 149, 237, 0.3);
}

.ticker-content {
  flex: 1;
  text-align: center;
  font-weight: bold;
  font-size: 1.1rem;
}

/* 🔥 Sidebar */
.sidebar {
  background-color: #1a1a1a;
  color: var(--text-muted);
  width: 180px;
  position: fixed;
  top: 60px;
  bottom: 0;
  left: 0;
  padding: 20px;
  overflow-y: auto;
  box-shadow: 2px 0 10px var(--primary-glow);
  transition: left 0.3s ease-in-out;
  z-index: 1000;
}

.sidebar h3 {
  color: var(--primary);
  font-size: 1.2rem;
}

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

.sidebar ul li {
  margin: 12px 0;
}

.sidebar ul li a {
  color: #bfbfbf;
  text-decoration: none;
  transition: all 0.2s ease-in-out;
}

.sidebar ul li a:hover {
  color: var(--fightclub-pink);
  text-shadow: 0 0 5px var(--fightclub-glow);
}

/* 🔥 Main Content */
.main-content {
  margin-left: 200px;
  margin-top: 60px;
  padding: 2rem;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: transparent;
  backdrop-filter: none;
  min-height: calc(100vh - 60px);
  overflow-y: auto;
  box-shadow: none;
  width: calc(100% - 200px);
}

/* 🔥 Responsive Sidebar */
@media (max-width: 768px) {
  .sidebar {
    left: -180px;
    width: 180px;
    position: fixed;
  }

  .sidebar.show {
    left: 0;
  }

  .main-content {
    margin-left: 0;
    width: 100%;
  }

  .topbar {
    position: relative;
  }

  .sidebar-toggle {
    display: block;
  }
}

.sidebar-toggle {
  position: fixed;
  top: 65px;
  left: 10px;
  background: var(--primary);
  color: #111;
  padding: 0.4rem 0.7rem;
  border-radius: 6px;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 0 10px var(--primary-glow);
  z-index: 1100;
  display: none;
}

/* 🔥 Global Table Styles - Sexy AF Pro Mode */
/* 🔥 Global Table Styles - Sexy AF Pro Mode (Now Fixed Width & Behaved) */
table {
  width: 95%;
  max-width: 95%;
  margin: 2rem auto;
  border-collapse: collapse;
  border-radius: 12px;
  overflow: hidden;
  background-color: #121212;
  box-shadow: 0 0 20px var(--primary-glow);
  font-size: 0.95rem;
  table-layout: fixed;              /* Forces columns to share space evenly */
  word-break: break-word;          /* Break long words */
  overflow-wrap: break-word;       /* Wrap overflowing content inside cells */
}


table thead {
  background: linear-gradient(to right, #1f1f1f, #232323);
}

table th {
  color: var(--primary);
  text-shadow: var(--hover-glow);
  padding: 1rem;
  text-align: left;
  font-weight: 600;
  border-bottom: 1px solid var(--border-color);
}

table td {
  color: var(--text-muted);
  padding: 0.9rem 1.1rem;
  border-bottom: 1px solid #2c2c2c;
  transition: background 0.3s ease;
}

table tr:hover td {
  background-color: rgba(100, 149, 237, 0.05);
  box-shadow: inset 0 0 10px var(--primary-glow);
}

/* 🔥 Button Styles */
.btn,
button {
  padding: 0.6rem 1.2rem;
  background: var(--primary);
  color: #111;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.95rem;
  transition: all 0.2s ease-in-out;
  box-shadow: 0 0 12px var(--primary-glow);
  text-decoration: none;
}

.btn:hover,
button:hover {
  background: #6ea7ff;
  box-shadow: 0 0 20px var(--primary-glow);
  transform: translateY(-2px);
}

/* 🔥 Micro Buttons */
.btn-xs {
  font-size: 0.75rem;
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
}

.danger {
  background-color: #e63946;
  color: #ffffff; /* 👈 White text, way easier on the eyes */
}

.danger:hover {
  background-color: #ff5e6c;
  color: #ffffff;
  box-shadow: 0 0 12px rgba(255, 94, 108, 0.6);
}

/* 🔥 Page/Section Layout */
.page {
  height: calc(100vh - 60px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin: 0;
  box-sizing: border-box;
  background: linear-gradient(to bottom right, var(--bg-dark), var(--bg-darker));
  overflow: hidden;
}

.page-wrapper {
  min-height: calc(100vh - 60px);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2rem;
  background: transparent;
}

.page-section {
  margin-block-start: 0 !important;
}



/* 🎯 HEADER ALIGNMENT */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 1rem;
  margin-bottom: 2rem;
  box-sizing: border-box;
}


.section-header h1 {
  font-size: 1.8rem;
  margin: 0;
  color: var(--primary);
}

/* 🔥 Cards */
.card {
  background: rgba(0, 0, 0, 0.85);
  border-radius: 1rem;
  max-width: 720px;
  width: 100%;
  padding: 3rem;
  text-align: center;
  color: var(--text-muted);
  box-shadow: 0 0 60px var(--primary-glow);
  backdrop-filter: blur(8px);
}

.card h1 {
  font-size: 2.5rem;
  color: var(--primary);
  margin-bottom: 1rem;
}

.card-input-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  margin-top: 2rem;
}

.card-input,
.card-btn {
  width: 100%;
  max-width: 360px;
  padding: 0.9rem 1.2rem;
  font-size: 1.05rem;
  border-radius: 8px;
  box-shadow: 0 0 12px rgba(100, 149, 237, 0.4), 0 0 24px rgba(100, 149, 237, 0.15);
}

.card-input {
  background: #111;
  color: #ccc;
  border: 1px solid cornflowerblue;
}

.card-btn {
  background: cornflowerblue;
  color: #111;
  font-weight: 600;
  text-transform: uppercase;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
}

.card-btn:hover {
  background: #6ea7ff;
  box-shadow: 0 0 20px rgba(100, 149, 237, 0.5);
}

.overlay-hidden {
  display: none;
  margin-top: 1rem;
  font-style: italic;
  color: var(--text-subtle);
}

/* 🔥 Login Form Specific */
.card-login-form {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  margin-top: 2rem;
}

.card-login-form input,
.card-login-form button {
  width: 100%;
  max-width: 360px;
  padding: 0.9rem 1.2rem;
  font-size: 1rem;
  border-radius: 8px;
  box-shadow: 0 0 12px var(--primary-glow), 0 0 24px var(--primary-glow);
}

.card-login-form input {
  background: #111;
  color: #ccc;
  border: 1px solid cornflowerblue;
}

.card-login-form button {
  background: cornflowerblue;
  color: #111;
  font-weight: 600;
  text-transform: uppercase;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
}

.card-login-form .forgot-link {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  color: var(--text-subtle);
  text-decoration: none;
}

.card-login-form .forgot-link:hover {
  color: var(--primary);
  text-shadow: var(--hover-glow);
}

/* 🔥 Chatbot Input */
#prompt {
  width: 80vw;
  height: 50vh;
  font-size: 1.1rem;
  padding: 10px;
  box-sizing: border-box;
  resize: none;
  background-color: #111;
  color: var(--text-muted);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  box-shadow: 0 0 5px var(--primary-glow);
}

/* 🔥 Link Styling */
a {
  color: var(--fightclub-pink);
  text-decoration: none;
  transition: color 0.2s ease, text-shadow 0.2s ease;
}

a:hover {
  color: var(--fightclub-glow);
  text-shadow: 0 0 6px var(--fightclub-glow);
}

a:visited {
  color: #c22b66;
}

a:active {
  color: #ff94c2;
  text-shadow: 0 0 10px var(--fightclub-glow);
}

.profile-avatar {
  height: 40px;
  width: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid white;
  background-color: #000;
  margin-left: 1rem;
  overflow: hidden;
  flex-shrink: 0;
}


/* 🧱 GRID WRAPPER FIXED WIDTH AND CENTERED */
.project-grid-wrapper {
  margin-block-start: 0 !important;
}


/* 🧱 GRID COLUMNS REBALANCED */
.project-grid {
  display: grid;
  grid-template-columns: 340px 1fr 400px; /* tighter left/right, more middle */
  gap: 1.5rem;
  width: 100%;
  margin: 0 auto;
  padding: 0;
}



/* 📦 CARD STAYS CONTAINED */
.project-grid .card {
  padding: 1.5rem;
  background-color: rgba(15, 15, 15, 0.95);
  border: 1px solid var(--border-color);
  box-shadow: 0 0 10px var(--primary-glow);
  overflow: hidden;
}

.project-grid .card:nth-child(1) {
  margin-left: 0;
  max-width: 300px;
}

.project-grid .card:nth-child(2) {
  max-width: 100%;
}

.project-grid .card:nth-child(3) {
  margin-right: 0;
  max-width: 300px;     /* less wide */
  justify-self: end;    /* hugs the right edge */
}



.project-grid {
  display: grid;
  grid-template-columns: 300px 1fr 300px;  /* shrink right col, expand middle */
  gap: 2rem;
  width: 95%;                             /* match records table width */
  margin: 0 auto;
  padding: 0;
}



/* 🏷 Generic spacing under section titles */
.section-title {
  margin-bottom: 1.2rem;
}

/* 🏷 Special treatment for section titles inside cards */
.card h2.section-title {
  font-size: 1.25rem;
  text-align: left;
  color: var(--primary);
}


.main-content {
  margin-top: 32px;           /* matches your top bar size tightly */
  padding-top: 0.25rem;       /* vertical squish */
}


.top-ticker {
  height: 40px;                /* 🔧 Match the above if needed */
  padding: 0.5rem 1rem;        /* Tighten it up */
}


/* 🎯 Notebook-Smooth Embedded Table Fields */
.autosave-table input[type="text"],
.autosave-table input[type="email"],
.autosave-table select,
.autosave-table textarea {
  background: transparent;
  color: var(--text-muted);
  border: none;
  border-bottom: 1px solid var(--border-color);
  border-radius: 0;
  padding: 0.4rem 0.5rem;
  font-size: 0.85rem;
  width: 100%;
  box-sizing: border-box;
  font-family: 'Segoe UI', sans-serif;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.autosave-table input:focus,
.autosave-table select:focus,
.autosave-table textarea:focus {
  outline: none;
  border-bottom: 1px solid var(--primary);
  box-shadow: 0 1px 0 var(--primary-glow);
  background-color: transparent;
}

/* Optional: textarea scrollbar removed unless needed */
.autosave-table textarea {
  resize: vertical;
  min-height: 36px;
  overflow: auto;
}

/* 📦 Keep input spacing clean */
.autosave-table td {
  padding: 0.5rem 0.6rem;
  vertical-align: middle;
  position: relative;      /* needed for absolute child */
  overflow: visible;       /* let the ❌ float outside */
}


.autosave-table select {
  background-color: var(--bg-dark);
  color: var(--text-muted);
  border: 1px solid var(--border-color);
  padding: 0.4rem 0.6rem;
  font-size: 0.9rem;
  border-radius: 6px;
  width: 100%;
  box-sizing: border-box;
  appearance: none;
  background-image: linear-gradient(45deg, var(--fightclub-pink), var(--primary));
  background-repeat: no-repeat;
  background-position: right 0.4rem center;
  background-size: 1rem 1rem;
}

.autosave-table select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 6px var(--primary-glow);
  background-color: #111;
}

.autosave-table select {
  color-scheme: dark;  /* better native dropdown rendering */
}

.records-table-wrapper {
  width: 100%;
  margin-top: 2rem;
}

.table-actions {
  text-align: left;
  margin-bottom: 0rem;
  margin-top: 1rem; /* snug it closer if needed */
}

.shred-btn {
  position: absolute;
  top: 50%;
  right: -10px;
  transform: translateY(-50%);
  font-size: 1rem;
  color: #ff4444;
  font-weight: bold;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s ease;
  z-index: 10;
}

tr.shredding {
  animation: ninjaShred 0.5s ease-out forwards;
}

@keyframes ninjaShred {
  0%   { transform: scale(1); opacity: 1; }
  25%  { transform: scale(1.02) rotate(0.5deg); }
  50%  { transform: scale(0.98) rotate(-0.5deg); }
  75%  { transform: scale(0.95); opacity: 0.3; }
  100% { transform: scaleY(0); opacity: 0; height: 0; }
}
