/* ==========================================================
   Fleet Manager - Unified Theme (Modern Dark Blue)
   Author: Mason
   ========================================================== */

:root{
  /* Core palette */
  --bg-0: #001233;          /* page background */
  --bg-1: #001845;          /* panels/cards */
  --bg-2: #002855;          /* elevated controls */
  --border: #023E7D;        /* borders */
  --border-soft: rgba(2, 62, 125, 0.55);

  /* Accents */
  --primary: #0466C8;
  --primary-hover: #0353A4;
  --primary-soft: rgba(4, 102, 200, 0.22);

  --success: #2E8B57;
  --warning: #FFBE0B;
  --danger:  #E63946;

  /* Text */
  --text: #E8EEF6;
  --text-2: rgba(232, 238, 246, 0.82);
  --muted: rgba(232, 238, 246, 0.64);
  --muted-2: rgba(232, 238, 246, 0.50);

  /* Effects */
  --shadow: 0 22px 60px rgba(0, 0, 0, 0.55);
  --shadow-soft: 0 10px 26px rgba(0, 0, 0, 0.35);
  --radius: 14px;
  --radius-sm: 10px;

  /* Form */
  --input-bg: rgba(0, 0, 0, 0.22);
  --input-bg-2: rgba(0, 0, 0, 0.30);
  --input-border: rgba(2, 62, 125, 0.75);
  --focus: rgba(4, 102, 200, 0.35);
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
}

body{
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, "Noto Sans", "Apple Color Emoji","Segoe UI Emoji";
  background: var(--bg-0);
  color: var(--text);
  overflow-x: hidden;
}

/* ==========================================================
   Full-screen background w/ blur overlay
   ========================================================== */

.bg-screen{
  min-height: 100vh;
  position: relative;
  display:flex;
  align-items:center;
  justify-content:center;
  padding: 24px;
  overflow:hidden;
}

/* Always overfill edges to avoid any border/frame artifacts */
.bg-screen::before{
  content:"";
  position:absolute;
  inset:-40px;
  background: url('/images/background.png') center/cover no-repeat;
  filter: saturate(0.95) contrast(1.05);
  z-index: 0;
}

.bg-screen::after{
  content:"";
  position:absolute;
  inset:-40px;
  background: rgba(0, 18, 51, 0.62);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 1;
}

.center-panel{
  width: 100%;
  max-width: 560px;
  position: relative;
  z-index: 2;
}

.panel-card{
  position: relative;
  background: rgba(0, 24, 69, 0.88);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 34px;
  overflow:hidden;
}

.panel-card::before{
  content:"";
  position:absolute;
  top:0; left:0;
  width:100%;
  height:4px;
  background: linear-gradient(90deg, var(--primary), var(--success));
  z-index: 0;
}

.panel-card > * { position: relative; z-index: 1; }

/* Typography inside panel */
.panel-title{
  font-size: 2.05rem;
  font-weight: 900;
  letter-spacing: 0.6px;
  margin: 0 0 10px 0;
  color: var(--text);
}

.panel-subtitle{
  margin: 0 0 18px 0;
  font-size: 1.05rem;
  color: var(--text-2);
  line-height: 1.45;
}

.small-meta{
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--border-soft);
  color: var(--muted);
  font-size: 0.88rem;
  display:flex;
  justify-content:space-between;
  gap: 12px;
  flex-wrap: wrap;
}

/* ==========================================================
   Buttons
   ========================================================== */

.btn-main{
  -webkit-appearance:none;
  appearance:none;
  display:flex;
  align-items:center;
  justify-content:center;
  gap: 10px;
  width:100%;
  padding: 14px 16px;
  border-radius: 12px;
  font-weight: 800;
  letter-spacing: 0.2px;
  text-decoration:none;
  cursor:pointer;
  transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease, border-color .15s ease;
  user-select:none;
}

.btn-primary-custom{
  background: var(--primary);
  color: #fff;
  box-shadow: 0 8px 26px rgba(4, 102, 200, 0.35);
  border: 1px solid rgba(4, 102, 200, 0.55);
}

