:root {
  --tarzan-red: #B40000;
  --tarzan-red-hover: #900000;
  --polish-blue: #1E3A8A;
  --slate-900: #0F172A;
  --slate-800: #1E293B;
  --slate-100: #F1F5F9;
  --slate-200: #E2E8F0;
  --slate-700: #334155;
  --success-green: #16A34A;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-tap-highlight-color: transparent;
}

body {
  background-color: #F8FAFC;
  color: var(--slate-900);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* App Header Bar */
.app-header {
  background: linear-gradient(135deg, var(--tarzan-red) 0%, #700000 100%);
  color: #FFFFFF;
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 4px 12px rgba(180, 0, 0, 0.2);
  position: sticky;
  top: 0;
  z-index: 100;
}

.brand-title {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 0.5px;
}

.brand-subtitle {
  font-size: 0.75rem;
  opacity: 0.9;
  font-weight: 400;
}

.user-badge {
  background: rgba(255, 255, 255, 0.2);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Container & Layout */
.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 16px;
  width: 100%;
  flex: 1;
  padding-bottom: 80px;
}

/* Cards & UI Elements */
.card {
  background: #FFFFFF;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  border: 1px solid var(--slate-200);
  margin-bottom: 16px;
}

.card-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--slate-900);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  width: 100%;
  text-decoration: none;
}

.btn-primary {
  background-color: var(--tarzan-red);
  color: #FFFFFF;
}

.btn-primary:hover {
  background-color: var(--tarzan-red-hover);
}

.btn-secondary {
  background-color: var(--polish-blue);
  color: #FFFFFF;
}

.btn-success {
  background-color: var(--success-green);
  color: #FFFFFF;
}

.btn-outline {
  background: transparent;
  border: 1.5px solid var(--slate-200);
  color: var(--slate-700);
}

/* Forms */
.form-group {
  margin-bottom: 14px;
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--slate-700);
  margin-bottom: 6px;
}

.form-control {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1.5px solid var(--slate-200);
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s;
  background-color: #FFFFFF;
}

.form-control:focus {
  border-color: var(--tarzan-red);
}

/* Bottom Navigation Bar for Mobile */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #FFFFFF;
  display: flex;
  justify-content: space-around;
  padding: 8px 0;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.08);
  border-top: 1px solid var(--slate-200);
  z-index: 90;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 0.75rem;
  color: #64748B;
  text-decoration: none;
  cursor: pointer;
  padding: 4px;
  border: none;
  background: none;
  width: 25%;
}

.nav-item.active {
  color: var(--tarzan-red);
  font-weight: 700;
}

.nav-icon {
  font-size: 1.4rem;
  margin-bottom: 2px;
}

/* Camera Preview Box */
.camera-box {
  width: 100%;
  max-width: 320px;
  height: 240px;
  background: #000000;
  border-radius: 16px;
  overflow: hidden;
  margin: 0 auto 16px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.camera-box video, .camera-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Tables */
.table-responsive {
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid var(--slate-200);
}

table {
  width: 100%;
  border-collapse: collapse;
  background: #FFFFFF;
  text-align: left;
  font-size: 0.88rem;
}

th {
  background-color: var(--slate-900);
  color: #FFFFFF;
  padding: 12px 14px;
  font-weight: 600;
}

td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--slate-200);
}

/* Modals */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 16px;
}

.modal-content {
  background: #FFFFFF;
  border-radius: 20px;
  padding: 24px;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
}

/* Utility Badges */
.badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
}

.badge-success { background: #DCFCE7; color: #166534; }
.badge-danger { background: #FEE2E2; color: #991B1B; }
.badge-info { background: #DBEAFE; color: #1E40AF; }

.hidden { display: none !important; }
