/* ================= BASE ================= */
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: Arial, Helvetica, sans-serif; background: #f5f7fa; color: #333; min-height: 100vh; }
a { text-decoration: none; color: inherit; }
button { cursor: pointer; border: none; }
input, select { outline: none; }

/* ================= AUTH PAGE ================= */
.auth-page {
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}
.auth-card {
  background: #fff; border-radius: 16px; padding: 40px; width: 100%; max-width: 420px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.15); animation: fadeSlide 0.5s ease-out;
}
.auth-logo { text-align: center; margin-bottom: 30px; }
.auth-logo h1 { color: #0057a3; font-size: 28px; margin-bottom: 4px; }
.auth-logo p { color: #888; font-size: 14px; }
.auth-card h2 { color: #333; margin-bottom: 20px; text-align: center; font-size: 20px; }
.auth-card input {
  width: 100%; padding: 14px 16px; margin-bottom: 14px; border: 2px solid #e0e0e0;
  border-radius: 10px; font-size: 15px; transition: border-color 0.3s;
}
.auth-card input:focus { border-color: #667eea; }
.auth-card button {
  width: 100%; padding: 14px; background: linear-gradient(135deg, #667eea, #764ba2);
  color: #fff; border-radius: 10px; font-size: 16px; font-weight: bold;
  transition: opacity 0.3s; margin-bottom: 10px;
}
.auth-card button:hover { opacity: 0.9; }
.auth-card .link { text-align: center; color: #667eea; cursor: pointer; font-size: 14px; margin-top: 8px; }
.auth-card .link:hover { text-decoration: underline; }
.auth-message { text-align: center; padding: 10px; border-radius: 8px; margin-top: 12px; font-size: 14px; }
.auth-message.error { background: #ffeaea; color: #c62828; }
.auth-message.success { background: #e8f5e9; color: #2e7d32; }
.auth-message.info { background: #e3f2fd; color: #1565c0; }
.auth-message:empty { display: none; }

/* ================= LAUNCHER ================= */
.launcher {
  max-width: 1200px; margin: 0 auto; padding: 30px 20px; min-height: 100vh;
  display: flex; flex-direction: column;
}
.launcher-header { text-align: center; margin-bottom: 30px; position: relative; }
.title { font-size: 32px; color: #0057a3; }
.subtitle { color: #888; font-size: 14px; margin-top: 4px; }
.user-info { position: absolute; top: 0; right: 0; display: flex; align-items: center; gap: 12px; }
.user-info span { color: #555; font-size: 14px; }
.btn-logout {
  background: #ef5350; color: #fff; padding: 8px 16px; border-radius: 8px; font-size: 13px;
}

.launcher-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px; margin-bottom: 40px;
}
.launcher-card {
  background: #fff; border-radius: 16px; padding: 30px 20px; text-align: center;
  box-shadow: 0 4px 16px rgba(0,0,0,0.06); transition: transform 0.2s, box-shadow 0.2s;
  animation: fadeSlide 0.6s ease-out;
}
.launcher-card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(0,0,0,0.12); }
.card-icon { font-size: 40px; margin-bottom: 12px; }
.launcher-card h3 { color: #0057a3; font-size: 18px; margin-bottom: 6px; }
.launcher-card p { color: #888; font-size: 13px; }

.launcher-stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px; margin-bottom: 30px;
}
.stat-card {
  background: #fff; border-radius: 12px; padding: 20px; text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.stat-card h4 { font-size: 24px; color: #0057a3; margin-bottom: 4px; }
.stat-card p { color: #888; font-size: 13px; }

.launcher-footer { text-align: center; margin-top: auto; padding: 20px 0; color: #aaa; font-size: 12px; }

/* ================= DATA TABLE ================= */
.page-container { max-width: 1400px; margin: 0 auto; padding: 20px; }
.page-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 20px; flex-wrap: wrap; gap: 10px;
}
.page-header h1 { font-size: 24px; color: #0057a3; }
.btn { padding: 10px 20px; border-radius: 8px; font-size: 14px; font-weight: 600; }
.btn-primary { background: #0057a3; color: #fff; }
.btn-secondary { background: #e0e0e0; color: #333; }
.btn-danger { background: #ef5350; color: #fff; }
.btn-success { background: #43a047; color: #fff; }
.btn:hover { opacity: 0.9; }

.search-bar {
  width: 100%; max-width: 400px; padding: 12px 16px; border: 2px solid #e0e0e0;
  border-radius: 10px; font-size: 15px; margin-bottom: 16px;
}
.search-bar:focus { border-color: #0057a3; }

.data-table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 12px; overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.data-table th { background: #0057a3; color: #fff; padding: 14px 12px; text-align: left; font-size: 13px; white-space: nowrap; }
.data-table td { padding: 12px; border-bottom: 1px solid #f0f0f0; font-size: 14px; }
.data-table tr:hover { background: #f8f9ff; }
.data-table tr.deleted { opacity: 0.5; background: #fff5f5; }

.pagination { display: flex; justify-content: center; align-items: center; gap: 8px; margin-top: 20px; }
.pagination button { padding: 8px 14px; border-radius: 6px; background: #e0e0e0; font-size: 13px; }
.pagination button.active { background: #0057a3; color: #fff; }
.pagination button:disabled { opacity: 0.4; cursor: not-allowed; }

/* ================= OVERLAY (for quotation/client search) ================= */
.overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); z-index: 1000; display: flex; align-items: center; justify-content: center; }
.overlay-content { background: #fff; border-radius: 16px; padding: 24px; width: 90%; max-width: 900px; max-height: 80vh; overflow-y: auto; }
.overlay-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.overlay-close { font-size: 24px; cursor: pointer; color: #888; }

/* ================= MODAL ================= */
.modal-backdrop { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.4); z-index: 2000; display: flex; align-items: center; justify-content: center; }
.modal { background: #fff; border-radius: 12px; padding: 30px; max-width: 400px; width: 90%; text-align: center; }
.modal h3 { margin-bottom: 16px; color: #333; }
.modal .modal-actions { display: flex; gap: 10px; justify-content: center; margin-top: 20px; }

/* ================= ALERT ================= */
.alert-toast {
  position: fixed; top: 20px; right: 20px; z-index: 3000;
  padding: 14px 24px; border-radius: 10px; color: #fff; font-size: 14px;
  animation: slideIn 0.3s ease-out; max-width: 400px;
}
.alert-toast.success { background: #43a047; }
.alert-toast.error { background: #ef5350; }
.alert-toast.info { background: #1976d2; }

/* ================= SKELETON LOADING ================= */
.skeleton { background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%); background-size: 200% 100%; animation: shimmer 1.5s infinite; border-radius: 4px; height: 16px; }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ================= RESPONSIVE ================= */
@media (max-width: 768px) {
  .launcher-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .launcher-card { padding: 20px 12px; }
  .card-icon { font-size: 30px; }
  .launcher-card h3 { font-size: 15px; }
  .page-header { flex-direction: column; align-items: flex-start; }
  .data-table { font-size: 12px; }
  .data-table th, .data-table td { padding: 8px 6px; }
  .user-info { position: static; justify-content: center; margin-top: 10px; }
  .auth-card { margin: 16px; padding: 24px; }
}

@media (max-width: 480px) {
  .launcher-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .launcher-stats { grid-template-columns: 1fr 1fr; }
  .title { font-size: 24px; }
}

/* ================= ANIMATIONS ================= */
@keyframes fadeSlide { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideIn { from { opacity: 0; transform: translateX(100px); } to { opacity: 1; transform: translateX(0); } }

/* ================= ADMIN PANEL ================= */
.admin-tabs { display: flex; gap: 4px; margin-bottom: 20px; flex-wrap: wrap; }
.admin-tab {
  padding: 10px 20px; border-radius: 8px 8px 0 0; background: #e0e0e0;
  font-size: 14px; cursor: pointer; font-weight: 600;
}
.admin-tab.active { background: #0057a3; color: #fff; }
.admin-section { display: none; }
.admin-section.active { display: block; }

/* ================= FORM (Calculator) ================= */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 13px; color: #555; margin-bottom: 4px; font-weight: 600; }
.form-group input, .form-group select {
  width: 100%; padding: 10px 12px; border: 2px solid #e0e0e0; border-radius: 8px; font-size: 14px;
}
.form-group input:focus, .form-group select:focus { border-color: #0057a3; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.form-section { background: #fff; border-radius: 12px; padding: 20px; margin-bottom: 20px; box-shadow: 0 2px 8px rgba(0,0,0,0.05); }
.form-section h3 { color: #0057a3; margin-bottom: 16px; font-size: 16px; border-bottom: 2px solid #e8f0fe; padding-bottom: 8px; }

.checkbox-group { display: flex; align-items: center; gap: 8px; padding: 8px 0; }
.checkbox-group input[type="checkbox"] { width: 18px; height: 18px; }
.checkbox-group label { font-size: 14px; color: #333; cursor: pointer; }

/* ================= CYLINDERS TABLE ================= */
.cylinders-table { width: 100%; border-collapse: collapse; }
.cylinders-table th { background: #f5f7fa; padding: 10px; text-align: center; font-size: 13px; color: #555; }
.cylinders-table td { padding: 6px; }
.cylinders-table input { width: 100%; text-align: center; padding: 8px; border: 1px solid #ddd; border-radius: 6px; }
.cylinders-table .total-row td { font-weight: bold; background: #e8f0fe; padding: 10px; }

/* ================= PRICING DISPLAY ================= */
.pricing-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px; margin-top: 16px;
}
.price-card {
  background: #f8f9ff; border: 2px solid #e0e8f5; border-radius: 10px; padding: 16px; text-align: center;
}
.price-card .label { font-size: 12px; color: #888; text-transform: uppercase; margin-bottom: 4px; }
.price-card .value { font-size: 22px; font-weight: bold; color: #0057a3; }
.price-card .currency { font-size: 12px; color: #888; }