.btn-primary-custom:hover{
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(4, 102, 200, 0.45);
}

.btn-secondary-custom{
  background: rgba(0,0,0,0.20);
  border: 1px solid var(--border-soft);
  color: var(--text);
  box-shadow: var(--shadow-soft);
}

.btn-secondary-custom:hover{
  background: rgba(0,0,0,0.28);
  transform: translateY(-2px);
}

/* Button container */
.panel-actions{
  display:grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 6px;
}

/* Ensure anchors render like buttons */
.panel-actions a.btn-main,
.panel-actions button.btn-main{
  color: inherit;
}

/* ==========================================================
   Inputs / Selects
   ========================================================== */

.form-row{ margin-top: 12px; }

.input,
select.input,
textarea.input{
  width: 100%;
  padding: 14px 14px;
  border-radius: 12px;
  border: 1px solid var(--input-border);
  background: var(--input-bg);
  color: var(--text);
  outline: none;
  font-size: 1rem;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.08);
  transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}

.input::placeholder{ color: rgba(232, 238, 246, 0.55); }

.input:focus,
select.input:focus,
textarea.input:focus{
  border-color: rgba(4, 102, 200, 0.90);
  box-shadow: 0 0 0 4px var(--focus);
  background: var(--input-bg-2);
}

/* Make select arrow look consistent */
select.input{
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, rgba(232,238,246,0.85) 50%),
    linear-gradient(135deg, rgba(232,238,246,0.85) 50%, transparent 50%),
    linear-gradient(to right, transparent, transparent);
  background-position:
    calc(100% - 20px) 50%,
    calc(100% - 14px) 50%,
    100% 0;
  background-size:
    6px 6px,
    6px 6px,
    2.5em 2.5em;
  background-repeat: no-repeat;
  padding-right: 46px;
}

/* ==========================================================
   Links / Errors / Small elements
   ========================================================== */

.link{
  color: #9ecbff;
  text-decoration: none;
}
.link:hover{ text-decoration: underline; }

.error{
  margin-top: 12px;
  color: #ffd0d4;
  font-size: 0.95rem;
}

.status-dot{
  height: 8px;
  width: 8px;
  background: var(--success);
  border-radius: 50%;
  display: inline-block;
  margin-right: 6px;
  box-shadow: 0 0 10px rgba(46, 139, 87, 0.85);
}

/* ==========================================================
   Optional: dashboard/table styles (future use)
   ========================================================== */

.section-title{
  font-size: 1.05rem;
  font-weight: 900;
  letter-spacing: 0.5px;
  color: var(--text);
  margin: 0 0 10px 0;
  border-bottom: 2px solid var(--border-soft);
  padding-bottom: 8px;
}

.badge-status{
  font-weight: 900;
  font-size: 0.78rem;
  padding: 7px 10px;
  border-radius: 999px;
  letter-spacing: 0.6px;
  display: inline-block;
  border: 1px solid rgba(255,255,255,0.15);
}

