:root {
  --primary-color: #0d6efd;
  --secondary-color: #6c757d;
  --success-color: #198754;
  --danger-color: #dc3545;
  --warning-color: #ffc107;
  --info-color: #0dcaf0;
  --light-color: #f8f9fa;
  --dark-color: #212529;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  background: #1a1a2e;
  min-height: 100vh;
}

/* LOGIN STYLES */
.login-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 20px;
}

.login-card {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  width: 100%;
  max-width: 360px;
  box-shadow: 0 8px 32px rgba(31, 38, 135, 0.37);
}

.login-title {
  font-size: 32px;
  font-weight: 700;
  text-align: center;
  color: white;
  margin-bottom: 40px;
  letter-spacing: -0.5px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 40px;
}

.login-input {
  width: 100%;
  padding: 12px 16px;
  font-size: 16px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: white;
  font-family: inherit;
  transition: all 0.3s ease;
}

.login-input::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.login-input:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.5);
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
}

.login-input::selection {
  background: rgba(255, 255, 255, 0.3);
}

.login-button {
  width: 100%;
  padding: 12px 16px;
  font-size: 16px;
  font-weight: 600;
  border: none;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.25);
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 8px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.login-button:hover {
  background: rgba(255, 255, 255, 0.35);
  border-color: rgba(255, 255, 255, 0.5);
}

.login-button:active {
  transform: scale(0.98);
}

/* APP STYLES */
#appNav {
  background: #ffffff !important;
  border-bottom: 1px solid #d0d0d0;
  box-shadow: none;
  z-index: 1030;
}

#appNav .navbar-brand {
  font-size: 1.6rem;
  letter-spacing: -0.5px;
  color: #000 !important;
  font-weight: 700;
}

.app-container {
  background: #f5f5f5;
  min-height: 100vh;
  padding-top: 20px;
  padding-bottom: 40px;
}

.card {
  border: none;
  border-radius: 10px;
}

.card-header {
  border-radius: 10px 10px 0 0 !important;
  padding: 15px 20px;
  font-weight: 600;
}

.card-header.bg-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
}

