/* ===========================================
   ULTRA PROFESSIONAL & INTERACTIVE ADMIN THEME
=========================================== */

:root {
  --primary: #1e73be;
  --primary-light: #4da3ff;
  --primary-dark: #0d4c8c;

  --bg: #eef3fa;
  --white: #ffffff;
  --text: #333;
  --border: #dcdcdc;

  --radius: 12px;
  --shadow: 0 4px 12px rgba(0,0,0,0.08);

  --transition: 0.3s ease;
  font-family: "Poppins", sans-serif;
}

body {
  margin: 0;
  background: var(--bg);
  display: flex;
  height: 100vh;
  color: var(--text);
  overflow: hidden;
}

/* -------------------------------------------
   SIDEBAR
------------------------------------------- */
.sidebar {
  width: 260px;
  background: linear-gradient(180deg, var(--primary), var(--primary-dark));
  color: var(--white);
  padding: 30px;
  position: fixed;
  top: 0; bottom: 0; left: 0;
  box-shadow: var(--shadow);
  z-index: 9999;
}

.sidebar h2 {
  text-align: center;
  font-size: 28px;
  margin-bottom: 30px;
  letter-spacing: 1.5px;
  font-family: 'Bebas Neue', sans-serif;
}

.sidebar a {
  display: block;
  padding: 14px 18px;
  margin: 10px 0;
  color: var(--white);
  text-decoration: none;
  border-radius: var(--radius);
  font-size: 16px;
  transition: var(--transition);
  background: rgba(255,255,255,0.05);
}

.sidebar a:hover {
  background: rgba(255,255,255,0.25);
  transform: translateX(8px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

/* -------------------------------------------
   MAIN CONTENT
------------------------------------------- */
.content {
  margin-left: 280px;
  padding: 40px;
  flex: 1;
  overflow-y: auto;
}

.content h1 {
  font-size: 34px;
  color: var(--primary-dark);
  margin-bottom: 20px;
  font-weight: 700;
}

/* -------------------------------------------
   FORM CARD STYLE
------------------------------------------- */
form {
  background: var(--white);
  padding: 35px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  max-width: 750px;
  margin-top: 10px;
  animation: fadeIn 0.4s ease;
}

/* 2-column alignment for input fields */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

/* force full width when needed */
.full-width {
  grid-column: span 2;
}

form label {
  font-weight: 600;
  font-size: 16px;
  margin-bottom: 6px;
  display: block;
}

form input,
form select,
form textarea {
  width: 100%;
  padding: 14px;
  font-size: 15px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  transition: var(--transition);
}

form input:focus,
form select:focus,
form textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 8px rgba(30,115,190,0.35);
  transform: scale(1.02);
}

/* Submit Button */
form button {
  background: var(--primary);
  color: white;
  padding: 15px;
  width: 100%;
  border-radius: var(--radius);
  font-size: 17px;
  transition: var(--transition);
}

form button:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* -------------------------------------------
   TABLE DESIGN
------------------------------------------- */
table {
  width: 100%;
  margin-top: 20px;
  border-collapse: collapse;
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

table th {
  background: var(--primary);
  padding: 16px;
  color: white;
  font-size: 16px;
}

table td {
  padding: 14px;
  border-bottom: 1px solid #ebebeb;
  font-size: 15px;
}

table tr {
  transition: 0.25s ease;
}

table tr:hover {
  background: #e8f1ff;
  transform: scale(1.005);
}

/* -------------------------------------------
   BUTTONS
------------------------------------------- */
.edit-btn,
.delete-btn {
  padding: 10px 16px;
  border-radius: 8px;
  border: none;
  font-size: 14px;
  cursor: pointer;
  transition: 0.2s;
}

.edit-btn {
  background: var(--primary);
  color: #fff;
}

.edit-btn:hover {
  background: var(--primary-dark);
  transform: scale(1.08);
}

.delete-btn {
  background: #d73838;
  color: white;
}

.delete-btn:hover {
  background: #b31f1f;
  transform: scale(1.08);
}

/* -------------------------------------------
   MODAL
------------------------------------------- */
.modal {
  display: none;
  position: fixed;
  z-index: 100000;
  inset: 0;
  background: rgba(0,0,0,0.45);
}

.modal-content {
  background: white;
  width: 450px;
  margin: 9% auto;
  padding: 30px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  animation: slideUp 0.4s ease;
}

@keyframes slideUp {
  from { transform: translateY(40px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.close {
  float: right;
  font-size: 28px;
  cursor: pointer;
  transition: 0.2s;
}

.close:hover {
  color: red;
  transform: scale(1.2);
}

/* Modal Buttons */
.save-btn,
.delete-confirm-btn,
.cancel-btn {
  width: 100%;
  padding: 14px;
  border-radius: var(--radius);
  font-size: 16px;
  border: none;
  margin-top: 8px;
  cursor: pointer;
  transition: var(--transition);
}

.save-btn { background: var(--primary); color: white; }
.save-btn:hover { background: var(--primary-dark); }

.delete-confirm-btn { background: #c53030; color: white; }
.delete-confirm-btn:hover { background: #9e1f1f; }

.cancel-btn { background: #6c757d; color: white; }
.cancel-btn:hover { background: #565e64; }

/* -------------------------------------------
   ANIMATIONS
------------------------------------------- */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* -------------------------------------------
   MOBILE RESPONSIVE
------------------------------------------- */
@media (max-width: 768px) {

  .sidebar {
    width: 100%;
    height: auto;
    position: relative;
  }

  .content {
    margin-left: 0;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }
}
