/*
 * Tecsa Center UI 2.0 — shared component layer.
 * Shell ownership: Tecsa Center Core.
 * Module plugins render content only and reuse these classes/helpers.
 */
:root{
    --tc-ui-font:Inter,"Segoe UI",Roboto,Arial,sans-serif;
    --tc-ui-primary:#2f80ed;
    --tc-ui-primary-hover:#398bf2;
    --tc-ui-primary-active:#2774d8;
    --tc-ui-accent:#660099;
    --tc-ui-success:#22c55e;
    --tc-ui-danger:#ef5d72;
    --tc-ui-warning:#f59e0b;
    --tc-ui-text:#eef5ff;
    --tc-ui-text-soft:#c5d6ec;
    --tc-ui-text-muted:#9db3d2;
    --tc-ui-border:rgba(126,165,229,.16);
    --tc-ui-border-strong:rgba(143,180,245,.22);
    --tc-ui-radius-card:20px;
    --tc-ui-radius-control:14px;
    --tc-ui-control-height:46px;
    --tc-ui-gap:24px;
    --tc-ui-card-padding:24px;
    --tc-ui-transition:200ms ease;
    --tc-ui-surface:radial-gradient(circle at top right,rgba(111,187,255,.08),transparent 28%),linear-gradient(180deg,rgba(12,43,80,.95),rgba(8,30,59,.92));
    --tc-ui-surface-soft:linear-gradient(180deg,rgba(255,255,255,.055),rgba(255,255,255,.02));
    --tc-ui-shadow:inset 0 1px 0 rgba(255,255,255,.05),inset 0 -18px 24px rgba(4,17,36,.16),0 18px 40px rgba(0,12,28,.18);
}

.tc-app-shell,.tc-app-shell button,.tc-app-shell input,.tc-app-shell textarea,.tc-app-shell select{
    font-family:var(--tc-ui-font)!important;
}

.tc-ui-stack{display:grid;gap:var(--tc-ui-gap)}
.tc-ui-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--tc-ui-gap);align-items:start}
.tc-ui-grid--3{grid-template-columns:repeat(3,minmax(0,1fr))}
.tc-ui-full{grid-column:1/-1}

.tc-ui-card{
    position:relative;
    padding:var(--tc-ui-card-padding);
    border:1px solid var(--tc-ui-border);
    border-radius:var(--tc-ui-radius-card);
    background:var(--tc-ui-surface);
    box-shadow:var(--tc-ui-shadow);
    color:var(--tc-ui-text);
    overflow:hidden;
}
.tc-ui-card::before{
    content:"";
    position:absolute;
    inset:1px;
    border-radius:inherit;
    pointer-events:none;
    background:linear-gradient(180deg,rgba(255,255,255,.045),rgba(255,255,255,0) 22%);
}
.tc-ui-card>*{position:relative;z-index:1}
.tc-ui-card-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:18px}
.tc-ui-card-head h2,.tc-ui-card-head h3{margin:0;color:var(--tc-ui-text)!important;font-family:var(--tc-ui-font)!important}
.tc-ui-card-head p{margin:7px 0 0;color:var(--tc-ui-text-muted);line-height:1.5}