.card-header h5 {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* TABS */
.nav-tabs {
  border-bottom: 2px solid #e9ecef;
}

.nav-tabs .nav-link {
  color: #6c757d;
  border: none;
  border-bottom: 3px solid transparent;
  font-weight: 500;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-tabs .nav-link:hover {
  color: #0071e3;
}

.nav-tabs .nav-link.active {
  color: #0071e3;
  border-bottom-color: #0071e3;
}

.tab-content {
  margin-top: 20px;
}

/* FORM CHECKS */
.form-check-input {
  width: 1.25em;
  height: 1.25em;
  margin-top: 0.3em;
  cursor: pointer;
}

.form-check-input:checked {
  background-color: #0071e3;
  border-color: #0071e3;
}

.form-check-label {
  cursor: pointer;
  user-select: none;
  transition: all 0.2s ease;
}

.form-check-label.completed-task {
  text-decoration: line-through;
  color: #999;
}

.task-list {
  max-height: 600px;
  overflow-y: auto;
}

/* ACCORDION */
.accordion {
  border: none;
}

.accordion-item {
  background: white;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  margin-bottom: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.accordion-item:first-child {
  border-radius: 8px;
}

.accordion-item:last-child {
  border-radius: 8px;
}

.accordion-header {
  margin: 0;
}

.accordion-button {
  padding: 16px;
  font-weight: 600;
  color: #212529;
  background: white;
  border: none;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.accordion-button:not(.collapsed) {
  background: #f5f5f5;
  color: #0071e3;
  box-shadow: none;
}

.accordion-button:focus {
  border-color: transparent;
  box-shadow: none;
}

.accordion-button::after {
  width: 1.5em;
  height: 1.5em;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%230071e3'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
}

.accordion-collapse {
  border-radius: 8px;
}

.accordion-body {
  padding: 0;
}

.category-title {
  font-size: 1.1em;
  font-weight: 600;
}

/* STOCK CHECKLIST */
.stock-checklist {
  max-height: 700px;
  overflow-y: auto;
}

.stock-checklist .category-section {
  padding: 15px 0;
}

.stock-checklist .form-check {
  padding: 10px;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.stock-checklist .form-check:hover {
  background: #f5f5f5;
}

.stock-checklist .form-check-input {
  width: 1.25em;
  height: 1.25em;
  margin-top: 0.25em;
}

.stock-checklist .form-check-input:checked {
  background-color: #0071e3;
  border-color: #0071e3;
}

.stock-checklist .item-name {
  font-weight: 500;
}

.modal-header.bg-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
}

.stock-checklist-items {
  padding: 10px 0;
}

.stock-checklist-items .form-check {
  padding: 8px;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.stock-checklist-items .form-check:hover {
  background: #f5f5f5;
}

.card-body {
  padding: 25px;
}

/* FORMS */
.form-label {
  font-weight: 500;
  color: #495057;
  font-size: 0.95rem;
}

.form-control {
  border-radius: 8px;
  border: 1px solid #e9ecef;
  padding: 10px 14px;
  transition: all 0.3s ease;
}

.form-control:focus {
  border-color: #667eea;
  box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.15);
}

.btn-primary {
  background: #0071e3;
  border: none;
  font-weight: 600;
  transition: all 0.2s ease;
}

.btn-primary:hover {
  background: #0077ed;
}

.btn-danger {
  background: #dc3545;
  border: none;
  font-weight: 500;
}

.btn-danger:hover {
  background: #c82333;
}

/* ALERTS */
.alert {
  border-radius: 8px;
  border: none;
  padding: 12px 16px;
  font-size: 0.95rem;
  margin-bottom: 16px;
}

.alert-danger {
  background: #fee;
  color: #d00;
  border: 1px solid #fcc;
}

.alert-success {
  background: #efe;
  color: #060;
  border: 1px solid #cfc;
}

#loginError {
  margin: 0 40px 24px 40px;
  background: rgba(220, 53, 69, 0.2);
  border: 1px solid rgba(220, 53, 69, 0.4);
  color: #ffdddd;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* TABLES */
.table {
  background: white;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.table-striped > tbody > tr:nth-of-type(odd) {
  background-color: #f9f9f9;
}

.table-hover > tbody > tr:hover {
  background-color: #f5f5f5;
}

.table th {
  background: #f8f9fa;
  font-weight: 600;
  color: #667eea;
  border-bottom: 2px solid #e9ecef;
  padding: 14px;
}

.table td {
  padding: 12px 14px;
  vertical-align: middle;
}

.table-sm th,
.table-sm td {
  padding: 10px;
}

/* EMPTY STATE */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: #6c757d;
}

.empty-state svg {
  width: 80px;
  height: 80px;
  margin-bottom: 20px;
  opacity: 0.5;
}

/* RESPONSIVE */
@media (max-width: 768px) {
  body {
    padding: 10px;
  }

  .login-card {
    max-width: 100%;
  }

  .login-header {
    padding: 30px 20px;
  }

  .login-header h1 {
    font-size: 2rem;
  }

  .login-form {
    padding: 30px 20px;
  }

  .app-container {
    padding-top: 15px;
  }

  #appNav .navbar-brand {
    font-size: 1.5rem;
  }

  .card-body {
    padding: 15px;
  }

  .row > .col-md-6,
  .row > .col-md-3 {
    margin-bottom: 15px;
  }
}

@media (max-width: 480px) {
  .login-header {
    padding: 25px 15px;
  }

  .login-header h1 {
    font-size: 1.8rem;
  }

  .login-icon {
    width: 50px;
    height: 50px;
  }

  .login-form {
    padding: 25px 15px;
  }

  .table {
    font-size: 0.85rem;
  }

  .table th,
  .table td {
    padding: 8px;
  }

  .btn-sm {
    padding: 0.35rem 0.6rem;
    font-size: 0.75rem;
  }
}

/* ANIMATIONS */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.login-card,
.card {
  animation: fadeIn 0.3s ease;
}

.alert {
  animation: fadeIn 0.3s ease;
}

/* UTILITIES */
.gap-3 {
  gap: 1rem;
}

.fw-bold {
  font-weight: 700;
}

.d-none {
  display: none;
}
