/* Paznic.com – Bootstrap 5 theme */

/* Force all buttons to small size */
.btn { font-size: 0.875rem; padding: 0.25rem 0.5rem; }

:root {
  --sidebar-width: 240px;
  --topbar-height: 52px;
  --content-bg: #f1f5f9;
  --pzn-primary: #1050B4;
  --pzn-primary-hover: #0d408d;
}

body {
  background: #ffffff;
  color: #1f2937;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 0.9em;
}

/* ── Auth page ── */
#pzn-auth-wrapper {
  min-height: 100vh;
  background: linear-gradient(to bottom, #eaf0f8, #ffffff);
}

/* ── Sidebar ── */
#pzn-sidebar {
  width: var(--sidebar-width);
  height: 100vh;
  flex-shrink: 0;
  background: #0f172a;
  transition: transform 0.25s ease;
  z-index: 100;
  position: sticky;
  top: 0;
}

/* Brand */
.sidebar-brand { border-bottom: 1px solid rgba(255,255,255,0.06); }

.sidebar-brand-icon {
  width: 38px;
  height: 38px;
  background: var(--pzn-primary);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sidebar-brand-icon img {
  max-width: 28px;
  max-height: 28px;
}

.sidebar-brand-name {
  color: #f1f5f9;
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.2;
}

.sidebar-brand-sub {
  color: #64748b;
  font-size: 0.72rem;
  text-transform: capitalize;
  line-height: 1.2;
}

/* Nav label */
.sidebar-nav-label {
  color: #8899aa;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Nav links */
.sidebar-nav-link {
  color: #dde4ed;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  font-size: 0.875rem;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
  margin-bottom: 2px;
  display: flex;
  align-items: center;
}

.sidebar-nav-link:hover {
  background: rgba(255,255,255,0.07);
  color: #e2e8f0;
}

.sidebar-nav-link.active {
  background: var(--pzn-primary);
  color: #fff;
}

.sidebar-nav-link i,
.sidebar-nav-link .fas,
.sidebar-nav-link .far,
.sidebar-nav-link .fab {
  font-size: 1rem;
  width: 1.1rem;
  text-align: center;
}

.sidebar-collapse-icon {
  width: auto !important;
  font-size: 0.65em !important;
}
.sidebar-nav-link.collapsed .sidebar-collapse-icon {
  transform: rotate(-90deg);
}

/* Sidebar scrollbar */
#pzn-sidebar .overflow-auto {
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.1) transparent;
}
#pzn-sidebar .overflow-auto::-webkit-scrollbar { width: 4px; }
#pzn-sidebar .overflow-auto::-webkit-scrollbar-track { background: transparent; }
#pzn-sidebar .overflow-auto::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 4px; }
#pzn-sidebar .overflow-auto::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); }

/* User footer */
.sidebar-user { border-top: 1px solid rgba(255,255,255,0.06); }

.sidebar-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--pzn-primary);
  color: #fff;
  font-weight: 700;
  font-size: 0.82rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sidebar-user-name {
  color: #e2e8f0;
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.3;
  display: block;
}

.sidebar-user-name:hover { color: #fff; }

.sidebar-user-email {
  color: #64748b;
  font-size: 0.7rem;
  line-height: 1.3;
}

.sidebar-logout-btn {
  color: #64748b;
  font-size: 1.05rem;
  text-decoration: none;
  transition: color 0.15s;
  flex-shrink: 0;
}

.sidebar-logout-btn:hover { color: #f87171; }

/* ── Topbar ── */
#pzn-topbar {
  height: var(--topbar-height);
  flex-shrink: 0;
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
}

.topbar-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: #1f2937;
}

.btn-logout { color: #6b7280; }
.btn-logout:hover { color: #dc2626; }

/* ── Layout ── */

#pzn-content {
  min-height: 100vh;
  background: var(--content-bg);
}

/* ── Admin main content ── */
#pzn-content main {
  background: var(--content-bg);
}

