/*
 *= require_tree .
 *= require_self
 */

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

.ts-wrapper { width: 100%; }
.ts-control {
  font-size: 13px;
  padding: 8px 10px;
  border-radius: 6px;
  border: 0.5px solid #ddd;
  background: white;
  color: #1a1a1a;
  cursor: text;
}
.ts-dropdown {
  font-size: 13px;
  border: 0.5px solid #ddd;
  border-radius: 6px;
  background: white;
  margin-top: 2px;
}
.ts-dropdown .option { padding: 8px 10px; cursor: pointer; }
.ts-dropdown .option:hover,
.ts-dropdown .option.active { background: #f5f5f3; }
.ts-dropdown .selected { background: #f0f0ee; font-weight: bold; }

body {
  font-family: Arial, sans-serif;
  font-size: 14px;
  background: #f5f5f3;
  color: #1a1a1a;
}

.navbar {
  background: white;
  border-bottom: 0.5px solid #ddd;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 52px;
  position: sticky;
  top: 0;
  z-index: 100;
}

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

.navbar-brand {
  font-size: 14px;
  font-weight: bold;
  color: #1a1a1a;
  text-decoration: none;
  border-right: 0.5px solid #ddd;
  padding-right: 2rem;
}

.navbar-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.navbar-links a {
  font-size: 13px;
  color: #666;
  padding: 6px 12px;
  border-radius: 6px;
  text-decoration: none;
}

.navbar-links a:hover {
  background: #f5f5f3;
  color: #1a1a1a;
}

.navbar-links a.active {
  background: #f0f0ee;
  color: #1a1a1a;
  font-weight: bold;
}

.navbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.navbar-user {
  font-size: 12px;
  color: #888;
}

.navbar-logout {
  font-size: 12px;
  color: #666;
  padding: 5px 10px;
  border-radius: 6px;
  border: 0.5px solid #ddd;
  text-decoration: none;
  background: white;
  cursor: pointer;
}

.navbar-logout:hover { background: #f5f5f3; }

.main-content {
  padding: 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
}

.page-header h1 {
  font-size: 20px;
  font-weight: bold;
}

.page-header p {
  font-size: 13px;
  color: #888;
  margin-top: 2px;
}

.btn {
  font-size: 13px;
  padding: 7px 14px;
  border-radius: 6px;
  border: 0.5px solid #ddd;
  background: white;
  cursor: pointer;
  text-decoration: none;
  color: #1a1a1a;
  display: inline-block;
}

.btn:hover { background: #f5f5f3; }

.btn-primary {
  background: #1a1a1a;
  color: white;
  border-color: #1a1a1a;
}

.btn-primary:hover { background: #333; }

.btn-danger {
  background: white;
  color: #c0392b;
  border-color: #e0b0ad;
}

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

.card {
  background: white;
  border: 0.5px solid #ddd;
  border-radius: 8px;
  overflow: hidden;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

thead th {
  text-align: left;
  padding: 10px 16px;
  font-size: 11px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #888;
  border-bottom: 0.5px solid #eee;
  background: #fafaf9;
}

tbody td {
  padding: 12px 16px;
  border-bottom: 0.5px solid #f0f0f0;
  color: #1a1a1a;
}

tbody tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: #fafaf9; }

.table-actions { display: flex; gap: 8px; }

.table-actions a {
  font-size: 12px;
  color: #666;
  text-decoration: none;
  padding: 3px 8px;
  border-radius: 4px;
  border: 0.5px solid #eee;
}

.table-actions a:hover { background: #f5f5f3; color: #1a1a1a; }
.table-actions a.danger { color: #c0392b; border-color: #e0b0ad; }
.table-actions a.danger:hover { background: #fdf0ef; }

.search-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 1rem;
  align-items: center;
}

.search-bar input, .search-bar select {
  font-size: 13px;
  padding: 7px 10px;
  border-radius: 6px;
  border: 0.5px solid #ddd;
  background: white;
  color: #1a1a1a;
}

.search-bar input:focus, .search-bar select:focus {
  outline: none;
  border-color: #999;
}

.flash {
  padding: 10px 16px;
  border-radius: 6px;
  margin-bottom: 1rem;
  font-size: 13px;
}

.flash-notice {
  background: #eaf3de;
  color: #3b6d11;
  border: 0.5px solid #c0dd97;
}

.flash-alert {
  background: #fcebeb;
  color: #a32d2d;
  border: 0.5px solid #f7c1c1;
}

.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  font-size: 12px;
  font-weight: bold;
  color: #666;
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  font-size: 13px;
  padding: 8px 10px;
  border-radius: 6px;
  border: 0.5px solid #ddd;
  background: white;
  color: #1a1a1a;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #999;
}

.form-group textarea { min-height: 80px; resize: vertical; }

.form-errors {
  background: #fcebeb;
  border: 0.5px solid #f7c1c1;
  border-radius: 6px;
  padding: 10px 16px;
  margin-bottom: 1rem;
  font-size: 13px;
  color: #a32d2d;
}

.form-actions {
  display: flex;
  gap: 8px;
  margin-top: 1.5rem;
}

.two-col-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 1.5rem;
}

.expiry-banner {
  background: #fff8e6;
  border-bottom: 0.5px solid #f0d080;
  padding: 10px 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.expiry-banner-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.expiry-banner-icon { font-size: 16px; }

.expiry-banner-title {
  font-size: 13px;
  font-weight: bold;
  color: #7a5c00;
  margin-bottom: 2px;
}

.expiry-banner-products {
  font-size: 12px;
  color: #7a5c00;
}

.expiry-tag {
  display: inline-block;
  background: #fde68a;
  border: 0.5px solid #f0d080;
  border-radius: 4px;
  padding: 1px 7px;
  font-size: 11px;
  font-weight: bold;
  color: #7a5c00;
  margin-right: 2px;
}

.expiry-banner-close {
  font-size: 20px;
  color: #999;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0 4px;
  line-height: 1;
  flex-shrink: 0;
}

.expiry-banner-close:hover { color: #555; }

.pagy {
  display: flex;
  gap: 4px;
  align-items: center;
  list-style: none;
}

.pagy a, .pagy span {
  font-size: 13px;
  padding: 5px 10px;
  border-radius: 6px;
  border: 0.5px solid #ddd;
  background: white;
  color: #1a1a1a;
  text-decoration: none;
  display: inline-block;
}

.pagy a:hover { background: #f5f5f3; }

.pagy span.current {
  background: #1a1a1a;
  color: white;
  border-color: #1a1a1a;
  font-weight: bold;
}

.pagy span.gap { border: none; background: none; color: #888; }

a.expiry-tag {
  text-decoration: none;
  cursor: pointer;
}

a.expiry-tag:hover {
  background: #fbbf24;
}

.login-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f5f5f3;
  padding: 1.5rem;
  margin: -1.5rem;

}

.login-card {
  background: white;
  border: 0.5px solid #ddd;
  border-radius: 12px;
  padding: 2rem;
  width: 100%;
  max-width: 380px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.06);
}

.login-header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.login-logo {
  max-height: 60px;
  max-width: 200px;
  object-fit: contain;
  margin-bottom: 0.75rem;
}

.login-brand {
  font-size: 20px;
  font-weight: bold;
  color: #1a1a1a;
  margin-bottom: 0.5rem;
}

.login-subtitle {
  font-size: 13px;
  color: #888;
}

.login-submit {
  width: 100%;
  text-align: center;
  margin-top: 0.5rem;
  padding: 9px;
}

.login-footer {
  text-align: center;
  margin-top: 1.25rem;
  font-size: 12px;
}

.login-footer a {
  color: #888;
  text-decoration: none;
}

.login-footer a:hover {
  color: #1a1a1a;
}