.status-operational { background: rgba(46, 139, 87, 0.16); color: #b6f3d0; border-color: rgba(46,139,87,0.35); }
.status-reserved    { background: rgba(255, 190, 11, 0.14); color: #ffe3a3; border-color: rgba(255,190,11,0.35); }
.status-defected    { background: rgba(230, 57, 70, 0.14); color: #ffd0d4; border-color: rgba(230,57,70,0.35); }
.status-garage      { background: rgba(4, 102, 200, 0.14); color: #cfe6ff; border-color: rgba(4,102,200,0.35); }


/* ==========================================================
   WALL DASHBOARD (big screen)
   ========================================================== */

.wall-body{
  background: var(--bg-0);
  color: var(--text);
  margin: 0;
  padding: 0;
}

.wall-shell{
  width: 100%;
  max-width: 1680px;
  margin: 0 auto;
  padding: 18px 18px 10px;
}

.wall-top{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap: 16px;
  padding: 14px 16px;
  background: rgba(0, 24, 69, 0.82);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.wall-title{
  font-size: 1.35rem;
  font-weight: 900;
  letter-spacing: 0.4px;
  margin: 0;
}

.wall-subtitle{
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.95rem;
}

.wall-actions{
  display:flex;
  align-items:center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content:flex-end;
}

.btn-small{
  width:auto;
  padding: 10px 12px;
  border-radius: 12px;
  font-weight: 800;
}

.wall-pill{
  min-width: 180px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border-soft);
  background: rgba(0,0,0,0.18);
  box-shadow: var(--shadow-soft);
}

.wall-pill-label{
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 2px;
}

.wall-pill-value{
  font-size: 1.05rem;
  font-weight: 900;
  color: var(--text);
}

.wall-stats{
  display:flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
  margin-bottom: 12px;
}

.stat-chip{
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border-soft);
  background: rgba(0,0,0,0.16);
  min-width: 150px;
}

.stat-chip span{
  color: var(--muted);
  font-size: 0.88rem;
}

.stat-chip strong{
  color: var(--text);
  font-size: 1.05rem;
  font-weight: 900;
}

.wall-tablewrap{
  border-radius: var(--radius);
  overflow:hidden;
  border: 1px solid var(--border-soft);
  background: rgba(0, 24, 69, 0.65);
  box-shadow: var(--shadow-soft);
}

.wall-table{
  width: 100%;
  border-collapse: collapse;
}

.wall-table thead th{
  text-align:left;
  padding: 12px 12px;
  font-size: 0.9rem;
  color: var(--text);
  background: rgba(0,0,0,0.22);
  border-bottom: 1px solid var(--border-soft);
  letter-spacing: 0.2px;
}

.wall-table tbody td{
  padding: 12px 12px;
  border-bottom: 1px solid rgba(2, 62, 125, 0.30);
  color: var(--text-2);
  vertical-align: middle;
  font-size: 0.95rem;
}

.wall-table tbody tr:last-child td{ border-bottom: none; }

.vrm{
  font-weight: 900;
  color: var(--text);
  letter-spacing: 0.8px;
}

.wall-muted{
  color: var(--muted-2);
}

.wall-error{
  color: #fff;
  background: rgba(230,57,70,0.18);
  border-left: 4px solid var(--danger);
  font-weight: 800;
}

.status-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding: 6px 10px;
  border-radius: 999px;
  font-weight: 900;
  font-size: 0.82rem;
  border: 1px solid rgba(255,255,255,0.18);
}

.badge-available{ background: rgba(46,139,87,0.22); color: #eafff2; border-color: rgba(46,139,87,0.55); }
.badge-out, .badge-checked_out{ background: rgba(4,102,200,0.22); color: #eaf3ff; border-color: rgba(4,102,200,0.55); }
.badge-garage{ background: rgba(255,190,11,0.18); color: #fff7dd; border-color: rgba(255,190,11,0.55); }
.badge-offline{ background: rgba(230,57,70,0.18); color: #ffe9ec; border-color: rgba(230,57,70,0.55); }

.row-available{ background: rgba(46,139,87,0.06); }
.row-out, .row-checked_out{ background: rgba(4,102,200,0.06); }
.row-garage{ background: rgba(255,190,11,0.06); }
.row-offline{ background: rgba(230,57,70,0.06); }

.wall-footer{
  margin-top: 10px;
  color: var(--muted-2);
  font-size: 0.85rem;
  text-align:right;
}

@media (max-width: 900px){
  .wall-shell{ padding: 12px; }
  .stat-chip{ min-width: 120px; }
  .wall-pill{ min-width: 140px; }
  .wall-table thead{ display:none; }
  .wall-table, .wall-table tbody, .wall-table tr, .wall-table td { display:block; width:100%; }
  .wall-table tbody td{ padding: 10px 12px; border-bottom: 1px solid rgba(2, 62, 125, 0.20); }
  .wall-table tbody tr{ padding: 10px 0; }
}