/* Override .content section for admin layout */
#pzn-content .content {
  background: transparent;
  padding-top: 0;
  padding-bottom: 0;
}

/* Admin pages: container acts as container-fluid */
#pzn-content .container {
  max-width: 100%;
  padding-left: 0;
  padding-right: 0;
}

/* ── Buttons ── */
.btn-primary {
  background-color: var(--pzn-primary) !important;
  border-color: var(--pzn-primary) !important;
}

.btn-primary:hover {
  background-color: var(--pzn-primary-hover) !important;
  border-color: var(--pzn-primary-hover) !important;
}

.btn-primary:focus {
  background-color: var(--pzn-primary-hover) !important;
  border-color: var(--pzn-primary-hover) !important;
  box-shadow: 0 0 0 0.2rem rgba(16,80,180,0.25) !important;
}

.btn-primary:active {
  background-color: #0b3776 !important;
  border-color: #0b3776 !important;
}

/* ── Cards ── */
.card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.card-header {
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  color: #1f2937;
}

/* ── Tables ── */
.table {
  --bs-table-bg: transparent;
  --bs-table-color: #374151;
  --bs-table-border-color: #f1f5f9;
  --bs-table-hover-bg: rgba(0,0,0,0.015);
  font-size: 0.875rem;
  margin-bottom: 0;
}

.table thead th {
  color: #6b7280;
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid #e5e7eb;
  background: #fafbfc;
  padding: 0.6rem 0.75rem;
}

.table thead th a {
  color: inherit;
  text-decoration: none;
}

.table thead th a:hover {
  color: var(--pzn-primary);
}

/* Admin table card wrapper */
#pzn-content .table-responsive {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  overflow: visible;
}

#pzn-content .table-responsive .table {
  --bs-table-border-color: #f8f9fa;
}

/* Remove vertical borders inside card tables, keep only subtle row lines */
#pzn-content .table-responsive .table.table-bordered {
  border: none;
  --bs-table-border-color: #f5f5f5;
}

#pzn-content .table-responsive .table.table-bordered > :not(caption) > * > * {
  border-left: none;
  border-right: none;
}

/* All admin tables – very subtle row separator */
#pzn-content .table > :not(caption) > * > * {
  border-bottom: 1px solid rgba(0,0,0,0.15) !important;
}

#pzn-content .table > tbody {
  border-top: none !important;
}

#pzn-content .table-responsive .table thead th:first-child { border-top-left-radius: 8px; }
#pzn-content .table-responsive .table thead th:last-child { border-top-right-radius: 8px; }
#pzn-content .table-responsive .table tbody tr:last-child td { border-bottom: none; }

#pzn-content .table a { text-decoration: none; }
#pzn-content .table .btn-sm,
#pzn-content .table .btn-group-sm > .btn {
  font-size: 0.75rem;
  padding: 0.2rem 0.5rem;
}
#pzn-content .table td,
#pzn-content .table th {
  padding: 0.45rem 0.5rem;
  font-size: 0.875rem;
}

/* ── Filter bar ── */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}

.filter-bar .form-control,
.filter-bar .btn {
  height: 36px;
  font-size: 0.85rem;
}

/* Dropdown multiselect filter */
.filter-dropdown {
  position: relative;
}

.filter-dropdown-toggle {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  height: 36px;
  padding: 0 0.75rem;
  font-size: 0.85rem;
  background: #fff;
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
  color: #374151;
  cursor: pointer;
  white-space: nowrap;
  user-select: none;
}

.filter-dropdown-toggle:hover {
  border-color: #9ca3af;
}

.filter-dropdown-toggle .badge {
  font-size: 0.7rem;
  padding: 2px 6px;
  background: var(--pzn-primary) !important;
}

.filter-dropdown-toggle i.fa-chevron-down {
  font-size: 0.65rem;
  color: #9ca3af;
  margin-left: 0.25rem;
}

