/* ===================================
   TAPANG CLUB - CORE THEME (Simplified)
   =================================== */

/* ==============================
   Google Fonts
   ============================== */
/* Add this to your <head> in index.html:
<link href="https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;700&family=Work+Sans:wght@400;500;600&family=Poppins:wght@400;500;600&display=swap" rel="stylesheet">
*/
:root {
  /* ========== Blue Light Theme ========== */
  --font-heading: 'Playfair Display', serif;
  --font-body: 'Work Sans', sans-serif;
  --font-alt: 'Poppins', sans-serif;

  --primary: #1565c0;         /* Deep calm blue */
  --secondary: #4f83cc;
  --accent: #82b1ff;
  --muted: #9ea7b8;
  --background: #f5f8fb;
  --text: #1e1e1e;

  /* Sidebar and layout */
  --sidebar-bg: #ffffff;
  --sidebar-text: #c2d7e3;        /* Main readable text */
  --sidebar-label: #a9b3be;       /* Softer text label (fix for dark issue) */
  --sidebar-hover: rgba(21, 101, 192, 0.1);
  --sidebar-active: rgba(21, 101, 192, 0.15);
  --border: #e0e6ef;
  --radius: 12px;
}
/* ==============================
   Global Reset & Base Styles
   ============================== */
html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  background-color: var(--background);
  color: var(--text);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5 {
  font-family: var(--font-heading);
  font-weight: 600;
}

button, label {
  font-family: var(--font-alt);
}

a {
  text-decoration: none;
  color: var(--primary);
}

/* ==============================
   Buttons
   ============================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  transition: all 0.3s ease;
  padding: 0.6rem 1.2rem;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background-color: var(--primary);
  color: #fff;
}

.btn-primary:hover {
  background-color: #163233;
  transform: translateY(-2px);
}

.btn-secondary {
  background-color: var(--secondary);
  color: #fff;
}

.btn-secondary:hover {
  background-color: #c7922d;
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}

.btn-outline:hover {
  background: var(--primary);
  color: white;
}

/* ==============================
   Sidebar Layout
   ============================== */
.app-container {
  display: flex;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
}

/* Sidebar */
.marine-sidebar {
  transition: width 0.3s ease, transform 0.3s ease;
  background-color: var(--sidebar-bg);
  color: var(--sidebar-text);
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.15);
  display: flex;
    height: 100vh;  
  flex-direction: column;
  overflow: hidden;
}

.marine-sidebar.expanded {
  width: 350px;
}

.marine-sidebar.collapsed {
  width: 68px;
}

/* Sidebar Header */
.sidebar-header {
  height: 64px;
  display: flex;
  align-items: center;
  padding: 0 14px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    flex-shrink: 0; 
}

.sidebar-toggle {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.sidebar-toggle:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

.sidebar-title {
  display: flex;
  align-items: center;
  margin-left: 12px;
  white-space: nowrap;
}

.sidebar-title span {
  font-size: 1.0rem;
  font-weight: 600;
  margin-left: 8px;
}

/* Sidebar Items */
.sidebar-section {
  padding: 8px 8px;
   /* flex: 1;     */
  overflow-y: auto;    
}

.sidebar-item {
  display: flex;
  align-items: center;
  padding: 8px 10px;
  margin-bottom: 4px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  /* white-space: nowrap; */
}

.sidebar-item:hover {
  background-color: var(--sidebar-hover);
}

.item-icon {
  width: 24px;
  height: 24px;
  margin-right:10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.item-text {
  margin-left: 16px;
  font-size: 0.8rem;
  font-weight: 500;
}

/* Divider */
.sidebar-divider {
  height: 1px;
  margin: 8px 12px;
  background: rgba(0, 0, 0, 0.1);
}

.bottom-section {
  flex-shrink: 0;           /* ✅ footer doesn’t shrink */
  position: sticky;         /* ✅ sticks to bottom when scrolling */
  bottom: 0;
  background-color: var(--sidebar-bg);
  border-top: 1px solid rgba(255,255,255,0.1);
}





.loading-overlay {
  position: fixed;
  inset: 0; /* shorthand for top, right, bottom, left = 0 */
  background-color: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999; /* ensure it’s on top of dialogs and modals */
  color: white;
  flex-direction: column;
  font-size: 1.1rem;
}


.snackbar {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  color: white;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 500;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  animation: fadeInUp 0.3s ease, fadeOutDown 0.3s ease 3.2s forwards;
  z-index: 9999;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translate(-50%, 30px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

@keyframes fadeOutDown {
  to { opacity: 0; transform: translate(-50%, 20px); }
}

/* ==============================
   Card & Utility Elements
   ============================== */
.card {
  background-color: #fff;
  border-radius: var(--radius);
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  padding: 1.2rem;
}




.text-truncate-2-lines {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 9999px;
  padding: 0.125rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 500;
}

.badge-primary {
  background-color: var(--primary);
  color: white;
}

.badge-secondary {
  background-color: var(--secondary);
  color: white;
}

/* ==============================
   Dark / Light Mode
   ============================== */
body.light-mode {
  background-color: #f9f9f9;
  color: #1e1e1e;
}
body.dark-mode {
  background-color: #1e1e1e;
  color: #f0f0f0;
}

/* ==============================
   Custom Data Table Styles
   ============================== */
.custom-table-wrapper {
  overflow-x: auto;
}

.custom-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background-color: white;
  font-family: 'Roboto', sans-serif;
}

.custom-table thead {
  background-color: rgb(var(--v-theme-surface));
  position: sticky;
  top: 0;
  z-index: 10;
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.12);
}

.custom-table th {
  padding: 6px;
  text-align: left;
  font-weight: 500;
  font-size: 0.75rem;
  color: rgba(0, 0, 0, 0.6);
  text-transform: uppercase;
  letter-spacing: 0.0892857143em;
  white-space: nowrap;
  line-height: 1.2rem;
}

.custom-table td {
  padding: 6px;
  font-size: 0.8rem;
  color: rgba(0, 0, 0, 0.87);
  border-bottom: thin solid rgba(0, 0, 0, 0.12);
  line-height: 1.0rem;
  vertical-align: middle;
}

.custom-table tbody tr.hover-row {
  transition: background-color 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.custom-table tbody tr.hover-row:hover {
  background-color: rgba(0, 0, 0, 0.04);
}

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

/* Totals footer row styling */
.custom-table tfoot tr.totals-row {
  background-color: #eceff1;
  border-top: 2px solid rgba(0, 0, 0, 0.38);
}

.custom-table tfoot td {
  padding: 6px;
  font-weight: 500;
  font-size: 0.875rem;
}

/* Ensure v-chip displays properly in custom table */
.custom-table .v-chip {
  height: 24px;
}

/* Scrollbar styling for custom table */
.custom-table-wrapper::-webkit-scrollbar {
  height: 8px;
}

.custom-table-wrapper::-webkit-scrollbar-track {
  background: #f1f1f1;
}

.custom-table-wrapper::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 4px;
}

.custom-table-wrapper::-webkit-scrollbar-thumb:hover {
  background: #555;
}

/* ==============================
   Responsive
   ============================== */
@media (max-width: 768px) {
  .marine-sidebar.expanded {
    width: 200px;
  }
  .sidebar-item .item-text {
    font-size: 0.85rem;
  }
}
