/* Administrative Panel Styles */
@import "tenants.css";
@import "builders.css";

:root {
  /* Fonts */
  --font-default: "Open Sans", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
  --font-primary: "Roboto", sans-serif;
  --font-secondary: "Work Sans", sans-serif;

  /* Colors */
  --color-default: #364d59;
  --color-primary: #feb900;
  --color-secondary: #364d59; /* Unificado com o Azul Petróleo Escuro do sidebar e títulos */
  --color-text-muted: #52565e;

  /* Layout */
  --sidebar-width: 280px;
  --header-height: 70px;
  --transition-speed: 0.3s;

  scroll-behavior: smooth;
}

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

body {
  font-family: var(--font-default);
  color: var(--color-default);
  background-color: #f8f9fa;
  overflow-x: hidden;
}

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

a:hover {
  color: var(--color-primary-hover, #ffc732);
  text-decoration: none;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-primary);
}


/* Layout */
#admin-wrapper {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
#sidebar {
  width: var(--sidebar-width, 280px);
  background-color: var(--color-secondary, #364d59);
  color: #fff;
  transition: all var(--transition-speed, 0.3s);
  z-index: 1000;
  position: fixed;
  height: 100vh;
  left: 0;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #6c757d rgba(0, 0, 0, 0.2);
}

/* Custom Scrollbar for Chrome/Safari/Edge */
#sidebar::-webkit-scrollbar {
  width: 6px;
}

#sidebar::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.1);
}

#sidebar::-webkit-scrollbar-thumb {
  background: #6c757d;
  border-radius: 10px;
}

#sidebar.active {
  left: calc(-1 * var(--sidebar-width));
}

#sidebar .sidebar-header {
  height: var(--header-height, 70px);
  display: flex;
  align-items: center;
  padding: 0 20px;
  background-color: rgba(0, 0, 0, 0.1);
}

#sidebar .sidebar-header img {
  max-height: 35px;
}

#sidebar ul.components {
  padding: 20px 0;
}

#sidebar ul li a {
  padding: 8px 25px;
  font-size: 1em;
  display: block;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: 0.3s;
}

#sidebar ul li a:hover,
#sidebar ul li.active>a,
#sidebar ul li a.active {
  color: var(--color-primary, #feb900);
  background: rgba(255, 255, 255, 0.1);
}

#sidebar ul li a i {
  margin-right: 10px;
  width: 20px;
  text-align: center;
}

#sidebar ul li a.dropdown-toggle {
  display: flex;
  align-items: center;
}

#sidebar ul li a.dropdown-toggle::after {
  display: inline-block;
  margin-left: auto;
  content: "";
  border-top: 0.3em solid;
  border-right: 0.3em solid transparent;
  border-bottom: 0;
  border-left: 0.3em solid transparent;
  transition: transform 0.3s;
}

#sidebar ul li a[aria-expanded="true"].dropdown-toggle::after {
  transform: rotate(180deg);
}

#sidebar ul ul a {
  font-size: 0.9rem !important;
  padding-left: 55px !important;
  background: rgba(0, 0, 0, 0.1);
}

#sidebar ul ul a:hover {
  background: rgba(0, 0, 0, 0.2);
}

/* Main Content */
#content {
  width: calc(100% - var(--sidebar-width, 280px));
  margin-left: var(--sidebar-width, 280px);
  transition: all var(--transition-speed, 0.3s);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

#content.active {
  width: 100%;
  margin-left: 0;
}

/* Top Navbar */
.admin-navbar {
  height: var(--header-height);
  background: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  padding: 0 30px;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 999;
}

.admin-navbar .nav-item {
  list-style: none;
}

.admin-navbar .dropdown-menu {
  border-radius: 12px;
  overflow: hidden;
  margin-top: 10px !important;
}

.admin-navbar .dropdown-item:active {
  background-color: var(--color-primary);
  color: #fff;
}

.admin-navbar .badge {
  font-weight: 600;
  border: 2px solid #fff;
  padding: 0.35em 0.5em;
}

/* Cards & Components */
.admin-card {
  border: none;
  border-radius: 10px;
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
  transition: transform 0.3s;
  margin-bottom: 20px;
}

.admin-card:hover {
  transform: translateY(-5px);
}

.card-icon {
  font-size: 2.5rem;
  color: var(--color-primary);
  opacity: 0.8;
}

/* Stats Counter */
.stats-number {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--color-secondary);
}