.filter-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 50;
  min-width: 200px;
  max-height: 260px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
  padding: 0.35rem 0;
  margin-top: 4px;
}

.filter-dropdown.open .filter-dropdown-menu {
  display: block;
}

.filter-dropdown-menu label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.75rem;
  font-size: 0.85rem;
  color: #374151;
  cursor: pointer;
  margin: 0;
}

.filter-dropdown-menu label:hover {
  background: #f8fafc;
}

.filter-dropdown-menu input[type="checkbox"] {
  width: 15px;
  height: 15px;
  accent-color: var(--pzn-primary);
  flex-shrink: 0;
}

.filter-dropdown-menu .filter-dropdown-search {
  padding: 0.35rem 0.75rem;
  border-bottom: 1px solid #f1f5f9;
  margin-bottom: 0.25rem;
}

.filter-dropdown-menu .filter-dropdown-search input {
  width: 100%;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  padding: 0.25rem 0.5rem;
  font-size: 0.8rem;
  outline: none;
}

.filter-dropdown-menu .filter-dropdown-search input:focus {
  border-color: var(--pzn-primary);
}

/* ── Links ── */
a { text-decoration: none; }

/* ── Form controls ── */
.form-control, .form-select {
  background: #ffffff;
  border: 1px solid #d1d5db;
  color: #1f2937;
}

.form-control:focus, .form-select:focus {
  background: #ffffff;
  border-color: var(--pzn-primary);
  color: #1f2937;
  box-shadow: 0 0 0 0.2rem rgba(16,80,180,0.15);
}

