/* === Subiksha Theme Colors === */
:root {
  --primary-color: #6A1B9A;
  --accent-color: #A67C52;
  --background-light: #fffbb5;
  --text-dark: #333;
  --text-light: #fff;
}

/* === Global Reset === */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', sans-serif;
  background-color: var(--background-light);
  color: var(--text-dark);
}

/* === Header Layout === */
.app-header {
  background-color: var(--primary-color);
  color: var(--text-light);
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.header-left img {
  height: 40px;
  margin-right: 10px;
}

.sidebar-toggle {
  background: none;
  border: none;
  font-size: 1.6rem;
  color: white;
  cursor: pointer;
}

.header-nav {
  display: flex;
  gap: 1rem;
}

.header-nav a {
  color: white;
  text-decoration: none;
  font-weight: bold;
  padding: 8px 12px;
}

.header-nav a:hover {
  text-decoration: underline;
}

/* === Sidebar === */
.sidebar-container {
  position: relative;
}

.sidebar {
  width: 220px;
  background: #f9f9f9;
  padding: 20px;
  position: fixed;
  top: 70px;
  bottom: 0;
  left: 0;
  overflow-y: auto;
  border-right: 1px solid #ddd;
  box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.sidebar.collapsed {
  transform: translateX(-240px);
}

.sidebar nav ul {
  list-style: none;
  padding: 0;
}

.sidebar nav ul li {
  margin-bottom: 15px;
}

.sidebar nav ul li a {
  display: block;
  padding: 10px;
  border-radius: 6px;
  color: var(--primary-color);
  font-weight: 600;
  text-decoration: none;
}

.sidebar nav ul li a:hover,
.sidebar nav ul li a.active {
  color: var(--primary-color);
  text-decoration: underline;
}

/* === Main Content === */
.main-content {
  margin-left: 240px;
  padding: 30px;
  background-color: var(--background-light);
}

.section {
  padding: 2rem;
  max-width: 1200px;
  margin: auto;
  background-color: var(--background-light);
}

.section h2 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--primary-color);
}

.section p {
  font-size: 1rem;
  color: #555;
}

/* === Widgets === */
.widgets {
  display: flex;
  gap: 20px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.widget {
  background-color: #ffffff;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  flex: 1;
  min-width: 200px;
  text-align: center;
}

.widget h4 {
  font-size: 1.2rem;
  margin-bottom: 10px;
  color: #4a1f6b;
  font-weight: 600;
}

.widget p {
  font-size: 1.8rem;
  font-weight: bold;
  color: #000;
}
/* === Forms === */
.user-form,
.login-form {
  background: #fff;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group label {
  font-weight: 600;
  margin-bottom: 5px;
}

.form-group input,
.form-group select,
textarea.form-control {
  padding: 10px;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  width: 100%;
  box-sizing: border-box;
}

textarea.form-control {
  resize: vertical;
}

.form-group.checkbox {
  display: flex;
  align-items: center;
}

.button,
.button.primary {
  padding: 12px;
  font-size: 1rem;
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

.button:hover,
.button.primary:hover {
  background-color: #4a1f6b;
}

/* === Alerts === */
.alert.success {
  background: #e0ffe0;
  border: 1px solid #0a0;
  padding: 10px;
  margin-bottom: 20px;
  border-radius: 6px;
  text-align: center;
}

.success {
  color: green;
  text-align: center;
}

.error {
  color: red;
  text-align: center;
}

/* === Tables === */
.responsive-table {
  overflow-x: auto;
  margin-top: 20px;
}

.user-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
  min-width: 600px;
}

.user-table caption {
  caption-side: top;
  font-weight: bold;
  color: var(--primary-color);
  margin-bottom: 10px;
}

.user-table th,
.user-table td {
  padding: 12px;
  border-bottom: 1px solid #ddd;
  text-align: left;
}

.user-table tr:nth-child(even) {
  background-color: #f9f9f9;
}

.user-table tr:hover {
  background-color: #f5f5ff;
}

.empty-row {
  text-align: center;
  font-style: italic;
  color: #999;
}

.action.edit,
.action.delete {
  margin-right: 10px;
  font-size: 1.2rem;
  text-decoration: none;
}

/* === Lists === */
ul {
  list-style: none;
  padding: 0;
}

ul li::before {
  content: "✅ ";
  color: var(--primary-color);
}

/* === Footer === */
footer {
  background-color: var(--primary-color);
  color: var(--text-light);
  text-align: center;
  padding: 2rem;
}

footer a {
  color: var(--background-light);
  text-decoration: underline;
}

/* === Print Optimization === */
@media print {
  body {
    background: white !important;
    color: black !important;
  }

  .app-header,
  .sidebar,
  .sidebar-toggle,
  .header-nav,
  .form-actions,
  footer {
    display: none !important;
  }

  .main-content {
    margin: 0;
    padding: 0;
    background: white;
  }

  .user-table {
    font-size: 12px;
    border: 1px solid #000;
  }

  .user-table th,
  .user-table td {
    border: 1px solid #000;
    padding: 6px;
  }

  .user-table caption {
    font-size: 1rem;
    font-weight: bold;
    padding: 0.5rem;
    background: none;
    color: black;
  }
}

/* === Responsive Enhancements === */
@media (max-width: 768px) {
  .app-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
  }

  .sidebar {
    position: absolute;
    top: 70px;
    left: 0;
    width: 220px;
    height: calc(100vh - 70px);
    z-index: 1000;
    box-shadow: 2px 0 5px rgba(0,0,0,0.1);
  }

  .sidebar.collapsed {
    transform: translateX(-240px);
  }

  .main-content {
    margin-left: 0;
    padding: 20px;
    background-color: #fffbb5;
  }

  .section {
    padding: 1rem;
    background-color: #fffbb5;
  }

  .widgets {
    flex-direction: column;
  }

  .widget {
    width: 100%;
  }

  .user-form,
  .user-table {
    width: 100%;
    overflow-x: auto;
  }

  .button,
  .button.primary {
    width: 100%;
    font-size: 1rem;
  }

  .form-group input,
  .form-group select {
    font-size: 1rem;
  }
}