.tc-ui-hero{
    position:relative;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:16px;
    width:100%;
    height:108px;
    min-height:108px;
    max-height:108px;
    padding:14px 18px;
    border:1px solid var(--tc-ui-border-strong);
    border-radius:18px;
    background:radial-gradient(circle at top right,rgba(128,193,255,.12),transparent 28%),linear-gradient(135deg,rgba(12,42,80,.99),rgba(8,29,59,.97));
    box-shadow:var(--tc-ui-shadow);
    overflow:hidden;
}
.tc-ui-hero::before{content:"";position:absolute;inset:1px;border-radius:inherit;pointer-events:none;background:linear-gradient(180deg,rgba(255,255,255,.055),rgba(255,255,255,0) 24%)}
.tc-ui-hero-main{position:relative;z-index:1;display:flex;align-items:center;gap:14px;min-width:0;flex:1 1 auto}
.tc-ui-hero-icon{display:grid;place-items:center;width:58px;height:58px;flex:0 0 auto;border-radius:16px;background:linear-gradient(180deg,#2f8dff,#3568df);box-shadow:inset 0 1px 0 rgba(255,255,255,.16),0 12px 24px rgba(21,62,168,.2);color:#fff}
.tc-ui-hero-icon svg{width:32px;height:32px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.tc-ui-hero,.tc-ui-hero *{font-family:var(--tc-ui-font)!important}
.tc-ui-hero-copy{min-width:0}
.tc-ui-hero .tc-ui-hero-eyebrow{display:block!important;margin:0 0 3px!important;color:#69d4ff!important;opacity:1!important;font-size:10px!important;font-weight:850!important;line-height:1.15!important;letter-spacing:.1em!important;text-transform:uppercase!important}
.tc-ui-hero .tc-ui-hero-title{display:block!important;margin:0!important;color:var(--tc-ui-text)!important;opacity:1!important;font-size:22px!important;font-weight:800!important;line-height:1.08!important;letter-spacing:-.02em!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
.tc-ui-hero .tc-ui-hero-description{display:-webkit-box!important;margin:5px 0 0!important;color:var(--tc-ui-text-muted)!important;opacity:1!important;font-size:13px!important;font-weight:400!important;line-height:1.35!important;letter-spacing:0!important;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden!important}
.tc-ui-hero-stats{position:relative;z-index:1;display:flex;gap:8px;flex-wrap:nowrap;justify-content:flex-end;max-width:52%;overflow:hidden}
.tc-ui-stat{min-width:124px;padding:9px 11px;border:1px solid rgba(149,184,244,.12);border-radius:13px;background:var(--tc-ui-surface-soft);box-shadow:inset 0 1px 0 rgba(255,255,255,.05),0 8px 18px rgba(0,12,28,.1)}
.tc-ui-hero .tc-ui-stat small{display:block!important;margin:0!important;color:var(--tc-ui-text-muted)!important;opacity:1!important;font-size:10px!important;font-weight:400!important;line-height:1.15!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
.tc-ui-hero .tc-ui-stat strong{display:block!important;margin:4px 0 0!important;color:#fff!important;opacity:1!important;font-size:14px!important;font-weight:800!important;line-height:1.2!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}

.tc-ui-badge{display:inline-flex;align-items:center;gap:8px;padding:7px 12px;border:1px solid rgba(146,184,243,.18);border-radius:999px;background:var(--tc-ui-surface-soft);box-shadow:inset 0 1px 0 rgba(255,255,255,.05);color:#eaf2ff;font-size:12px;font-weight:700;white-space:nowrap}
.tc-ui-badge::before{content:"";width:8px;height:8px;border-radius:50%;background:#8aa6c8;box-shadow:0 0 0 4px rgba(138,166,200,.14)}
.tc-ui-badge.is-success::before{background:var(--tc-ui-success);box-shadow:0 0 0 4px rgba(34,197,94,.14)}
.tc-ui-badge.is-danger::before{background:var(--tc-ui-danger);box-shadow:0 0 0 4px rgba(239,93,114,.14)}
.tc-ui-badge.is-warning::before{background:var(--tc-ui-warning);box-shadow:0 0 0 4px rgba(245,158,11,.14)}

.tc-ui-button{display:inline-flex;align-items:center;justify-content:center;min-height:var(--tc-ui-control-height);padding:0 18px;border:1px solid #3f8ff0;border-radius:var(--tc-ui-radius-control);background:var(--tc-ui-primary)!important;background-image:none!important;color:#fff!important;text-decoration:none!important;font-size:14px;font-weight:700;cursor:pointer;appearance:none;-webkit-appearance:none;transition:transform var(--tc-ui-transition),background-color var(--tc-ui-transition),border-color var(--tc-ui-transition),box-shadow var(--tc-ui-transition);box-shadow:0 10px 22px rgba(47,128,237,.2)}
.tc-ui-button:hover{transform:translateY(-1px);background:var(--tc-ui-primary-hover)!important;border-color:#52a0ff}
.tc-ui-button:active{transform:none;background:var(--tc-ui-primary-active)!important}
.tc-ui-button:focus-visible{outline:none;box-shadow:0 0 0 4px rgba(47,128,237,.18),0 10px 22px rgba(47,128,237,.2)}
.tc-ui-button::before,.tc-ui-button::after{display:none!important;content:none!important}
.tc-ui-button--secondary{background:var(--tc-ui-surface-soft)!important;border-color:rgba(146,184,243,.2);box-shadow:inset 0 1px 0 rgba(255,255,255,.05)}
.tc-ui-button--danger{background:rgba(239,93,114,.08)!important;border-color:rgba(239,93,114,.38);color:#ffdce2!important;box-shadow:none}
.tc-ui-button--danger:hover{background:rgba(239,93,114,.14)!important;border-color:rgba(239,93,114,.56)}
.tc-ui-actions{display:flex;align-items:center;gap:12px;flex-wrap:wrap}

.tc-ui-field{display:grid;gap:8px}
.tc-ui-field>label,.tc-ui-label{color:#f4f8ff;font-size:14px;font-weight:650}
.tc-ui-input,.tc-ui-select,.tc-ui-textarea{width:100%;min-height:52px;border:1px solid rgba(147,183,245,.22);border-radius:var(--tc-ui-radius-control);background:linear-gradient(180deg,rgba(6,24,47,.74),rgba(5,20,39,.7));color:#fff;padding:14px 16px;font-size:16px;outline:none;box-shadow:inset 0 1px 0 rgba(255,255,255,.04),inset 0 -10px 14px rgba(0,0,0,.1)}
.tc-ui-input::placeholder,.tc-ui-textarea::placeholder{color:#7f98ba}
.tc-ui-input:focus,.tc-ui-select:focus,.tc-ui-textarea:focus{border-color:rgba(82,160,255,.56);box-shadow:0 0 0 4px rgba(47,128,237,.14)}
.tc-ui-help{color:var(--tc-ui-text-muted);font-size:12px;line-height:1.45}

.tc-ui-list{display:grid;gap:12px}
.tc-ui-row{position:relative;padding:16px 18px;border:1px solid rgba(146,184,243,.12);border-radius:18px;background:var(--tc-ui-surface-soft);box-shadow:inset 0 1px 0 rgba(255,255,255,.05),0 12px 24px rgba(0,12,28,.1)}
.tc-ui-empty{padding:22px;border:1px solid rgba(146,184,243,.14);border-radius:18px;background:var(--tc-ui-surface-soft);box-shadow:inset 0 1px 0 rgba(255,255,255,.05);color:var(--tc-ui-text-muted)}

.tc-ui-table-wrap{width:100%;overflow-x:auto;border:1px solid var(--tc-ui-border);border-radius:18px;background:rgba(5,24,48,.34)}
.tc-ui-table{width:100%;border-collapse:collapse;color:var(--tc-ui-text)}
.tc-ui-table th,.tc-ui-table td{padding:14px 16px;text-align:left;border-bottom:1px solid rgba(146,184,243,.1)}
.tc-ui-table th{color:var(--tc-ui-text-muted);font-size:12px;font-weight:750;text-transform:uppercase;letter-spacing:.04em}
.tc-ui-table tbody tr{transition:background var(--tc-ui-transition)}
.tc-ui-table tbody tr:hover{background:rgba(55,112,188,.1)}
.tc-ui-table tbody tr:last-child td{border-bottom:0}

@media(max-width:1100px){
    .tc-ui-grid,.tc-ui-grid--3{grid-template-columns:1fr}
    .tc-ui-hero-stats{max-width:46%}
    .tc-ui-stat{min-width:112px}
}
@media(max-width:760px){
    :root{--tc-ui-gap:14px;--tc-ui-card-padding:14px;--tc-ui-radius-card:16px;--tc-ui-radius-control:12px;--tc-ui-control-height:42px}
    .tc-ui-hero{height:auto;min-height:0;max-height:none;padding:14px;gap:12px;border-radius:16px}
    .tc-ui-hero.is-mobile-hidden{display:none}
    .tc-ui-hero-icon{width:52px;height:52px;border-radius:15px}
    .tc-ui-hero-icon svg{width:29px;height:29px}
    .tc-ui-hero-eyebrow{font-size:10px}
    .tc-ui-hero-title{font-size:20px;white-space:normal}
    .tc-ui-hero-description{font-size:12px;line-height:1.35}
    .tc-ui-hero-stats{width:100%;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
    .tc-ui-stat{min-width:0;padding:10px 12px;border-radius:13px}
    .tc-ui-stat small{font-size:10px}.tc-ui-stat strong{margin-top:5px;font-size:14px}
    .tc-ui-card-head{flex-direction:column;gap:9px;margin-bottom:12px}
    .tc-ui-card-head h2,.tc-ui-card-head h3{font-size:18px}.tc-ui-card-head p{margin-top:4px;font-size:12.5px;line-height:1.42}
    .tc-ui-button{min-height:42px;padding:0 14px;font-size:13px}
    .tc-ui-input,.tc-ui-select,.tc-ui-textarea{min-height:46px;padding:11px 13px;font-size:15px}
    .tc-ui-row{padding:12px;border-radius:14px}
}

/* 0.9.72 — color-scheme contract tokens.
   Core publishes the selected palette globally but does NOT force a module's
   content to switch. A module may opt in when it has been adapted by adding
   data-tc-theme-aware="1" to its root and using the shared tc-ui components,
   or it may consume the --tc-theme-* variables in its own stylesheet. */
body.tc-theme-dark,
html.tc-theme-dark{
    --tc-theme-page-bg:#06152a;
    --tc-theme-page-bg-2:#0b2b56;
    --tc-theme-surface:#0b2b56;
    --tc-theme-surface-soft:#102f54;
    --tc-theme-border:rgba(126,165,229,.16);
    --tc-theme-text:#eef5ff;
    --tc-theme-text-soft:#c5d6ec;
    --tc-theme-text-muted:#9db3d2;
    --tc-theme-control:#102f54;
    --tc-theme-shadow:0 18px 40px rgba(0,12,28,.18);
}
body.tc-theme-light,
html.tc-theme-light{
    --tc-theme-page-bg:#eef3f8;
    --tc-theme-page-bg-2:#e3ebf4;
    --tc-theme-surface:#ffffff;
    --tc-theme-surface-soft:#f4f7fa;
    --tc-theme-border:rgba(75,107,145,.16);
    --tc-theme-text:#17243a;
    --tc-theme-text-soft:#40536b;
    --tc-theme-text-muted:#6b7b91;
    --tc-theme-control:#f2f6fa;
    --tc-theme-shadow:0 16px 34px rgba(50,72,98,.09);
}

body.tc-theme-light [data-tc-theme-aware="1"],
html.tc-theme-light [data-tc-theme-aware="1"]{
    --tc-ui-text:var(--tc-theme-text);
    --tc-ui-text-soft:var(--tc-theme-text-soft);
    --tc-ui-text-muted:var(--tc-theme-text-muted);
    --tc-ui-border:var(--tc-theme-border);
    --tc-ui-border-strong:rgba(59,112,176,.22);
    --tc-ui-surface:radial-gradient(circle at top right,rgba(47,128,237,.055),transparent 28%),linear-gradient(180deg,rgba(255,255,255,.99),rgba(247,249,252,.98));
    --tc-ui-surface-soft:linear-gradient(180deg,rgba(255,255,255,.95),rgba(239,244,249,.88));
    --tc-ui-shadow:var(--tc-theme-shadow);
}
body.tc-theme-light [data-tc-theme-aware="1"] .tc-ui-hero,
html.tc-theme-light [data-tc-theme-aware="1"] .tc-ui-hero{
    border-color:#d9e3ee;
    background:radial-gradient(circle at top right,rgba(47,128,237,.07),transparent 28%),linear-gradient(135deg,#fff,#f4f7fb);
}
body.tc-theme-light [data-tc-theme-aware="1"] .tc-ui-hero .tc-ui-hero-eyebrow,
html.tc-theme-light [data-tc-theme-aware="1"] .tc-ui-hero .tc-ui-hero-eyebrow{color:#2f80ed!important}
body.tc-theme-light [data-tc-theme-aware="1"] .tc-ui-hero .tc-ui-hero-title,
body.tc-theme-light [data-tc-theme-aware="1"] .tc-ui-hero .tc-ui-stat strong,
html.tc-theme-light [data-tc-theme-aware="1"] .tc-ui-hero .tc-ui-hero-title,
html.tc-theme-light [data-tc-theme-aware="1"] .tc-ui-hero .tc-ui-stat strong{color:#17243a!important}
body.tc-theme-light [data-tc-theme-aware="1"] .tc-ui-card-head h2,
body.tc-theme-light [data-tc-theme-aware="1"] .tc-ui-card-head h3,
html.tc-theme-light [data-tc-theme-aware="1"] .tc-ui-card-head h2,
html.tc-theme-light [data-tc-theme-aware="1"] .tc-ui-card-head h3{color:#17243a!important}
body.tc-theme-light [data-tc-theme-aware="1"] .tc-ui-input,
body.tc-theme-light [data-tc-theme-aware="1"] .tc-ui-select,
body.tc-theme-light [data-tc-theme-aware="1"] .tc-ui-textarea,
html.tc-theme-light [data-tc-theme-aware="1"] .tc-ui-input,
html.tc-theme-light [data-tc-theme-aware="1"] .tc-ui-select,
html.tc-theme-light [data-tc-theme-aware="1"] .tc-ui-textarea{
    border-color:#d6e1ec;background:linear-gradient(180deg,#fff,#f4f7fa);color:#17243a;
    box-shadow:inset 0 1px 0 #fff,inset 0 -8px 12px rgba(68,89,115,.025);
}
body.tc-theme-light [data-tc-theme-aware="1"] .tc-ui-field>label,
body.tc-theme-light [data-tc-theme-aware="1"] .tc-ui-label,
html.tc-theme-light [data-tc-theme-aware="1"] .tc-ui-field>label,
html.tc-theme-light [data-tc-theme-aware="1"] .tc-ui-label{color:#20334b}


/* Core-owned module hero follows the Center scheme even when the module body
   itself has not yet been migrated to two themes. */
body.tc-theme-light .tc-ui-hero,
html.tc-theme-light .tc-ui-hero{
    border-color:#d9e3ee;
    background:radial-gradient(circle at top right,rgba(47,128,237,.07),transparent 28%),linear-gradient(135deg,#fff,#f4f7fb);
    box-shadow:0 15px 32px rgba(50,72,98,.09),inset 0 1px 0 #fff;
}
body.tc-theme-light .tc-ui-hero .tc-ui-hero-eyebrow,
html.tc-theme-light .tc-ui-hero .tc-ui-hero-eyebrow{color:#2f80ed!important}
body.tc-theme-light .tc-ui-hero .tc-ui-hero-title,
body.tc-theme-light .tc-ui-hero .tc-ui-stat strong,
html.tc-theme-light .tc-ui-hero .tc-ui-hero-title,
html.tc-theme-light .tc-ui-hero .tc-ui-stat strong{color:#17243a!important}
body.tc-theme-light .tc-ui-hero .tc-ui-hero-description,
body.tc-theme-light .tc-ui-hero .tc-ui-stat small,
html.tc-theme-light .tc-ui-hero .tc-ui-hero-description,
html.tc-theme-light .tc-ui-hero .tc-ui-stat small{color:#6b7b91!important}
body.tc-theme-light .tc-ui-hero .tc-ui-stat,
html.tc-theme-light .tc-ui-hero .tc-ui-stat{
    border-color:#dbe5ef;background:linear-gradient(180deg,#fff,#eef3f8);
    box-shadow:inset 0 1px 0 #fff,0 7px 15px rgba(50,72,98,.055);
}