.form-control::placeholder { color: #9ca3af; }

/* Form labels (standard BS5 floating or regular) */
.form-label {
  color: #374151;
  font-size: 0.875rem;
  margin-bottom: 0.25rem;
}

/* ── Bootstrap dropdowns ── */
.dropdown-item {
  font-size: 0.85rem;
  padding: 0.3rem 1rem;
}

/* ── Modals ── */
.modal-content {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 10px 40px rgba(0,0,0,0.15);
}

.modal-header {
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
}

.modal-footer {
  border-top: 1px solid #e2e8f0;
  background: #f8fafc;
}

/* ── Alerts ── */
.alert-info    { background: #eff6ff; border-color: #bfdbfe; color: #1d4ed8; }
.alert-success { background: #f0fdf4; border-color: #bbf7d0; color: #15803d; }
.alert-danger  { background: #fef2f2; border-color: #fecaca; color: #dc2626; }
.alert-warning { background: #fffbeb; border-color: #fde68a; color: #b45309; }

/* ── Pagination ── */
.pagination .page-item.disabled .page-link,
.pagination .page-link {
  color: #6c757d;
  background-color: transparent;
  border-color: transparent;
}

.pagination .page-item.active .page-link {
  z-index: 1;
  color: #fff;
  background-color: var(--pzn-primary) !important;
  border-color: var(--pzn-primary);
  border-radius: 6px;
  box-shadow: none;
}

.pagination a:hover {
  color: var(--pzn-primary);
}

/* ── Breadcrumb ── */
.breadcrumb-item a { color: #6b7280; text-decoration: none; }
.breadcrumb-item a:hover { color: var(--pzn-primary); }
.breadcrumb-item.active { color: #374151; }

/* ── Responsive sidebar ── */
@media (max-width: 991.98px) {
  #pzn-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    transform: translateX(-100%);
  }
  #pzn-sidebar.show {
    transform: translateX(0);
  }
  .sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 99;
  }
  .sidebar-overlay.show { display: block; }
}

/* Desktop sidebar collapse */
#pzn-wrapper.sidebar-collapsed #pzn-sidebar {
  margin-left: calc(var(--sidebar-width) * -1);
}

#pzn-sidebar {
  transition: margin-left 0.25s ease, transform 0.25s ease;
}

/* ── Public layout ── */

/* Public navbar */
.navbar-public {
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
}

.navbar-public .navbar-brand img {
  width: 120px;
}

/* Content section (public pages) */
.content {
  background-image: linear-gradient(to bottom, #eaf0f8, #ffffff);
  padding-top: 30px;
  padding-bottom: 30px;
}

/* Sign-in form */
.sign-in-form {
  padding: 30px;
  background-color: #ffffff;
  border-radius: 8px;
  width: 400px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

/* Loading screen */
.loading-screen {
  position: fixed;
  display: none;
  justify-content: center;
  align-items: center;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.8);
  z-index: 10000;
  color: #ffffff;
  flex-direction: column;
}

.loading-text {
  color: white;
  text-align: center;
  margin-top: 20px;
  font-size: 1rem;
}

/* ── Headings ── */
h2 { color: black; font-weight: 600; }
h3 { color: black; }
h4 { color: black; }

/* ── Custom utility classes ── */
.text-8 { font-size: 0.8em; }
.text-9 { font-size: 0.9em; }
.line { border-bottom: 1px solid #dddddd; }
.bg-gray1 { background-color: #bacade; }
.badge { padding-top: 7px; }

/* ── Consumption bar ── */
.bar-container {
  width: 100%;
  height: 20px;
  border: 1px solid #ffffff;
  position: relative;
  font-size: 0.75em;
}

.free-mb {
  height: 100%;
  background-color: #14A44D;
  position: absolute;
  left: 0;
  top: 0;
  line-height: 20px;
  text-align: center;
  color: white;
  border-radius: 2px 0px 0px 2px;
}

.extra-mb {
  height: 100%;
  background-color: #F44336;
  position: absolute;
  top: 0;
  line-height: 20px;
  text-align: center;
  color: white;
  border-radius: 0px 2px 2px 0px;
}

/* ── Hero (public homepage) ── */
.hero {
  background-image: url('../img/bg-line-vertical.png');
  background-size: auto 100%;
  background-position: center center;
}

.hero-wrapper {
  height: 600px;
  background-image: url('../img/hero.png');
  background-repeat: no-repeat;
  background-size: contain;
  background-position: center center;
  max-width: 1300px;
  margin: 0 auto;
}

@media (max-width: 768px) {
  .hero-wrapper {
    background-size: cover;
    background-position: top center;
  }
}

.hero-bg-agent {
  background-image: url('../img/banner-agent.jpg') !important;
}

.custom-text1 { color: black; font-size: 3em; font-weight: 700; word-wrap: break-word; }
.custom-text2 { color: black; font-size: 3em; font-weight: 100; word-wrap: break-word; }
.custom-text3 { color: black; font-size: 2em; font-weight: 600; }
.custom-text4 { font-size: 1em; }
.custom-text5 { color: black; font-size: 1.2em; font-weight: 600; }

@media (min-width: 500px) and (max-width: 900px) {
  .hero-wrapper { height: 400px; }
  .custom-text1 { font-size: 2.4em !important; }
  .custom-text2 { font-size: 1.8em !important; }
  .custom-text3 { font-size: 1.8em !important; }
  .custom-text4 { font-size: 1em !important; }
}

@media (max-width: 500px) {
  .hero-wrapper { height: 400px; }
  .custom-text1 { font-size: 2em !important; }
  .custom-text2 { font-size: 1.6em !important; }
  .custom-text3 { font-size: 1.4em !important; }
  .custom-text4 { font-size: 0.9em !important; }
}

/* ── Projects section (public) ── */
.projects {
  background-image: linear-gradient(to bottom, #eaf0f8, #ffffff);
}

.projects .card-title {
  font-size: 1.4em;
  color: black;
  padding-bottom: 10px;
}

.projects .card-body {
  line-height: 1.8em;
}

.projects .card-title i {
  color: var(--pzn-primary);
}

.rotated-icon { transform: rotate(45deg); }

/* ── About section (public) ── */
.about { padding-top: 50px; }
.about i { color: var(--pzn-primary); margin-top: 5px; margin-right: 10px; }

/* ── Contact section (public) ── */
.contact { background-image: linear-gradient(to bottom, #ffffff, #eaf0f8); }
.contact i { color: var(--pzn-primary); margin-top: 5px; margin-right: 10px; }

/* ── Features section (public) ── */
.features { background-image: linear-gradient(to bottom, #ffffff, #eaf0f8); }
.features i { color: var(--pzn-primary); margin-top: 5px; margin-right: 10px; }

.iot-solutions i { margin-top: 5px; margin-right: 10px; }

/* ── Packages (public) ── */
.package-name { color: var(--pzn-primary); font-weight: bold; font-size: 1.6em; }
.gradient { background-image: linear-gradient(to bottom, #ffffff, #eaf0f8); }
.gradient i { color: var(--pzn-primary); margin-top: 5px; margin-right: 10px; }

@media (min-width: 576px) {
  .custom-width { max-width: 90%; }
}

/* ── Form ── */
.form-title { color: black; font-weight: 500; font-size: 1.5em; }
.custom-navbar { background-color: var(--pzn-primary) !important; }
.custom-navbar a.nav-link { color: white !important; }

.package input[type="radio"] { vertical-align: top; margin-top: 5px; }
.package label { vertical-align: top; }
.project-features { padding-left: 0px; }

/* ── Separator ── */
.separator { width: 100%; text-align: center; position: relative; z-index: 1; }
.separator:before { content: ''; position: absolute; top: 50%; left: 0; border-top: 1px solid #999; width: 100%; transform: translateY(-50%); }
.separator .text { position: relative; background-color: #ffffff; padding: 0px 10px; z-index: 2; }

.line-date { text-align: right; white-space: nowrap; }
.social-icons img { width: 25px; }
.equal-height { display: flex; flex-wrap: wrap; }

/* ── Accordion ── */
.accordion-button { background-color: transparent !important; }
.accordion-item { background-color: transparent !important; border: none !important; }

/* ── Product updates sidebar ── */
.fixed-sidebar .list-group-item { background-color: transparent; cursor: pointer; }
.fixed-sidebar .list-group-item:hover { color: var(--pzn-primary); }
.fixed-sidebar .accordion-button { padding: 0.5rem 0; font-weight: 600; font-size: 1.1rem; box-shadow: none !important; }
.fixed-sidebar .accordion-body { padding: 0; }

/* ── Ticket styles ── */
.ticket-bar { display: flex; }
.ticket-bar > div { margin-right: 20px; }
.ticket-message { margin: 20px 0px; padding: 15px; background-color: #f4f4f4; border: 1px solid #eee; border-radius: 3px; }
.ticket-message-header { border-bottom: 1px solid #fff; padding-bottom: 10px; margin-bottom: 10px; }
.ticket-right { background-color: #e9edf0; padding: 20px 20px 10px 20px; }
.ticket-right-header { border-bottom: 1px solid #fff; padding-bottom: 10px; margin-bottom: 10px; font-weight: 700; }
.ticket-right-line { display: flex; justify-content: space-between; margin-bottom: 5px; padding-bottom: 5px; border-bottom: 1px solid #f4f4f4; }

.file-upload-wrapper { border: 1px solid #eee; }

/* ── Carousel ── */
.carousel-control-next-icon, .carousel-control-prev-icon { color: #ffffff; }

/* ── Public page – push footer to bottom ── */
html, body { height: 100%; }
body { display: flex; flex-direction: column; }
#pzn-wrapper { flex: 1; display: flex; } /* admin layout */

/* ── Footer (public) ── */
.footer-public {
  background: #ffffff;
  border-top: 1px solid #e2e8f0;
  margin-top: auto;
}

/* ── Auto-dismiss alerts ── */
.alert-auto-dismiss { transition: opacity 0.5s; }

/* ── Toast styles ── */
.toast-container {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 1100;
}
