/* ============================================================
   FLINTO PORTAL CSS
   Shared layout, forms, tables, and dashboard visuals
   ============================================================ */

/* --- BASE --- */
body {
  font-family: sans-serif;
  margin: 0;
  padding: 0;
  background: #f4f4f4;
  color: #333;
}

/* --- TOP BAR --- */
.top-bar {
  width: 100%;
  background: #f5f5f5;
  padding: 8px 80px 8px 15px;
  border-bottom: 1px solid #ddd;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.brand { display: flex; align-items: center; }

.brand img {
  height: 45px;
  width: auto;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #333;
  padding-right: 40px;
  justify-content: flex-end;
  box-sizing: border-box;
}

.top-bar a { color: #003366; text-decoration: none; }
.top-bar a:hover { text-decoration: underline; }

/* --- PAGE TITLE BAR --- */
.page-title-bar {
  background-color: #003366;
  color: white;
  padding: 12px 20px;
  border-bottom: 2px solid #002244;
}
.page-title-bar h1 {
  margin: 0;
  font-size: 1.2em;
  font-weight: bold;
}

/* --- GLOBAL FILTER SECTIONS --- */
.filter-card {
  display: block;
  margin: 15px 30px;
  width: calc(100% - 60px);
}

.filter-grid {
  display: grid;
  grid-template-columns: 160px 1fr;
  align-items: center;
  gap: 10px 20px;
  max-width: 800px;
}

.filter-grid label {
  text-align: left;
  font-weight: 600;
}

.filter-grid input,
.filter-grid select {
  width: 100%;
  max-width: 300px;
  padding: 6px;
  box-sizing: border-box;
}

.filter-actions {
  display: flex;
  justify-content: flex-start;
  gap: 10px;
  margin-top: 10px;
  margin-left: 160px;
}

/* --- FORMS --- */
form { margin: 10px 0; }

input, select, textarea, button {
  font-size: 14px;
  padding: 6px;
  border: 1px solid #ccc;
  border-radius: 4px;
}
button {
  background: #003366;
  color: white;
  cursor: pointer;
}
button:hover { background: #0055aa; }

/* --- TABLES --- */
table {
  border-collapse: collapse;
  margin: 15px 30px;
  background: white;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}
th, td {
  border: 1px solid #ccc;
  padding: 6px 8px;
  vertical-align: top;
}
th { background: #f5f5f5; color: #003366; text-align: left; }

/* --- DASHBOARD TILES --- */
.grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 20px;
  padding: 20px 30px;
}
.tile {
  width: 200px;
  min-height: 70px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
  display: flex;
  justify-content: center;
  align-items: center;
  font-weight: bold;
  color: #003366;
  text-align: center;
  transition: background 0.2s ease;
}
.tile:hover { background: #eaf3ff; transform: translateY(-2px); }

/* --- MODALS --- */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0; top: 0; width: 100%; height: 100%;
  background-color: rgba(0,0,0,0.5);
  justify-content: center; align-items: center;
}
.modal-content {
  background: #fff;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}
