/* =========================================================
   TICKETS SISTEMAS OPTIMA — Main Stylesheet
   Design: Professional Admin Panel
   ========================================================= */

/* ---------- Variables ---------- */
:root {
  --sidebar-width: 240px;
  --sidebar-bg: #1a1d23;
  --sidebar-hover: #2a2e38;
  --sidebar-active: #0d6efd;
  --topbar-height: 56px;
  --primary: #0d6efd;
  --font-main: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

body {
  font-family: var(--font-main);
  background: #f0f2f5;
  margin: 0;
}

/* =========================================================
   LOGIN PAGE
   ========================================================= */
.login-body {
  background: linear-gradient(135deg, #0d6efd 0%, #1a1d23 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-wrapper {
  width: 100%;
  padding: 1rem;
}

.login-card {
  background: #fff;
  border-radius: 12px;
  padding: 2.5rem;
  max-width: 420px;
  margin: 0 auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.login-brand {
  text-align: center;
  margin-bottom: 2rem;
}

.login-icon {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, #0d6efd, #0856d1);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 0.75rem;
  font-size: 28px;
  color: white;
  box-shadow: 0 4px 15px rgba(13,110,253,0.4);
}

/* =========================================================
   SIDEBAR
   ========================================================= */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  z-index: 1000;
  overflow-y: auto;
  transition: transform 0.3s ease;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 1.25rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  color: #fff;
  text-decoration: none;
}

.sidebar-brand-icon {
  width: 38px;
  height: 38px;
  background: var(--sidebar-active);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: #fff;
  flex-shrink: 0;
}

.sidebar-brand-text {
  font-size: 14px;
  line-height: 1.3;
}

.sidebar-nav {
  flex: 1;
  padding: 0.5rem 0;
}

.sidebar-section {
  padding: 0.75rem 1rem 0.25rem;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.35);
  font-weight: 600;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0.6rem 1rem;
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  font-size: 13.5px;
  transition: all 0.15s;
  border-left: 3px solid transparent;
}

.sidebar-link:hover {
  background: var(--sidebar-hover);
  color: #fff;
  border-left-color: rgba(255,255,255,0.2);
}

.sidebar-link.active {
  background: rgba(13,110,253,0.15);
  color: #fff;
  border-left-color: var(--sidebar-active);
  font-weight: 600;
}

.sidebar-link i {
  font-size: 16px;
  width: 20px;
  text-align: center;
}

.sidebar-footer {
  border-top: 1px solid rgba(255,255,255,0.07);
  padding: 0.5rem 0;
}

/* =========================================================
   MAIN WRAPPER & TOPBAR
   ========================================================= */
.main-wrapper {
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: margin-left 0.3s ease;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 999;
  height: var(--topbar-height);
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  align-items: center;
  padding: 0 1.25rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.topbar-breadcrumb {
  font-size: 13.5px;
  font-weight: 500;
  color: #374151;
}

.main-content {
  flex: 1;
  padding: 1.5rem;
}

.main-footer {
  padding: 0.75rem 1.5rem;
  border-top: 1px solid #e5e7eb;
  background: #fff;
}

/* Sidebar collapsed */
.sidebar-collapsed .sidebar {
  transform: translateX(-100%);
}

.sidebar-collapsed .main-wrapper {
  margin-left: 0;
}

/* =========================================================
   STAT CARDS
   ========================================================= */
.stat-card {
  background: #fff;
  border-radius: 10px;
  padding: 1.1rem 1rem 1rem;
  position: relative;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.07);
  transition: transform 0.15s, box-shadow 0.15s;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.stat-number {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #6b7280;
  font-weight: 600;
}

.stat-icon {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 3rem;
  pointer-events: none;
}

/* =========================================================
   TIMELINE
   ========================================================= */
.timeline {
  position: relative;
  padding-left: 24px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 4px;
  bottom: 0;
  width: 2px;
  background: #e5e7eb;
}

.timeline-item {
  position: relative;
  margin-bottom: 1.5rem;
}

.timeline-dot {
  position: absolute;
  left: -21px;
  top: 4px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 0 0 2px #e5e7eb;
}

.timeline-content {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 0.85rem 1rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.next-step-box {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 6px;
  padding: 0.4rem 0.75rem;
  font-size: 13px;
  margin-top: 0.5rem;
}

/* =========================================================
   AVATAR
   ========================================================= */
.avatar-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 15px;
  flex-shrink: 0;
}

.avatar-circle-lg {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 32px;
}

/* =========================================================
   BUTTONS
   ========================================================= */
.btn-xs {
  padding: 0.2rem 0.5rem;
  font-size: 0.75rem;
  border-radius: 0.25rem;
}

/* =========================================================
   TABLES
   ========================================================= */
.table thead th {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #6b7280;
  font-weight: 600;
  border-bottom-width: 1px;
  white-space: nowrap;
}

.table tbody tr:hover {
  background-color: #f8fafc;
}

/* =========================================================
   CARD
   ========================================================= */
.card {
  border-radius: 10px;
}

.card-header {
  border-bottom: 1px solid #f0f0f0;
}

/* =========================================================
   BADGE OVERRIDES
   ========================================================= */
.badge {
  font-weight: 500;
  letter-spacing: 0.02em;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.show {
    transform: translateX(0);
  }

  .main-wrapper {
    margin-left: 0;
  }

  .main-content {
    padding: 1rem;
  }

  .stat-number {
    font-size: 1.6rem;
  }
}

/* =========================================================
   UTILITIES
   ========================================================= */
.border-orange { border-color: #fd7e14 !important; }
.text-orange { color: #fd7e14; }

/* Scrollbar */
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 2px; }


.logo-brand-icon {
  background: #ffffff;
  overflow: hidden;
}
.logo-brand-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.login-logo-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 1rem;
}
.login-logo {
  max-width: 300px;
  width: 100%;
  height: auto;
  display: block;
}
