:root {
  --portal-primary: #0f6ef2;
  --portal-primary-dark: #0a58ca;
  --portal-bg: #eef4fb;
  --portal-sidebar-top: #162030;
  --portal-sidebar-bottom: #0f1723;
}
body, .login-page, .content-wrapper, .main-sidebar, .main-header, .main-footer, .card, .btn, .form-control, .table {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
.portal-auth-body {
  background: radial-gradient(circle at top left, rgba(15,110,242,0.25), transparent 32%), linear-gradient(135deg, #eef4fb, #f8fbff 55%, #ecf2fb);
}
.portal-login-box { width: 460px; max-width: calc(100vw - 2rem); }
.portal-login-logo { width: 90px; height: auto; }
.portal-title { font-size: 1.85rem; font-weight: 800; color: #111827; }
.portal-auth-meta { font-size: .9rem; color: #64748b; line-height: 1.7; }
.portal-body { background: var(--portal-bg); }
.portal-sidebar {
  background: linear-gradient(180deg, var(--portal-sidebar-top), var(--portal-sidebar-bottom));
}
.portal-brand-image {
  max-height: 34px;
  width: auto;
  object-fit: contain;
}
.portal-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255,255,255,.18);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}
.portal-content-wrapper {
  background: linear-gradient(180deg, rgba(255,255,255,.7), rgba(238,244,251,.95));
}
.card {
  border: 1px solid rgba(15, 23, 42, 0.06);
  border-radius: 1rem;
}
.card-header {
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}
.small-box {
  border-radius: 1rem;
}
.btn-primary {
  background: linear-gradient(135deg, var(--portal-primary), #4a8cff);
  border-color: var(--portal-primary);
}
.btn-primary:hover,
.btn-primary:focus {
  background: linear-gradient(135deg, var(--portal-primary-dark), var(--portal-primary));
  border-color: var(--portal-primary-dark);
}
.nav-sidebar .nav-link {
  border-radius: .8rem;
  margin-bottom: .25rem;
}
.nav-sidebar .nav-link.active {
  background: rgba(255,255,255,.16);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.08);
}
.text-light-50 { color: rgba(255,255,255,.65); }
.text-break { word-break: break-all; }
.table thead th { border-top: 0; }
@media (max-width: 767.98px) {
  .portal-login-box { width: 100%; }
  .content-header .alert { margin-bottom: .75rem; }
}

.portal-chip-grid{display:flex;flex-wrap:wrap;gap:.5rem}
.portal-chip{display:inline-flex;align-items:center;padding:.45rem .7rem;border-radius:999px;background:#edf4ff;color:#174ea6;font-size:.83rem;border:1px solid rgba(23,78,166,.12)}
.portal-license-table td,.portal-license-table th{vertical-align:middle}
.modal-content{border-radius:1rem;border:1px solid rgba(15,23,42,.08)}
.small-box .icon>i{font-size:52px;top:12px}


/* Fix botón de emisión de licencias */
.card .btn.btn-primary.px-4.py-2,
.card .btn.btn-primary[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto !important;
  min-width: 180px;
  height: 46px;
  border-radius: 12px;
  font-weight: 600;
  white-space: nowrap;
  padding: 0.65rem 1.25rem !important;
}

.card .btn.btn-primary[type="submit"]::before,
.card .btn.btn-primary[type="submit"]::after {
  display: none !important;
  content: none !important;
}


.portal-body .main-header {
  background: rgba(255,255,255,.88);
  backdrop-filter: blur(12px);
}

.portal-sidebar .brand-link {
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.portal-content-wrapper {
  padding-top: .25rem;
}

.portal-hero {
  background: linear-gradient(135deg, #0f6ef2, #4a8cff);
  color: #fff;
  border-radius: 1rem;
  padding: 1.25rem 1.35rem;
  box-shadow: 0 16px 40px rgba(15,110,242,.16);
}

.portal-hero h1,
.portal-hero .h3,
.portal-hero p {
  color: #fff;
}

.portal-hero .btn-light {
  border-radius: .9rem;
  font-weight: 600;
}

.portal-elevated {
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.portal-body .table thead th {
  font-size: .82rem;
  text-transform: uppercase;
  letter-spacing: .03em;
  color: #64748b;
  background: #f8fbff;
}

.portal-body .table tbody td {
  vertical-align: middle;
}

.portal-body .form-control,
.portal-body .custom-select,
.portal-body textarea {
  border-radius: .85rem;
  min-height: 44px;
}

.portal-body textarea.form-control {
  min-height: 120px;
}

.portal-body .btn {
  border-radius: .85rem;
  font-weight: 600;
}

.portal-body .small-box {
  overflow: hidden;
  border: 0;
}

.portal-body .small-box .inner {
  padding: 1.15rem;
}

.portal-body .badge {
  border-radius: 999px;
  padding: .45em .7em;
}


/* Office 365 inspired redesign */
:root{
  --portal-primary:#2563eb;
  --portal-primary-dark:#1d4ed8;
  --portal-bg:#f4f5f7;
  --portal-surface:#ffffff;
  --portal-surface-2:#f8f9fb;
  --portal-line:#e5e7eb;
  --portal-text:#1f2937;
  --portal-muted:#6b7280;
  --portal-sidebar-top:#2c2f36;
  --portal-sidebar-bottom:#20232a;
}
.portal-auth-body{
  background:
    radial-gradient(circle at top right, rgba(37,99,235,.08), transparent 24%),
    linear-gradient(180deg, #f6f7f9 0%, #eef1f5 100%);
  min-height:100vh;
}
.portal-auth-page{
  min-height:100vh;
  display:flex;
  flex-direction:column;
}
.portal-auth-topbar{
  background:#fff;
  border-bottom:1px solid var(--portal-line);
}
.portal-auth-topbar-inner{
  max-width:1360px;
  margin:0 auto;
  padding:.9rem 1.5rem;
  display:flex;
  justify-content:space-between;
  color:var(--portal-muted);
  font-size:.92rem;
  font-weight:600;
}
.portal-auth-flash-wrap{
  max-width:1360px;
  width:100%;
  margin:1rem auto 0;
  padding:0 1.5rem;
}
.portal-auth-container{
  flex:1;
  width:100%;
  max-width:1360px;
  margin:0 auto;
  padding:1.5rem;
  display:flex;
  align-items:center;
}
.portal-login-shell{
  width:100%;
  display:grid;
  grid-template-columns:minmax(320px,1.05fr) minmax(360px,.95fr);
  background:rgba(255,255,255,.78);
  border:1px solid rgba(255,255,255,.72);
  border-radius:1.4rem;
  overflow:hidden;
  box-shadow:0 28px 70px rgba(15,23,42,.10);
  backdrop-filter:blur(12px);
}
.portal-login-panel{min-height:640px;}
.portal-login-brand{
  background:linear-gradient(145deg, rgba(255,255,255,.96), rgba(245,247,250,.95));
  padding:2.25rem 2.4rem;
  border-right:1px solid var(--portal-line);
  display:flex;
  flex-direction:column;
}
.portal-login-brand-top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:1rem;
  margin-bottom:2.2rem;
}
.portal-login-logo{width:auto;max-height:52px;}
.portal-suite-badge{
  display:inline-flex;
  align-items:center;
  padding:.45rem .8rem;
  border-radius:999px;
  background:#eef2ff;
  color:#374151;
  font-size:.82rem;
  font-weight:700;
}
.portal-login-copy{max-width:540px;}
.portal-title{
  font-size:2.35rem;
  font-weight:800;
  color:#111827;
  letter-spacing:-.02em;
}
.portal-auth-meta{
  color:#4b5563;
  font-size:1rem;
  line-height:1.8;
}
.portal-feature-list{
  display:grid;
  gap:1rem;
  margin-top:2rem;
}
.portal-feature-item{
  display:grid;
  grid-template-columns:48px 1fr;
  gap:1rem;
  align-items:flex-start;
  padding:1rem 1.05rem;
  border:1px solid var(--portal-line);
  border-radius:1rem;
  background:rgba(255,255,255,.8);
}
.portal-feature-item strong{
  display:block;
  margin-bottom:.15rem;
  color:#111827;
}
.portal-feature-item div:last-child{
  color:#6b7280;
  font-size:.93rem;
  line-height:1.6;
}
.portal-feature-icon{
  width:48px;height:48px;border-radius:14px;
  background:#f3f4f6;color:#374151;display:flex;align-items:center;justify-content:center;
  font-size:1.05rem;
}
.portal-login-form-panel{
  background:#fff;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:2rem;
}
.portal-login-form-wrap{width:100%;max-width:430px;}
.portal-login-form-head{margin-bottom:1.75rem;}
.portal-form-kicker{
  color:#6b7280;text-transform:uppercase;letter-spacing:.08em;font-size:.76rem;font-weight:800;margin-bottom:.45rem;
}
.portal-login-heading{
  font-size:2rem;font-weight:800;letter-spacing:-.02em;color:#111827;margin-bottom:.45rem;
}
.portal-login-submit{min-height:46px;border-radius:.9rem;font-weight:700;}
.portal-login-footer-note{
  margin-top:1.25rem;display:flex;justify-content:space-between;color:#6b7280;font-size:.86rem;
}
.portal-body{
  background:linear-gradient(180deg,#f4f5f7 0%,#eef1f5 100%);
}
.main-header.navbar{
  background:rgba(255,255,255,.92)!important;
  border-bottom:1px solid var(--portal-line)!important;
  backdrop-filter:blur(10px);
}
.portal-sidebar{
  background:linear-gradient(180deg,var(--portal-sidebar-top),var(--portal-sidebar-bottom));
}
.portal-sidebar .brand-link{border-bottom:1px solid rgba(255,255,255,.08);}
.brand-text{font-weight:700!important;color:#f9fafb!important;letter-spacing:.01em;}
.user-panel{border-bottom:1px solid rgba(255,255,255,.08)!important;}
.nav-sidebar .nav-link{
  border-radius:.8rem;margin-bottom:.28rem;color:rgba(255,255,255,.82);padding:.8rem .9rem;
}
.nav-sidebar .nav-link:hover{background:rgba(255,255,255,.08);}
.nav-sidebar .nav-link.active{background:rgba(255,255,255,.14);color:#fff;box-shadow:none;}
.portal-content-wrapper{background:transparent;padding-top:.25rem;}
.portal-hero{
  background:linear-gradient(135deg,#ffffff,#f3f4f6);
  color:#111827;border:1px solid var(--portal-line);border-radius:1.1rem;padding:1.2rem 1.35rem;
  box-shadow:0 10px 28px rgba(15,23,42,.05);
}
.portal-hero h1,.portal-hero .h3,.portal-hero p{color:#111827;}
.portal-hero .btn-light{
  background:#fff;border:1px solid var(--portal-line);border-radius:.9rem;font-weight:600;
}
.portal-hero .btn-outline-light{
  color:#374151;border-color:#d1d5db;background:#fff;
}
.card{
  border:1px solid var(--portal-line);border-radius:1rem;box-shadow:0 10px 28px rgba(15,23,42,.05);
}
.card-header{border-bottom:1px solid var(--portal-line);background:#fff;}
.portal-elevated{box-shadow:0 12px 28px rgba(15,23,42,.08);}
.small-box{
  border-radius:1rem;overflow:hidden;border:1px solid var(--portal-line)!important;background:#fff!important;color:#111827!important;
}
.small-box .icon{color:#d1d5db;}
.small-box p{color:#6b7280!important;}
.portal-body .form-control,.portal-body .custom-select,.portal-body textarea{
  min-height:44px;border-radius:.85rem;border-color:#d8dde6;box-shadow:none!important;
}
.portal-body textarea.form-control{min-height:120px;}
.portal-body .btn{border-radius:.85rem;font-weight:600;}
.portal-body .btn-primary{
  background:linear-gradient(135deg,#2563eb,#3b82f6);border-color:#2563eb;
}
.portal-body .btn-outline-primary{color:#2563eb;border-color:#bfd3ff;}
.portal-body .table thead th{
  border-top:0;background:#fafbfc;color:#6b7280;font-size:.82rem;text-transform:uppercase;letter-spacing:.03em;
}
.portal-body .table td{vertical-align:middle;}
.portal-body .badge{border-radius:999px;padding:.48em .72em;}
.main-footer{
  background:rgba(255,255,255,.86);border-top:1px solid var(--portal-line);
}
@media (max-width:991.98px){
  .portal-auth-container{padding:1rem;}
  .portal-login-shell{grid-template-columns:1fr;}
  .portal-login-panel{min-height:auto;}
  .portal-login-brand{border-right:0;border-bottom:1px solid var(--portal-line);}
}


.portal-login-brand-top{
  justify-content:center !important;
}
.portal-login-logo-lg{
  max-height: 140px;
  max-width: 100%;
  width: auto;
}
.portal-login-system-name{
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: .06em;
  color: #0f172a;
  margin-bottom: 1rem;
}
