/**
 * TransportPro POS Theme Colors
 * 
 * Future Color Changing System:
 * All brand colors are controlled from these variables.
 * To change the brand color, simply update --tp-primary and its variants below.
 */

/* Variables are now exclusively managed via dynamic_style.php and variables.css */

[data-theme-version="dark"] {
  --tp-bg: #151521;
  --tp-card-bg: #1f1f2e;
  --tp-text: #ffffff;
  --tp-muted: #a8a8b8;
  --tp-border: #303044;

  --tp-sidebar-bg: #1b1b2b;
  --tp-sidebar-text: #b8b8c8;
  --tp-sidebar-active-bg: rgba(66, 56, 157, 0.35);
  --tp-sidebar-active-text: #ffffff;
  
  /* Map Fasto's native variable to ours for redundancy */
  --primary: var(--tp-primary);
}

/* Flash Alerts */
.alert-success { background: #198754 !important; border-color: #198754 !important; color: #ffffff !important; }
.alert-danger { background: #dc3545 !important; border-color: #dc3545 !important; color: #ffffff !important; }
.alert-info { background: #0dcaf0 !important; border-color: #0dcaf0 !important; color: #052c65 !important; }
.alert-warning { background: #ffc107 !important; border-color: #ffc107 !important; color: #3b2f00 !important; }
.alert .btn-close { filter: brightness(0) invert(1); }
.alert-warning .btn-close, .alert-info .btn-close { filter: none; }
.alert { border-radius: 12px; padding: 14px 18px; font-weight: 500; margin-bottom: 18px; }

/* Profile Upload & Avatars */
.tp-upload-box { display: flex; align-items: center; gap: 16px; padding: 16px; border: 1px dashed var(--tp-border); border-radius: 14px; background: var(--tp-card-bg); margin-top: 5px; }
.tp-avatar-preview { width: 82px; height: 82px; border-radius: 50%; object-fit: cover; border: 3px solid var(--tp-primary-soft); background-color: #f4f6fc; }
.tp-topbar-avatar { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; background-color: #f4f6fc; border: 2px solid #fff; box-shadow: 0 2px 4px rgba(0,0,0,0.05); }
.tp-user-avatar-sm { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; background-color: #f4f6fc; }

/* Sidebar Logo Sizing */
.nav-header .brand-logo,
.sidebar-brand,
.tp-brand {
  width: 100%;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px 18px;
  overflow: hidden;
}

.tp-logo-full {
  display: block !important;
  max-width: 150px;
  max-height: 52px;
  width: auto;
  height: auto;
  object-fit: contain;
}

.tp-logo-icon {
  display: none !important;
  width: 42px;
  height: 42px;
  object-fit: contain;
}

#main-wrapper.menu-toggle .tp-logo-full {
  display: none !important;
}

#main-wrapper.menu-toggle .tp-logo-icon {
  display: block !important;
}

#main-wrapper.menu-toggle .nav-header .brand-logo {
  justify-content: center;
  padding: 12px 8px;
}

@media (max-width: 768px) {
  .nav-header {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
  }

  .nav-control {
    position: static !important;
    right: auto !important;
    margin-left: 15px !important;
    transform: none !important;
    z-index: 2;
  }

  .nav-header .brand-logo,
  .sidebar-brand,
  .tp-brand {
    width: auto;
    max-width: 150px;
    min-width: 110px;
    overflow: visible;
    padding-left: 12px;
    padding-right: 8px;
  }

  .tp-logo-full,
  .tp-brand-logo,
  .tp-brand-logo-full {
    max-width: 120px;
    max-height: 42px;
    width: auto;
    height: auto;
    object-fit: contain;
    object-position: left center;
  }
}


