﻿/**
 * Shone Infra — Admin theme (from shone_crm_3)
 */

:root {
  --si-blue: #3b6de8;
  --si-purple: #8844cc;
  --si-magenta: #cc44aa;
  --si-coral: #e87a6a;
  --brand-indigo: #4b49ac;
  --brand-violet: #7978e9;
  --brand-blue: #7da0fa;
  --brand-peri: #98bdff;
  --brand-salmon: #f3797e;
}

/* ---- Brand gradient (sidebar + login) ---- */
.brand-text {
  background: linear-gradient(90deg, var(--si-blue), var(--si-purple), var(--si-magenta), var(--si-coral)) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  background-clip: text !important;
  font-weight: 700 !important;
}

/* ---- Sidebar (light) ---- */
.main-sidebar.sidebar-light-primary {
  border-right: 1px solid #dee2e6;
}

.main-sidebar .brand-link {
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.main-sidebar .brand-image {
  max-height: 40px;
  width: auto;
}

/* ---- Sidebar user panel (name + role) ---- */
.shone-user-panel {
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.shone-user-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-indigo), var(--brand-violet));
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.3px;
  line-height: 1;
  flex-shrink: 0;
}

.shone-user-meta {
  min-width: 0;
  line-height: 1.2;
}

.shone-user-name {
  display: block;
  font-size: 0.92rem;
  font-weight: 700;
  color: #343a40;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 160px;
}

.shone-user-role {
  display: block;
  margin-top: 2px;
  font-size: 0.75rem;
  font-weight: 500;
  color: #6c757d;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 160px;
}

.main-sidebar.sidebar-dark-primary .shone-user-name,
.main-sidebar.shone-sidebar .shone-user-name {
  color: #fff;
}

.main-sidebar.sidebar-dark-primary .shone-user-role,
.main-sidebar.shone-sidebar .shone-user-role {
  color: rgba(255, 255, 255, 0.7);
}

.main-sidebar.sidebar-dark-primary .shone-user-panel,
.main-sidebar.shone-sidebar .shone-user-panel {
  border-bottom-color: rgba(255, 255, 255, 0.1);
}

/* ---- Login page ---- */
body.login-page {
  background: linear-gradient(135deg, #eeeeff 0%, #e8eeff 50%, #ffeef0 100%);
}

.login-box {
  width: 400px;
}

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

.login-logo img {
  max-height: 110px;
  width: auto;
  object-fit: contain;
}

body.login-page .card {
  border: none;
  border-radius: 14px;
  box-shadow: 0 10px 35px rgba(75, 73, 172, 0.18);
  background: #fff;
}

.login-box-msg {
  color: var(--brand-indigo);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.3px;
}

body.login-page .input-group-text {
  background: linear-gradient(135deg, var(--brand-indigo), var(--brand-violet));
  border-color: var(--brand-indigo);
  color: #fff;
  cursor: pointer;
}

body.login-page .form-control {
  border-color: #c8cce8;
}

body.login-page .form-control:focus {
  border-color: var(--brand-indigo);
  box-shadow: 0 0 0 0.2rem rgba(75, 73, 172, 0.18);
}

body.login-page .btn-primary {
  background: linear-gradient(90deg, var(--brand-indigo), var(--brand-violet), var(--brand-blue));
  border: none;
  font-weight: 600;
  letter-spacing: 0.4px;
  transition: opacity 0.2s;
}

body.login-page .btn-primary:hover {
  opacity: 0.88;
  background: linear-gradient(90deg, var(--brand-indigo), var(--brand-violet), var(--brand-blue));
}

body.login-page .icheck-primary > input:first-child:checked + label::before,
body.login-page .icheck-primary > input:first-child:checked + input[type="hidden"] + label::before {
  background-color: var(--brand-indigo);
  border-color: var(--brand-indigo);
}

body.login-page #togglePassword {
  background: linear-gradient(135deg, var(--brand-indigo), var(--brand-violet));
  border-color: var(--brand-indigo);
  color: #fff;
  cursor: pointer;
}

body.login-page #togglePassword:hover {
  opacity: 0.85;
}

/* ---- Dashboard cards ---- */
.dashboard-stat-card .card-header {
  font-weight: 600;
}