.stats-label {
  color: #6c757d;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Tables */
.admin-table thead {
  background-color: #f1f3f5;
}

.admin-table th {
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.8rem;
  color: #495057;
}

/* Mobile Responsiveness & Transitions */
@media (max-width: 992px) {
  #sidebar {
    left: calc(-1 * var(--sidebar-width));
    box-shadow: none;
  }

  #sidebar.active {
    left: 0;
    box-shadow: 5px 0 15px rgba(0, 0, 0, 0.2);
  }

  #content {
    width: 100%;
    margin-left: 0;
  }

  #content.active {
    margin-left: 0;
    /* Keep it full width on mobile even when sidebar is active */
  }

  /* Overlay when sidebar is open on mobile */
  .sidebar-overlay {
    display: none;
    position: fixed;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
    top: 0;
    left: 0;
  }

  .sidebar-overlay.active {
    display: block;
  }

  .admin-navbar {
    padding: 0 15px;
  }

  .admin-navbar .dropdown span {
    display: none;
    /* Hide 'Administrador' text on small screens */
  }
}

@media (max-width: 576px) {
  .container-fluid {
    padding: 15px !important;
  }

  h1.h3 {
    font-size: 1.5rem;
  }

  .admin-card {
    margin-bottom: 15px;
  }

  .stats-number {
    font-size: 1.5rem;
  }

  /* Make table scrollable on tiny screens */
  .table-responsive {
    border: 0;
  }
}

/* Login Page Styles */
.login-body {
  background: linear-gradient(rgba(var(--color-secondary-rgb, 54, 77, 89), 0.8), rgba(var(--color-secondary-rgb, 54, 77, 89), 0.9)), url('../assets/img/hero-carousel/hero-carousel-1.jpg') no-repeat center center fixed;
  background-size: cover;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-card {
  width: 100%;
  max-width: 400px;
  border: none;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(5px);
  padding: 40px;
}

.login-logo {
  text-align: center;
  margin-bottom: 30px;
}

.login-logo img {
  max-height: 50px;
}

.login-card .input-group-text {
  border-radius: 8px 0 0 8px;
  border: 1px solid #ddd;
}

.login-card .form-control {
  border-radius: 0 8px 8px 0;
  padding: 12px 15px;
  border: 1px solid #ddd;
  margin-bottom: 0;
  /* Reset margin inside input-group */
}

.login-card .input-group:focus-within .input-group-text {
  border-color: var(--color-primary);
}

.login-card .form-control:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 0.25rem rgba(var(--color-primary-rgb, 254, 185, 0), 0.25);
}

.btn-login {
  background-color: var(--color-primary);
  border: none;
  border-radius: 8px;
  padding: 12px;
  font-weight: 600;
  color: #fff;
  width: 100%;
  transition: 0.3s;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.btn-login:hover {
  background-color: var(--color-primary-dark, #e5a700);
  transform: translateY(-2px);
}

.login-footer {
  text-align: center;
  margin-top: 20px;
  color: #666;
  font-size: 0.85rem;
}

.login-footer a {
  color: var(--color-primary);
  text-decoration: none;
  font-weight: 500;
}

/* Common Utilities & Components */
.extra-small {
  font-size: 0.75rem;
}

.border-dashed {
  border-style: dashed !important;
  border-width: 2px !important;
}

.hover-elevate {
  transition: all 0.3s ease;
}

.hover-elevate:hover {
  transform: translateY(-8px);
  box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.1) !important;
}

/* Global Form Focus Styles */
.form-control:focus,
.form-select:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 0.25rem rgba(var(--color-primary-rgb, 254, 185, 0), 0.15);
}

/* Selection Boxes (used in others_twobottons.php) */
.option-box {
  background-color: #fff;
  border: 2px solid #f8f9fa !important;
  transition: all 0.3s ease;
}

.option-box:hover {
  border-color: var(--color-primary) !important;
  background-color: #fffaf0;
}

/* Avatars */
.avatar-sm { width: 40px; height: 40px; font-size: 0.875rem; }
.avatar-md { width: 50px; height: 50px; font-size: 1rem; }
.avatar-lg { width: 70px; height: 70px; font-size: 1.5rem; }
.avatar-xl { width: 100px; height: 100px; font-size: 2rem; }
.avatar-sm, .avatar-md, .avatar-lg, .avatar-xl {
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Timeline */
.timeline-small {
  position: relative;
  padding-left: 20px;
}
.timeline-small::before {
  content: "";
  position: absolute;
  left: 10px;
  top: 5px;
  bottom: 5px;
  width: 2px;
  background: #e9ecef;
}
.timeline-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
  flex-shrink: 0;
}

