[hidden] { display: none !important; }
:root { color-scheme: dark; }
body { font-family: system-ui, -apple-system, "Segoe UI", sans-serif; line-height:1.45; }
button, input, textarea, select { font:inherit; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, a:focus-visible { outline: 2px solid #00d9ff; outline-offset: 2px; }
.sidebar { min-height:100vh; position:sticky; top:0; display:flex; flex-direction:column; }
.logo h2 { text-align:left; letter-spacing:-.7px; }
.logo p { font-size:10px; letter-spacing:2px; color:#7f8aa3; margin-top:6px; }
.sidebar-footer { color:#6e7a96; font-size:12px; margin-top:auto; padding:18px 14px; }
.content { min-width:0; max-width:1600px; margin:0 auto; width:100%; }
.topbar { gap:15px; }
.topbar p { color:#8f9bb5; margin-top:4px; font-size:14px; }
.account-header { display:flex; align-items:center; gap:16px; }
.account-header .admin { display:flex; flex-direction:column; text-align:right; gap:3px; }
.account-header .admin strong { color:#fff; font-size:14px; }
.account-header .admin small { color:#8f9bb5; }
.btn-primary, .btn-small { transition:background .15s, border-color .15s; }
.btn-small[disabled], .btn-primary[disabled] { opacity:.5; cursor:not-allowed; }
button.danger { color:#ff88a0; border-color:#7d3248; }
button.danger:hover { border-color:#ff5c8a; }
.section { overflow:hidden; }
.section > .section-subtitle { margin:-13px 0 20px; color:#8f9bb5; font-size:14px; }
.subtle { color:#8f9bb5; }
.card .number { overflow-wrap:anywhere; }
.table-container { border:1px solid #263250; border-radius:12px; }
.table-container table { min-width:640px; }
.table-container th, .table-container td { text-align:left !important; width:auto !important; }
.table-container tr:hover td { background:#151e35; }
.table-actions { display:flex; gap:8px; flex-wrap:wrap; }
.form-grid { display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); column-gap:18px; }
.form-group textarea { width:100%; min-height:120px; }
.form-note { color:#9eaac2; font-size:13px; margin:8px 0 16px; }
.form-actions { flex-wrap:wrap; }
.text-pill { border-radius:40px; display:inline-block; padding:5px 10px; background:#233454; color:#b8d9f5; font-size:12px; }
.empty-state { padding:24px; text-align:center; color:#8f9bb5; }
#notification { margin-bottom:20px; padding:14px 18px; border-radius:10px; background:#16354d; color:#bde5ff; border:1px solid #2b6580; }
#notification.error { background:#3b1b31; border-color:#7a3b57; color:#ffd9e2; }
#notification.success { background:#123b32; border-color:#2a7359; color:#c7f9e2; }
#login-screen { overflow-y:auto; padding:20px; }
.login-box { position:relative; inset:auto; transform:none; }
.brand-icon { width:50px; height:50px; border-radius:15px; background:#102f43; color:#00d9ff; display:flex; align-items:center; justify-content:center; font-size:26px; margin:0 auto 18px; }
.login-box .login-note { color:#7989aa; font-size:12px; margin:18px 0 0; }
#login-error { min-height:20px; }
.member-badge { font-weight:600; color:#4be0a2; }
.member-badge.disabled { color:#ff91ae; }
code { color:#8ce7ff; font-size:.9em; overflow-wrap:anywhere; }
.service-grid { display:grid; grid-template-columns:repeat(auto-fit, minmax(150px,1fr)); gap:12px; }
.service-stat { background:#151e35; border:1px solid #273656; border-radius:12px; padding:16px; }
.service-stat p { margin-top:8px; font-size:28px; font-weight:700; color:#00d9ff; }
.activity-item { gap:10px; }
.activity-item p { overflow-wrap:anywhere; }
@media (max-width:900px) { .cards { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width:700px) { .sidebar { min-height:unset; position:static; padding:16px; } .logo { margin-bottom:12px; } .sidebar-footer { display:none; } .menu { display:flex; gap:6px; flex-wrap:wrap; } .menu li { margin:0; } .menu a { padding:9px 11px; font-size:13px; } .content { padding:18px; } .topbar { align-items:start; flex-direction:column; } .account-header { width:100%; justify-content:space-between; } .account-header .admin { text-align:left; } .form-grid { grid-template-columns:1fr; } .cards { grid-template-columns:repeat(2,minmax(0,1fr)); } .section { padding:18px; } .topbar h1 { font-size:24px; } }
@media (max-width:420px) { .cards { grid-template-columns:1fr; } .login-box { padding:25px; } }
.master-dialog { position:fixed; inset:0; margin:auto; padding:24px; border:1px solid #364962; border-radius:16px; background:#121a2c; color:#fff; width:min(460px,calc(100% - 28px)); box-shadow:0 24px 70px #000b; }
.master-dialog::backdrop { background:rgba(0,0,0,.75); }
.master-dialog h2 { color:#e5f3ff; margin-bottom:10px; font-size:20px; }
.master-dialog p { margin:8px 0 16px; }
.master-dialog label { display:block; margin-bottom:8px; }
.master-dialog input { background:#090e1d; border:1px solid #34435f; border-radius:8px; padding:12px; color:white; width:100%; }

.login-link { background:transparent; border:0; color:#74dfff; cursor:pointer; padding:12px 0 0; text-decoration:underline; font-size:13px; width:100%; }

/* MiPanel 2.1 · Estados calculados por vencimiento */
.expiry-count-row { display:flex; flex-wrap:wrap; gap:10px; margin:4px 0 22px; }
.expiry-status { white-space:nowrap; }
.active-expiry { color:#20e58a; background:rgba(32,229,138,.13); }
.warning-expiry { color:#ffd45c; background:rgba(255,212,92,.14); }
.expired-expiry { color:#ff8fa0; background:rgba(255,80,115,.16); }
.inactive-expiry { color:#b1bed4; background:rgba(145,164,194,.12); }
.neutral-expiry { color:#aac7da; background:rgba(145,164,194,.10); }
.card.red .number { color:#ff718b; }
.cards.expiry-cards { grid-template-columns:repeat(3,minmax(0,1fr)); }
.expiry-date-note { font-size:12px; margin-top:5px; color:#9eaac2; }
.expiry-section-title { display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; }
.expiry-section-title h2 { margin-bottom:10px; }
.expiry-alert-list { display:grid; gap:10px; margin-top:16px; }
.expiry-alert { background:#151e35; border:1px solid #2b3956; border-radius:10px; padding:13px 15px; display:flex; align-items:center; justify-content:space-between; gap:16px; }
.expiry-alert strong { color:#ecf6ff; font-size:14px; }
.expiry-alert p { font-size:12px; margin:5px 0 0; overflow-wrap:anywhere; }
@media (max-width:900px) { .cards.expiry-cards { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width:420px) { .cards.expiry-cards { grid-template-columns:1fr; } .expiry-alert { align-items:start; flex-direction:column; } }

/* MiPanel 2.2 · Alias opcional por cuenta */
.account-alias { font-weight:600; color:#8deaff; white-space:normal; overflow-wrap:anywhere; }
.alert-account-alias { font-weight:600; color:#8deaff; font-size:13px; margin:5px 0 0; overflow-wrap:anywhere; }

/* MiPanel 2.3 · catálogo, filtros, contraseñas y móvil */
.password-input-wrap {display:flex; align-items:stretch; gap:8px; width:100%; min-width:0;}
.password-input-wrap > input { flex:1; min-width:0; width:auto !important; }
.password-eye {border:1px solid #304462; border-radius:8px; padding:9px 12px; background:#18243d;
 color:#c8f3ff; font-size:12px; cursor:pointer; white-space:nowrap;}
.password-eye:hover {border-color:#00d9ff;}
.password-eye:focus-visible {outline:2px solid #00d9ff; outline-offset:2px;}
.account-filters {display:grid; grid-template-columns:minmax(230px,2fr) minmax(130px,1fr) minmax(130px,1fr);gap:12px;align-items:end;margin:10px 0 20px;}
.account-filters .search-box {margin:0;}
.account-filters .form-group {margin:0;}
.account-filters .form-group label {font-size:12px;color:#aebbd1;}
.account-filters select {height:48px;min-width:0;}
.service-create-form {display:flex;align-items:end;gap:14px;flex-wrap:wrap;margin:16px 0 20px;}
.service-create-form .form-group {margin:0;flex:1 1 250px;}
.service-create-form .btn-primary {width:auto;min-height:47px;margin:0;}
.report-toolbar {display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:wrap;margin:0 0 18px;}
.report-toolbar .btn-small {white-space:nowrap;}
.table-container {overflow-x:auto;max-width:100%;-webkit-overflow-scrolling:touch;}
.menu-link {transition:background .15s;}
@media (max-width: 700px) {
 .sidebar {padding:12px 12px 4px;}
 .sidebar nav {overflow-x:auto;-webkit-overflow-scrolling:touch;}
 .sidebar .menu {flex-wrap:nowrap;width:max-content;max-width:none;padding-bottom:8px;}
 .menu a {white-space:nowrap;}
 .content {padding:14px;}
 .section {padding:16px;}
 .account-filters {grid-template-columns:1fr 1fr;}
 .account-filters .search-box {grid-column:1/-1;}
 .service-create-form {flex-direction:column;align-items:stretch;}
 .service-create-form .form-group {flex:auto;}
 .service-create-form .btn-primary {width:100%;}
}
@media (max-width:420px) {
 .cards.expiry-cards {grid-template-columns:repeat(2,minmax(0,1fr));}
 .cards.expiry-cards .card {padding:15px 13px;}
 .cards.expiry-cards .card h3 {font-size:11px;letter-spacing:0;}
 .account-filters {grid-template-columns:1fr;}
 .account-filters .search-box {grid-column:auto;}
 .password-input-wrap {gap:5px;}
 .password-eye {padding:8px;}
}