.dashboard-stat-card .h5 {
  font-size: 1.1rem;
}

/* ---- Tables & forms (AdminLTE simple/advanced) ---- */
.content .card .table thead th {
  background-color: #edf2f7;
  color: #2d3748 !important;
  border-bottom-width: 1px;
  font-weight: 600;
  vertical-align: middle;
}

.content .card .table.table-hover tbody tr:hover {
  background-color: #f7fafc;
}

.content .card .table.text-nowrap td,
.content .card .table.text-nowrap th {
  white-space: nowrap;
}

.content .card-body.table-responsive {
  padding: 0;
}

/* ---- Global data list tables (all admin list pages) ---- */
.content .card-body.table-responsive {
  max-height: min(70vh, 720px);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  border-top: 1px solid #e2e8f0;
}

.content .card > .table-responsive {
  max-height: min(70vh, 720px);
  overflow: auto;
}

.content .card .table {
  margin-bottom: 0;
  font-size: 0.8125rem;
  border-color: #d7dee8;
  width: 100%;
}

.content .card .table thead th {
  position: sticky;
  top: 0;
  z-index: 6;
  background: #edf2f7 !important;
  color: #2d3748 !important;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.25;
  white-space: nowrap !important;
  vertical-align: middle !important;
  padding: 0.7rem 0.75rem !important;
  border-color: #d7dee8 !important;
  border-bottom: 2px solid #cbd5e0 !important;
  box-shadow: 0 1px 0 #cbd5e0;
}

.content .card .table thead tr.bg-primary th,
.content .card .table thead tr.text-white th,
.content .card .table.table-dark thead th {
  background: var(--si-blue, #3b6de8) !important;
  color: #fff !important;
  border-color: rgba(255, 255, 255, 0.18) !important;
  box-shadow: none;
}

.content .card .table tbody td {
  padding: 0.55rem 0.75rem !important;
  vertical-align: middle !important;
  white-space: nowrap;
  color: #2d3748;
  border-color: #e2e8f0 !important;
  background-clip: padding-box;
}

.content .card .table tbody tr:nth-child(even) {
  background-color: #fafbfc;
}

.content .card .table tbody tr:hover td {
  background-color: #f0f5ff;
}

.content .card .table .col-num,
.content .card .table th.col-num,
.content .card .table td.col-num {
  text-align: right !important;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
}

.content .card .table .col-center,
.content .card .table th.col-center,
.content .card .table td.col-center {
  text-align: center !important;
}

.content .card .table td .btn-xs,
.content .card .table td .btn-sm {
  margin: 0 1px;
  white-space: nowrap;
}

.content .card .table td .badge {
  font-weight: 600;
  letter-spacing: 0.02em;
}

.content .card-header .card-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0;
}

.content form .form-group > label {
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.content .select2-container--bootstrap4 .select2-selection {
  min-height: calc(1.5em + 0.5rem + 2px);
  border: 1px solid #ced4da;
  background-color: #fff;
}

.content .select2-container--bootstrap4 .select2-selection__rendered {
  color: #495057;
  line-height: calc(1.5em + 0.5rem);
  padding-left: 0.75rem;
}

.content .select2-container--bootstrap4 .select2-selection__placeholder {
  color: #6c757d;
}

.select2-container {
  width: 100% !important;
  z-index: 1055;
}

.select2-container--open {
  z-index: 1060;
}

.select2-container--bootstrap4 .select2-results__option--highlighted[aria-selected] {
  background-color: #007bff;
}

.select2-dropdown {
  border-color: #ced4da;
}

.select2-container--bootstrap4.select2-container--focus .select2-selection,
.select2-container--bootstrap4.select2-container--open .select2-selection {
  border-color: #80bdff;
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.table .select2-container--bootstrap4 .select2-selection {
  min-height: calc(1.5em + 0.25rem + 2px);
  font-size: 0.875rem;
}

.table .select2-container--bootstrap4 .select2-selection__rendered {
  line-height: calc(1.5em + 0.25rem);
}

/* Hide native select after Select2 init (avoid double display) */
select.select2-hidden-accessible {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* ---- Navbar ---- */
.main-header .navbar-nav .nav-link {
  color: #495057;
}