/* Tab Enhancements */
.nav-tabs .nav-link {
  color: #6c757d;
  font-weight: 500;
  transition: all 0.3s;
  border: none !important;
  border-bottom: 3px solid transparent !important;
}
.nav-tabs .nav-link:hover {
  color: var(--color-primary);
}
.nav-tabs .nav-link.active {
  color: var(--color-secondary) !important;
  background-color: transparent !important;
  border-bottom: 3px solid var(--color-primary) !important;
}

/* Dropdown menu items */
.dropdown-menu-item {
  display: block;
  width: 100%;
  padding: 0.5rem 1.5rem;
  clear: both;
  font-weight: 400;
  color: #212529;
  text-align: inherit;
  text-decoration: none;
  white-space: nowrap;
  background-color: transparent;
  border: 0;
  transition: all 0.2s;
}
.dropdown-menu-item:hover {
  background-color: #f8f9fa;
  color: var(--color-primary);
  padding-left: 1.75rem;
}

.dropdown-menu {
  border: none;
  box-shadow: 0 0.5rem 1rem rgba(0,0,0,0.15);
  border-radius: 0.5rem;
}

/* Admin Utility Classes (Reusable) */
.bg-primary-soft { background-color: rgba(13, 110, 253, 0.1) !important; color: #0d6efd !important; }
.bg-success-soft { background-color: rgba(25, 135, 84, 0.1) !important; color: #198754 !important; }
.bg-warning-soft { background-color: rgba(255, 193, 7, 0.1) !important; color: #856404 !important; }
.bg-info-soft { background-color: rgba(13, 110, 253, 0.1) !important; color: #0dcaf0 !important; }
.bg-danger-soft { background-color: rgba(220, 53, 69, 0.1) !important; color: #dc3545 !important; }

.text-primary-soft { color: #0d6efd !important; }
.text-success-soft { color: #198754 !important; }
.text-warning-soft { color: #856404 !important; }
.text-danger-soft { color: #dc3545 !important; }

.tracking-wider { letter-spacing: 0.05em; }

.badge.bg-success-soft, 
.badge.bg-primary-soft, 
.badge.bg-warning-soft, 
.badge.bg-danger-soft,
.badge.bg-info-soft {
    font-weight: 600;
}

/* ==========================================================================
   Premium SaaS & Settings Components (Added for Profile / SaaS Management)
   ========================================================================== */

/* Glass Cards & Gradients */
.glass-card {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.5) !important;
  border-radius: 16px !important;
}

.gradient-gold {
  background: var(--gradient-gold, linear-gradient(135deg, #feb900, #ff9f00));
}

.gradient-dark {
  background: var(--gradient-dark, linear-gradient(135deg, #364d59, #1c2b33));
}

/* Profile / Custom Tabs Navigation */
.profile-tabs .nav-link {
  color: #495057;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 12px 20px;
  border-radius: 8px;
  transition: all 0.3s ease;
  border: none !important;
  display: flex;
  align-items: center;
  gap: 10px;
}

.profile-tabs .nav-link:hover {
  background-color: rgba(var(--color-primary-rgb, 254, 185, 0), 0.08);
  color: var(--color-secondary);
}

.profile-tabs .nav-link.active {
  background-color: var(--color-secondary) !important;
  color: #fff !important;
  box-shadow: 0 4px 12px rgba(var(--color-secondary-rgb, 54, 77, 89), 0.2);
}

/* Avatar Upload Controls */
.avatar-upload-overlay {
  position: absolute;
  bottom: 5px;
  right: 5px;
  background-color: var(--color-primary);
  border: 3px solid #fff;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.avatar-upload-overlay:hover {
  transform: scale(1.1);
  background-color: var(--color-primary-hover, #ffc732);
}

/* Section Titles */
.settings-section-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-secondary);
  border-bottom: 2px solid #f1f3f5;
  padding-bottom: 12px;
  margin-bottom: 20px;
}

/* SaaS Badge Branding */
.badge-enterprise {
  background: linear-gradient(90deg, var(--color-primary, #feb900), var(--color-primary-hover, #ffc732));
  color: #000;
  font-weight: 700;
  font-size: 0.7rem;
  letter-spacing: 0.5px;
  padding: 5px 10px;
  border-radius: 50px;
  text-transform: uppercase;
}

/* Smooth Animated Progress Bars */
.animated-progress {
  height: 8px;
  border-radius: 10px;
  background-color: #e9ecef;
  overflow: hidden;
}

.animated-progress .progress-bar {
  border-radius: 10px;
  transition: width 1s ease-in-out;
}

/* Interactive Session Cards */
.session-card {
  border-radius: 12px;
  border: 1px solid #e9ecef;
  background-color: #fff;
  transition: all 0.2s;
}

.session-card:hover {
  border-color: var(--color-primary);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.035);
}

/* Custom Notification Toast */
.custom-toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
  display: none;
  background-color: var(--color-secondary);
  color: #fff;
  padding: 12px 24px;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.2);
  border-left: 5px solid var(--color-primary);
  animation: slideIn 0.3s ease, fadeOut 0.3s ease 2.7s;
}

@keyframes slideIn {
  from { transform: translateY(50px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* Tab Fade In Animation */
.tab-pane {
  animation: fadeIn 0.4s ease-in-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Interactive Pricing / Subscription Cards */
.pricing-card-mini {
  border: 2px dashed #dee2e6;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.pricing-card-mini:hover, .pricing-card-mini.active {
  border-color: var(--color-primary);
  background-color: rgba(var(--color-primary-rgb, 254, 185, 0), 0.03);
  border-style: solid;
}

/* ==========================================================================
   Helpdesk Ticket Timeline Styles
   ========================================================================== */

.timeline-card {
  border-left: 3px solid #dee2e6;
  margin-left: 20px;
  padding-left: 25px;
  position: relative;
}

.timeline-icon {
  position: absolute;
  left: -15px;
  top: 6px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background-color: #ffffff;
  border: 2px solid #dee2e6;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  z-index: 5;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.timeline-system .timeline-icon {
  border-color: #6c757d;
  color: #6c757d;
  background-color: #f8f9fa;
  top: 0px;
}

.timeline-note .timeline-icon {
  border-color: #ff9800;
  color: #ff9800;
  background-color: #fffbeb;
}

.timeline-reply .timeline-icon {
  border-color: #198754;
  color: #198754;
  background-color: #f0fdf4;
}

.bg-note-soft {
  background-color: #fffbeb;
  border: 1px solid #ffeeba;
}

.bg-reply-soft {
  background-color: #ffffff;
  border: 1px solid #e2e8f0;
}

.nav-tabs-custom .nav-link {
  border: none;
  color: #495057;
  font-weight: 600;
  padding: 10px 20px;
}

.nav-tabs-custom .nav-link.active {
  background-color: transparent;
  color: var(--color-primary, #feb900);
  border-bottom: 2px solid var(--color-primary, #feb900);
}

/* Custom scrollbar for timeline */
.timeline-container {
  max-height: 480px;
  overflow-y: auto;
  padding-right: 12px;
  padding-left: 5px;
  padding-top: 5px;
  padding-bottom: 5px;
}

.timeline-container::-webkit-scrollbar {
  width: 6px;
}
.timeline-container::-webkit-scrollbar-track {
  background: transparent;
}
.timeline-container::-webkit-scrollbar-thumb {
  background-color: #cbd5e1;
  border-radius: 3px;
}
.timeline-container::-webkit-scrollbar-thumb:hover {
  background-color: #94a3b8;
}

/* Efeito Hover de Destaque Premium para links e cards admin */
.bg-light-hover {
    background-color: #f8f9fa;
    transition: all 0.2s ease-in-out;
}
.bg-light-hover:hover {
    background-color: rgba(var(--color-primary-rgb, 254, 185, 0), 0.08) !important;
    transform: translateX(4px);
}

/* ==========================================================================
   Bootstrap Warning Class Overrides for Theme Synchronization
   ========================================================================== */
.btn-warning {
  background-color: var(--color-primary) !important;
  border-color: var(--color-primary) !important;
  color: #fff !important;
}

.btn-warning:hover,
.btn-warning:focus,
.btn-warning:active,
.btn-warning.active,
.show > .btn-warning.dropdown-toggle {
  background-color: var(--color-primary-dark, #e5a700) !important;
  border-color: var(--color-primary-dark, #e5a700) !important;
  color: #fff !important;
  box-shadow: 0 0 0 0.25rem rgba(var(--color-primary-rgb, 254, 185, 0), 0.25) !important;
}

.btn-outline-warning {
  color: var(--color-primary) !important;
  border-color: var(--color-primary) !important;
}

.btn-outline-warning:hover,
.btn-outline-warning:focus,
.btn-outline-warning:active,
.btn-outline-warning.active {
  background-color: var(--color-primary) !important;
  border-color: var(--color-primary) !important;
  color: #fff !important;
}

.bg-warning {
  background-color: var(--color-primary) !important;
}

.badge.bg-warning {
  color: #fff !important;
}

.text-warning {
  color: var(--color-primary) !important;
}

.border-warning {
  border-color: var(--color-primary) !important;
}