*{box-sizing:border-box}:root{--orange:#ff4f1f;--orange-dark:#dc4318;--teal:#007f98;--bg:#f5f7fa;--surface:#fff;--soft:#f8fafc;--text:#172033;--muted:#667085;--line:#e4e7ec;--line2:#d0d5dd;--success:#027a48;--success-bg:#ecfdf3;--danger:#b42318;--danger-bg:#fef3f2;--warning:#b54708;--warning-bg:#fffaeb;--shadow:0 14px 35px rgba(16,24,40,.08);--shadow2:0 8px 22px rgba(16,24,40,.055);--radius:16px}body{margin:0;font-family:"Inter","Segoe UI",Arial,sans-serif;background:var(--bg);color:var(--text);font-size:14px}a{text-decoration:none;color:inherit}button,input,select,textarea{font-family:inherit}label{display:block;margin-bottom:6px;font-size:13px;font-weight:700;color:#344054}input,select,textarea{width:100%;padding:10px 12px;border:1px solid var(--line2);border-radius:9px;background:#fff;color:var(--text);font-size:14px;outline:none}input:focus,select:focus,textarea:focus{border-color:var(--teal);box-shadow:0 0 0 3px rgba(0,127,152,.12)}textarea{resize:vertical}button,.btn-primary{border:0;background:var(--orange);color:#fff;border-radius:9px;padding:10px 14px;font-weight:800;cursor:pointer}button:hover,.btn-primary:hover{background:var(--orange-dark)}.btn-teal{background:var(--teal)}.muted-text,.muted-line{color:var(--muted)}.muted-line{display:block;margin-top:3px;font-size:12px}.login-body{min-height:100vh;background:radial-gradient(circle at 8% 12%,rgba(255,79,31,.14),transparent 28%),linear-gradient(135deg,#fbfcfd 0%,#eef2f6 100%)}.login-shell{min-height:100vh;display:grid;grid-template-columns:1.1fr .9fr;align-items:center;gap:44px;padding:42px;max-width:1260px;margin:0 auto}.login-hero{min-height:560px;border:1px solid rgba(228,231,236,.85);border-radius:28px;background:linear-gradient(rgba(255,255,255,.76),rgba(255,255,255,.9)),linear-gradient(135deg,#fff,#eef2f6);box-shadow:var(--shadow);padding:46px;position:relative;overflow:hidden;display:flex;flex-direction:column;justify-content:center}.login-hero:before{content:"";position:absolute;inset:0;background:radial-gradient(circle at 16% 16%,rgba(255,79,31,.22) 0 2px,transparent 3px);background-size:22px 22px;opacity:.42}.login-hero:after{content:"";position:absolute;left:44px;bottom:42px;width:470px;height:260px;background:linear-gradient(155deg,rgba(255,255,255,.8),rgba(255,255,255,.2)),linear-gradient(45deg,rgba(148,163,184,.22),rgba(255,255,255,.4));border:1px solid rgba(208,213,221,.65);border-radius:18px;transform:skewY(-5deg);opacity:.42}.logo-word{position:relative;z-index:1;font-size:48px;line-height:1;font-weight:900;color:var(--orange);letter-spacing:-1px;margin-bottom:22px}.logo-word span{color:#344054}.login-hero h1{position:relative;z-index:1;font-size:42px;max-width:560px;line-height:1.08;margin:0 0 16px;color:var(--text)}.login-hero p{position:relative;z-index:1;color:var(--muted);max-width:560px;line-height:1.6;font-size:17px}.login-points{position:relative;z-index:1;display:flex;flex-wrap:wrap;gap:10px;margin-top:24px}.login-points span{border:1px solid var(--line);background:rgba(255,255,255,.82);border-radius:999px;padding:9px 13px;font-weight:800;color:#344054}.login-panel{background:#fff;border:1px solid var(--line);border-radius:24px;padding:30px;box-shadow:var(--shadow)}.login-tabs-title{text-align:center;margin-bottom:22px}.login-tabs-title h2{margin:0;font-size:28px}.login-tabs-title p{margin:6px 0 0;color:var(--muted)}.login-two-columns{display:grid;grid-template-columns:1fr;gap:16px}.login-box{border:1px solid var(--line);background:var(--soft);border-radius:18px;padding:22px}.login-box h3{margin:0 0 5px}.login-box p{color:var(--muted);margin:0 0 18px}.login-box button{width:100%;margin-top:18px}.medico-login{border-color:#fed7aa;background:#fff7ed}.erro-login,.alert-error{padding:12px 14px;border-radius:10px;background:var(--danger-bg);color:var(--danger);font-weight:800;margin-bottom:14px}.alert-success{padding:12px 14px;border-radius:10px;background:var(--success-bg);color:var(--success);font-weight:800;margin-bottom:14px}.alert-warning{padding:12px 14px;border-radius:10px;background:var(--warning-bg);color:var(--warning);font-weight:800;margin-bottom:14px}.alert-warning a{text-decoration:underline;margin-left:8px}.app-layout{min-height:100vh;display:grid;grid-template-columns:248px 1fr}.sidebar{background:#fff;border-right:1px solid var(--line);padding:18px 14px;position:sticky;top:0;height:100vh;overflow-y:auto}.sidebar-brand{display:flex;align-items:center;gap:10px;padding:4px 8px 18px;border-bottom:1px solid var(--line);margin-bottom:14px}.sidebar-logo{width:34px;height:34px;border-radius:9px;display:grid;place-items:center;background:var(--orange);color:#fff;font-weight:900}.sidebar-brand strong{display:block;color:var(--orange);font-size:20px;line-height:1}.sidebar-brand span{display:block;color:var(--muted);font-size:11px;margin-top:2px}.sidebar-nav{display:grid;gap:5px}.sidebar-nav a{display:flex;align-items:center;gap:10px;padding:11px 12px;border-radius:10px;color:#344054;font-weight:700}.sidebar-nav a:hover{background:#f2f4f7}.sidebar-nav a.active{background:var(--orange);color:#fff}.sidebar-footer{margin-top:24px;border-top:1px solid var(--line);padding:14px 8px 0;color:var(--muted);font-size:12px}.main-shell{min-width:0}.topbar{height:72px;background:#fff;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 30px;position:sticky;top:0;z-index:20}.topbar-title strong{font-size:18px}.topbar-title span{display:block;color:var(--muted);font-size:13px;margin-top:2px}.topbar-actions{display:flex;align-items:center;gap:14px}.notification-dot{position:relative;width:36px;height:36px;border:1px solid var(--line);background:#fff;border-radius:50%;display:grid;place-items:center}.notification-dot b{position:absolute;top:-5px;right:-5px;background:var(--orange);color:#fff;border-radius:999px;padding:2px 6px;font-size:10px}.user-chip{display:flex;align-items:center;gap:10px;border-left:1px solid var(--line);padding-left:14px}.avatar{width:38px;height:38px;border-radius:50%;display:grid;place-items:center;background:var(--teal);color:#fff;font-weight:900}.user-chip strong{display:block}.user-chip span{display:block;color:var(--muted);font-size:12px}.logout-link{color:var(--orange);font-weight:900;font-size:13px}.content{padding:28px 30px 42px}.page-head{display:flex;justify-content:space-between;gap:22px;align-items:flex-start;margin-bottom:22px}.page-kicker{color:var(--orange);font-size:13px;font-weight:900;text-transform:uppercase;letter-spacing:.02em}.page-head h1{margin:6px 0;font-size:30px}.page-head p{margin:0;color:var(--muted)}.page-actions{display:flex;gap:10px;flex-wrap:wrap;justify-content:flex-end}.card,.form-card,.table-card,.placeholder-page,.hero,.quick-card,.module-card,.stock-category-card,.email-card{background:#fff;border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow2)}.form-card,.table-card,.placeholder-page,.hero,.stock-category-card,.email-card{padding:22px;margin-top:18px}.hero{margin-top:0}.hero h2,.form-card h3,.table-card h3{margin-top:0}.hero p,.form-card p,.table-card p{color:var(--muted)}.badge{display:inline-flex;align-items:center;gap:6px;background:#fff1e8;color:var(--orange);border-radius:999px;padding:6px 10px;font-weight:900;font-size:12px}.kpi-grid,.quick-actions,.module-grid{display:grid;gap:16px}.kpi-grid{grid-template-columns:repeat(4,1fr);margin-bottom:18px}.kpi-card{background:#fff;border:1px solid var(--line);border-radius:var(--radius);padding:18px;box-shadow:var(--shadow2)}.kpi-card span{color:var(--muted);font-size:13px;font-weight:800}.kpi-card strong{display:block;font-size:28px;margin:8px 0 5px}.kpi-card small{color:var(--success);font-weight:800}.quick-actions{grid-template-columns:repeat(3,1fr);margin-bottom:18px}.module-grid{grid-template-columns:repeat(3,1fr)}.quick-card{display:flex;gap:14px;padding:18px}.module-card{padding:22px;min-height:150px}.quick-card,.module-card{transition:.16s ease}.quick-card:hover,.module-card:hover{border-color:rgba(255,79,31,.45);transform:translateY(-2px);box-shadow:var(--shadow)}.quick-card span,.module-card .icon{font-size:28px}.quick-card h3,.module-card h3{margin:0 0 7px}.module-card h3{margin-top:14px}.quick-card p,.module-card p{margin:0;color:var(--muted);line-height:1.45}.section-title-row{display:flex;justify-content:space-between;gap:18px;align-items:flex-start;margin-bottom:18px}.back-link{color:var(--orange);font-weight:900}.full-field{grid-column:1/-1}.wide-field{grid-column:span 2}.user-form,.empresa-form,.utente-form,.marcacao-form,.fornecedor-form,.consumivel-form,.perfil-form,.fornecedor-page-form,.stock-edit-form,.excel-import-form,.search-form{display:grid;gap:14px;align-items:end}.user-form{grid-template-columns:1.3fr 1fr 1fr 1fr auto}.empresa-form{grid-template-columns:repeat(4,1fr) auto}.utente-form,.marcacao-form{grid-template-columns:repeat(4,1fr)}.fornecedor-form{grid-template-columns:repeat(3,1fr) auto}.perfil-form,.fornecedor-page-form{grid-template-columns:repeat(3,1fr)}.stock-edit-form{grid-template-columns:repeat(4,1fr)}.excel-import-form,.search-form{grid-template-columns:1fr auto}.user-form button,.empresa-form button,.utente-form button,.marcacao-form button,.fornecedor-form button,.perfil-form button,.fornecedor-page-form button,.stock-edit-form button,.excel-import-form button,.search-form button{margin-top:0}.stock-form-actions{display:flex;justify-content:flex-end;gap:10px;align-items:center}.stock-form-actions button{width:auto;min-width:190px}.table-wrapper{overflow-x:auto}.data-table{width:100%;border-collapse:collapse;background:#fff;border-radius:12px;overflow:hidden}.data-table th,.data-table td{border-bottom:1px solid var(--line);border-right:1px solid #f1f3f6;padding:11px 12px;text-align:left;vertical-align:middle;font-size:13px}.data-table th{background:#f7f8fb;color:#344054;font-weight:900;white-space:nowrap}.data-table tr:hover td{background:#fcfcfd}.status{display:inline-block;padding:5px 9px;border-radius:7px;font-size:11px;font-weight:900;text-transform:uppercase}.status.active,.status.success{background:var(--success-bg);color:var(--success)}.status.inactive{background:var(--danger-bg);color:var(--danger)}.small-btn{display:inline-flex;align-items:center;justify-content:center;padding:8px 10px;border-radius:8px;font-size:12px;font-weight:900;margin:3px 5px 3px 0}.small-btn.success{background:var(--success-bg);color:var(--success)}.small-btn.danger{background:var(--danger-bg);color:var(--danger)}.small-btn.neutral{background:#f2f4f7;color:#344054}.inline-password-form{display:inline-flex;gap:6px;align-items:center}.inline-password-form input{width:115px;padding:8px}.inline-password-form button{padding:8px 10px;width:auto}.row-warning{background:#fffbf5}.stock-tabs{display:flex;flex-wrap:wrap;gap:8px;margin:16px 0}.stock-tab{background:#fff;border:1px solid var(--line);padding:8px 11px;border-radius:999px;color:#344054;font-weight:800;font-size:12px}.stock-tab.active{color:var(--orange);border-color:rgba(255,79,31,.35);background:#fff7ed}.stock-actions-panel{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;margin:18px 0}.stock-action-button{background:#fff;border:1px solid var(--line);border-radius:16px;padding:17px;color:var(--text);display:flex;gap:12px;align-items:flex-start;box-shadow:var(--shadow2)}.stock-action-button:hover{transform:translateY(-2px);border-color:var(--teal)}.stock-action-button span{font-size:24px}.stock-action-button strong{display:block;margin-bottom:4px}.stock-action-button small{display:block;color:var(--muted);line-height:1.35}.stock-sections{display:grid;gap:22px;margin-top:22px}.stock-category-card{padding:20px}.stock-category-header{display:flex;justify-content:space-between;gap:18px;align-items:center;margin-bottom:14px}.stock-category-header h3{margin:0;font-size:18px}.stock-category-header p{margin:4px 0 0;color:var(--muted)}.stock-table td:first-child{min-width:250px}.edit-product-panel{border-color:rgba(255,79,31,.45);box-shadow:0 16px 40px rgba(255,79,31,.12)}.stock-low-card{border-color:#fed7aa}.stock-baixo-top-actions{display:flex;gap:10px;flex-wrap:wrap;justify-content:flex-end}.dashboard-chart-grid{display:grid;grid-template-columns:1.25fr .9fr .9fr;gap:16px;margin-bottom:18px}.chart-placeholder{min-height:230px;background:linear-gradient(180deg,rgba(0,127,152,.08),rgba(255,255,255,0)),repeating-linear-gradient(to top,transparent 0 39px,#eef2f6 40px);border-radius:14px;padding:16px}.donut-placeholder{width:160px;height:160px;border-radius:50%;margin:18px auto;background:conic-gradient(var(--teal) 0 34%,#22c55e 34% 62%,#f59e0b 62% 82%,#94a3b8 82% 100%);position:relative}.donut-placeholder:after{content:"Total\A Itens";white-space:pre;position:absolute;inset:34px;background:#fff;border-radius:50%;display:grid;place-items:center;text-align:center;font-weight:900}.activity-list{display:grid;gap:12px}.activity-item{display:flex;gap:10px;align-items:flex-start;padding-bottom:12px;border-bottom:1px solid var(--line)}.activity-dot{width:28px;height:28px;border-radius:50%;display:grid;place-items:center;background:#f2f4f7}.stock-alert-overlay{position:fixed;inset:0;background:rgba(15,23,42,.44);z-index:9999;display:flex;align-items:center;justify-content:center;padding:24px}.stock-alert-modal{width:min(520px,100%);background:#fff;border-radius:24px;padding:30px;box-shadow:0 30px 80px rgba(15,23,42,.3);text-align:center;border:1px solid var(--line)}.stock-alert-icon{width:66px;height:66px;margin:0 auto 14px;display:grid;place-items:center;background:var(--warning-bg);border-radius:50%;font-size:32px}.stock-alert-modal h2{margin:0 0 10px;font-size:28px}.stock-alert-modal p{color:var(--muted);line-height:1.6;margin-bottom:22px}.stock-alert-actions{display:flex;gap:12px;justify-content:center;flex-wrap:wrap}.alert-btn{display:inline-block;padding:12px 16px;border-radius:12px;font-weight:900}.alert-btn.primary{background:var(--orange);color:#fff}.alert-btn.secondary{background:#f2f4f7;color:var(--text)}.medico-resumo-grid,.empresa-resumo-grid,.historico-resumo-grid{display:grid;gap:14px}.medico-resumo-grid{grid-template-columns:repeat(4,1fr);margin:18px 0 22px}.empresa-resumo-grid{grid-template-columns:repeat(4,1fr);margin:16px 0 24px}.historico-resumo-grid{grid-template-columns:repeat(7,1fr);margin:18px 0 22px}.medico-resumo-grid article,.empresa-resumo-grid article,.historico-resumo-grid article{background:#fff;border:1px solid var(--line);border-radius:14px;padding:16px;text-align:center;box-shadow:var(--shadow2)}.medico-resumo-grid strong,.empresa-resumo-grid strong,.historico-resumo-grid strong{display:block;color:var(--orange);font-size:24px}.medico-resumo-grid span,.empresa-resumo-grid span,.historico-resumo-grid span{color:var(--muted);font-size:12px}.consulta-resumo,.utente-detalhe-grid,.consulta-detalhe-grid{display:grid;gap:12px;background:var(--soft);border:1px solid var(--line);border-radius:14px;padding:16px}.consulta-resumo{grid-template-columns:repeat(5,1fr)}.utente-detalhe-grid,.consulta-detalhe-grid{grid-template-columns:repeat(4,1fr)}.consumivel-add-row{display:grid;grid-template-columns:1fr 180px auto;gap:14px;align-items:end;margin-bottom:18px}.consumivel-add-row button{margin-top:0}.button-main-final{max-width:380px;margin-left:auto;display:block}.small-remove-btn{width:auto;margin:0;padding:8px 10px;font-size:13px;background:var(--danger-bg);color:var(--danger)}.email-card-header{display:flex;justify-content:space-between;gap:16px;align-items:center;margin-bottom:16px}.email-card-header h3{margin:0}.email-card-header p{margin:4px 0 0;color:var(--muted)}.form-info,.consulta-observacoes{background:var(--warning-bg);color:var(--warning);padding:12px;border-radius:10px;font-size:14px}.filter-buttons{display:flex;flex-wrap:wrap;gap:10px}@media(max-width:1260px){.kpi-grid,.quick-actions,.module-grid,.stock-actions-panel,.dashboard-chart-grid{grid-template-columns:repeat(2,1fr)}.historico-resumo-grid{grid-template-columns:repeat(3,1fr)}.user-form,.empresa-form,.utente-form,.marcacao-form,.fornecedor-form,.consumivel-form,.perfil-form,.fornecedor-page-form,.stock-edit-form{grid-template-columns:repeat(2,1fr)}}@media(max-width:980px){.app-layout{grid-template-columns:1fr}.sidebar{position:relative;height:auto}.sidebar-nav{grid-template-columns:repeat(2,1fr)}.login-shell{grid-template-columns:1fr;padding:24px}.login-hero{min-height:auto}}@media(max-width:760px){.content{padding:18px}.topbar{height:auto;padding:16px 18px;flex-direction:column;align-items:flex-start}.topbar-actions{width:100%;justify-content:space-between}.page-head,.section-title-row,.stock-category-header,.email-card-header{flex-direction:column}.kpi-grid,.quick-actions,.module-grid,.stock-actions-panel,.dashboard-chart-grid,.user-form,.empresa-form,.utente-form,.marcacao-form,.fornecedor-form,.consumivel-form,.perfil-form,.fornecedor-page-form,.stock-edit-form,.excel-import-form,.search-form,.medico-resumo-grid,.empresa-resumo-grid,.historico-resumo-grid,.consulta-resumo,.utente-detalhe-grid,.consulta-detalhe-grid,.consumivel-add-row{grid-template-columns:1fr}.wide-field{grid-column:1/-1}.stock-form-actions,.stock-alert-actions{flex-direction:column;align-items:stretch}.stock-form-actions button,.alert-btn{width:100%;text-align:center}}

/* Refinamento profissional extra */
.login-shell.v2 {
    grid-template-columns: 1fr 460px;
}

.login-brand-card {
    position: relative;
    z-index: 1;
    max-width: 720px;
}

.login-metric-row {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-top: 34px;
    max-width: 640px;
}

.login-metric {
    background: rgba(255,255,255,0.82);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 18px;
    box-shadow: 0 8px 22px rgba(16,24,40,.05);
}

.login-metric strong {
    display: block;
    font-size: 24px;
    color: var(--text);
}

.login-metric span {
    display: block;
    color: var(--muted);
    margin-top: 4px;
    font-size: 12px;
    font-weight: 800;
}

.login-switch-note {
    margin-top: 14px;
    color: var(--muted);
    font-size: 12px;
    text-align: center;
}

.login-panel.v2 {
    padding: 34px;
}

.login-form-divider {
    height: 1px;
    background: var(--line);
    margin: 18px 0;
}

.management-login-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
}

.management-login-title .circle-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: #fff1e8;
    color: var(--orange);
    display: grid;
    place-items: center;
    font-size: 20px;
}

.management-login-title h3 {
    margin: 0;
    font-size: 19px;
}

.management-login-title p {
    margin: 3px 0 0;
    color: var(--muted);
    font-size: 13px;
}

.secondary-medico-entry {
    background: #f8fafc;
    border: 1px dashed var(--line2);
    border-radius: 14px;
    padding: 16px;
}

.secondary-medico-entry h4 {
    margin: 0 0 4px;
}

.secondary-medico-entry p {
    margin: 0 0 12px;
    color: var(--muted);
}

.form-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}

.form-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.form-grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}

.panel-title {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 16px;
}

.panel-title h3 {
    margin: 0;
}

.panel-title p {
    margin: 4px 0 0;
    color: var(--muted);
}

.compact-table td,
.compact-table th {
    padding: 9px 10px;
    font-size: 12.5px;
}

.table-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 14px;
}

.soft-panel {
    background: #f8fafc;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 16px;
}

.form-actions-right {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    grid-column: 1 / -1;
}

.form-actions-right button {
    width: auto;
    min-width: 180px;
}

.data-empty {
    text-align: center;
    padding: 34px !important;
    color: var(--muted);
}

@media(max-width:900px){
    .login-shell.v2 {
        grid-template-columns: 1fr;
    }
    .login-metric-row,
    .form-grid-2,
    .form-grid-3,
    .form-grid-4 {
        grid-template-columns: 1fr;
    }
    .form-actions-right {
        flex-direction: column;
    }
    .form-actions-right button {
        width: 100%;
    }
}


/* Área médica profissional */
.medico-sidebar-note {
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    color: #075985;
    border-radius: 14px;
    padding: 14px;
    margin: 18px 6px 0;
    font-size: 12px;
    line-height: 1.45;
}

.medico-dashboard-hero {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 18px;
    align-items: stretch;
    margin-bottom: 18px;
}

.medico-hero-card {
    background:
        linear-gradient(135deg, rgba(255,79,31,.10), rgba(0,127,152,.08)),
        #ffffff;
    border: 1px solid var(--line);
    border-radius: 22px;
    padding: 28px;
    box-shadow: var(--shadow2);
}

.medico-hero-card h1 {
    margin: 8px 0 10px;
    font-size: 34px;
}

.medico-hero-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.55;
}

.medico-today-card {
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 22px;
    padding: 24px;
    box-shadow: var(--shadow2);
}

.medico-today-card h3 {
    margin: 0 0 12px;
}

.medico-today-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    background: #f8fafc;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 18px;
}

.medico-today-main strong {
    font-size: 36px;
    color: var(--orange);
}

.medico-flow-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 18px;
}

.medico-flow-card {
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 20px;
    box-shadow: var(--shadow2);
}

.medico-flow-card .step {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    background: #fff1e8;
    color: var(--orange);
    font-weight: 900;
    border-radius: 10px;
    margin-bottom: 12px;
}

.medico-flow-card h3 {
    margin: 0 0 8px;
}

.medico-flow-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.45;
}

.medico-consulta-layout {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 18px;
    align-items: start;
}

.medico-patient-panel {
    position: sticky;
    top: 92px;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: var(--shadow2);
    padding: 20px;
}

.medico-patient-panel h3 {
    margin: 0 0 14px;
}

.patient-mini-list {
    display: grid;
    gap: 10px;
}

.patient-mini-item {
    background: #f8fafc;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 10px 12px;
}

.patient-mini-item span {
    display: block;
    color: var(--muted);
    font-size: 12px;
    margin-bottom: 3px;
}

.patient-mini-item strong {
    display: block;
}

.medico-empty-state {
    text-align: center;
    padding: 44px 24px;
    color: var(--muted);
}

.medico-empty-state .empty-icon {
    width: 64px;
    height: 64px;
    border-radius: 18px;
    background: #f8fafc;
    border: 1px solid var(--line);
    display: grid;
    place-items: center;
    margin: 0 auto 14px;
    font-size: 28px;
}

.medico-empty-state h3 {
    margin: 0 0 8px;
    color: var(--text);
}

.medico-consulta-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.medico-consulta-table th,
.medico-consulta-table td {
    padding: 14px 12px;
}

.medico-consulta-table td:nth-child(4) {
    font-weight: 800;
}

.medico-filter-bar {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: center;
    flex-wrap: wrap;
}

.medico-filter-bar .filter-buttons {
    margin: 0;
}

.medico-selected-consulta {
    border-color: rgba(0,127,152,.30);
    box-shadow: 0 16px 40px rgba(0,127,152,.10);
}

.medico-add-consumivel-card {
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 20px;
    box-shadow: var(--shadow2);
}

.medico-add-consumivel-card h3 {
    margin: 0 0 6px;
}

.medico-add-consumivel-card p {
    margin: 0 0 16px;
    color: var(--muted);
}

@media(max-width:1100px){
    .medico-dashboard-hero,
    .medico-consulta-layout {
        grid-template-columns: 1fr;
    }

    .medico-patient-panel {
        position: static;
    }

    .medico-flow-grid {
        grid-template-columns: 1fr;
    }
}


/* LOGIN PREMIUM COFIHST - SEM IMAGEM HUMANA */
.login-premium-body {
    min-height: 100vh;
    margin: 0;
    overflow-x: hidden;
    background:
        radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.34), transparent 18%),
        radial-gradient(circle at 72% 78%, rgba(255, 79, 31, 0.18), transparent 28%),
        linear-gradient(135deg, #fff7ed 0%, #f8fafc 44%, #ffffff 100%);
}

.login-premium-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(430px, 0.85fr);
    align-items: stretch;
}

.login-premium-hero {
    position: relative;
    min-height: 100vh;
    padding: 70px 76px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    color: #1d2939;
    overflow: hidden;
    background:
        linear-gradient(120deg, rgba(255, 255, 255, 0.78) 0%, rgba(255, 255, 255, 0.40) 42%, rgba(255, 79, 31, 0.18) 100%),
        radial-gradient(circle at 15% 85%, rgba(255, 79, 31, 0.75), transparent 34%),
        radial-gradient(circle at 72% 26%, rgba(255, 172, 108, 0.56), transparent 28%),
        linear-gradient(135deg, #fff2e5 0%, #ffd3b3 45%, #fffaf5 100%);
}

.login-premium-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(255, 79, 31, 0.06) 1px, transparent 1px),
        linear-gradient(180deg, rgba(255, 79, 31, 0.05) 1px, transparent 1px);
    background-size: 46px 46px;
    opacity: 0.72;
    pointer-events: none;
}

.login-premium-hero::after {
    content: "";
    position: absolute;
    width: 520px;
    height: 520px;
    right: -130px;
    top: 80px;
    border-radius: 50%;
    border: 1px solid rgba(255, 79, 31, 0.28);
    box-shadow:
        0 0 0 54px rgba(255, 79, 31, 0.045),
        0 0 0 112px rgba(255, 79, 31, 0.035),
        0 0 0 176px rgba(255, 255, 255, 0.32);
    pointer-events: none;
}

.cofihst-logo-block {
    position: relative;
    z-index: 1;
    display: flex;
    gap: 18px;
    align-items: center;
}

.cofihst-dot-logo {
    width: 86px;
    height: 86px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.54);
    border: 1px solid rgba(255, 255, 255, 0.74);
    border-radius: 20px;
    box-shadow: 0 18px 40px rgba(255, 79, 31, 0.12);
}

.cofihst-dot-logo span {
    width: 13px;
    height: 13px;
    border-radius: 50%;
    background: #30363d;
}

.cofihst-dot-logo span:nth-child(1),
.cofihst-dot-logo span:nth-child(4),
.cofihst-dot-logo span:nth-child(7),
.cofihst-dot-logo span:nth-child(8) {
    background: var(--orange);
}

.cofihst-word {
    color: var(--orange);
    font-size: 52px;
    line-height: 0.9;
    font-weight: 950;
    letter-spacing: -2px;
}

.cofihst-subtitle {
    margin-top: 8px;
    color: #344054;
    font-size: 16px;
    line-height: 1.25;
    font-weight: 650;
}

.login-premium-copy {
    position: relative;
    z-index: 1;
    max-width: 620px;
}

.login-premium-kicker {
    display: inline-block;
    color: var(--orange);
    font-weight: 950;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 14px;
}

.login-premium-copy h1 {
    margin: 0;
    font-size: clamp(46px, 5.2vw, 78px);
    line-height: 0.98;
    letter-spacing: -2.4px;
    color: #1d2939;
}

.login-premium-copy h1 strong {
    display: block;
    color: var(--orange);
}

.login-premium-copy p {
    margin: 28px 0 0;
    max-width: 520px;
    color: #475467;
    font-size: 20px;
    line-height: 1.55;
}

.login-premium-services {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    max-width: 780px;
    border-top: 1px solid rgba(255, 255, 255, 0.68);
    border-bottom: 1px solid rgba(255, 255, 255, 0.42);
    background: rgba(255, 79, 31, 0.14);
    backdrop-filter: blur(8px);
    border-radius: 22px;
    overflow: hidden;
}

.login-premium-services article {
    min-height: 132px;
    padding: 22px 18px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 12px;
    color: #ffffff;
    background: linear-gradient(180deg, rgba(255, 79, 31, 0.44), rgba(176, 47, 13, 0.52));
    border-right: 1px solid rgba(255, 255, 255, 0.36);
    text-shadow: 0 1px 18px rgba(0, 0, 0, 0.16);
}

.login-premium-services article:last-child {
    border-right: 0;
}

.service-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    border: 2px solid rgba(255, 255, 255, 0.86);
    font-size: 24px;
    font-weight: 900;
}

.login-premium-services strong {
    font-size: 14px;
    line-height: 1.25;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.login-premium-panel {
    align-self: center;
    justify-self: center;
    width: min(520px, calc(100% - 56px));
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(228, 231, 236, 0.96);
    border-radius: 28px;
    padding: 44px;
    box-shadow: 0 30px 90px rgba(16, 24, 40, 0.16);
    backdrop-filter: blur(18px);
}

.login-panel-header span {
    display: inline-flex;
    padding: 7px 11px;
    border-radius: 999px;
    background: #fff1e8;
    color: var(--orange);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.login-panel-header h2 {
    margin: 18px 0 8px;
    color: #101828;
    font-size: 38px;
    line-height: 1.05;
    letter-spacing: -1px;
}

.login-panel-header p {
    margin: 0 0 30px;
    color: #667085;
    line-height: 1.5;
}

.premium-login-form,
.premium-medico-form {
    display: grid;
    gap: 18px;
}

.input-group-premium label {
    font-size: 14px;
    color: #1d2939;
    font-weight: 850;
}

.input-with-icon {
    display: flex;
    align-items: center;
    gap: 10px;
    height: 54px;
    border: 1px solid #d0d5dd;
    border-radius: 12px;
    padding: 0 14px;
    background: #ffffff;
    transition: 0.16s ease;
}

.input-with-icon:focus-within {
    border-color: var(--orange);
    box-shadow: 0 0 0 4px rgba(255, 79, 31, 0.12);
}

.input-with-icon span {
    width: 24px;
    text-align: center;
    color: #98a2b3;
}

.input-with-icon input {
    border: 0;
    box-shadow: none;
    padding: 0;
    height: 100%;
    background: transparent;
    flex: 1;
}

.input-with-icon input:focus {
    box-shadow: none;
}

.premium-login-button {
    height: 56px;
    border-radius: 12px;
    margin-top: 6px;
    font-size: 16px;
    background: linear-gradient(135deg, #ff5a24, #ed3300);
    box-shadow: 0 18px 34px rgba(255, 79, 31, 0.26);
}

.login-divider-premium {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 28px 0;
    color: #98a2b3;
    font-weight: 700;
}

.login-divider-premium::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    height: 1px;
    background: #eaecf0;
}

.login-divider-premium span {
    position: relative;
    z-index: 1;
    background: rgba(255, 255, 255, 0.96);
    padding: 0 16px;
}

.medico-form-title {
    display: grid;
    gap: 4px;
}

.medico-form-title strong {
    font-size: 18px;
    color: #101828;
}

.medico-form-title small {
    color: #667085;
}

.premium-medico-button {
    height: 52px;
    border-radius: 12px;
    background: #ffffff;
    color: var(--orange);
    border: 1px solid rgba(255, 79, 31, 0.52);
}

.premium-medico-button:hover {
    background: #fff7ed;
    color: var(--orange);
}

.login-security-note {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #eaecf0;
    color: #667085;
    font-size: 13px;
    text-align: center;
    font-weight: 700;
}

@media (max-width: 1120px) {
    .login-premium-shell {
        grid-template-columns: 1fr;
    }

    .login-premium-hero {
        min-height: auto;
        padding: 42px 32px;
        gap: 44px;
    }

    .login-premium-panel {
        width: min(620px, calc(100% - 40px));
        margin: 34px auto;
    }
}

@media (max-width: 720px) {
    .cofihst-word {
        font-size: 42px;
    }

    .login-premium-copy h1 {
        font-size: 44px;
    }

    .login-premium-services {
        grid-template-columns: repeat(2, 1fr);
    }

    .login-premium-panel {
        padding: 28px;
        border-radius: 22px;
    }

    .login-panel-header h2 {
        font-size: 32px;
    }
}


/* INVENTÁRIO - TABELAS MAIS USÁVEIS E AÇÕES FIXAS */
.inventory-table-help {
    margin: 18px 0 8px;
    padding: 12px 14px;
    border: 1px solid #fed7aa;
    background: #fff7ed;
    color: #9a3412;
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.45;
}

.inventory-table-wrapper {
    position: relative;
    overflow-x: auto;
    overflow-y: visible;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #ffffff;
    max-width: 100%;
}

.inventory-table-wrapper::-webkit-scrollbar {
    height: 12px;
}

.inventory-table-wrapper::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 999px;
}

.inventory-table-wrapper::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 999px;
    border: 3px solid #f1f5f9;
}

.inventory-table-wrapper::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.inventory-table {
    min-width: 1180px;
    table-layout: fixed;
    border-radius: 0;
}

.inventory-table th,
.inventory-table td {
    white-space: nowrap;
}

.inventory-table th:nth-child(1),
.inventory-table td:nth-child(1) {
    width: 95px;
}

.inventory-table th:nth-child(2),
.inventory-table td:nth-child(2) {
    width: 260px;
    white-space: normal;
}

.inventory-table th:nth-child(3),
.inventory-table td:nth-child(3) {
    width: 110px;
}

.inventory-table th:nth-child(4),
.inventory-table td:nth-child(4) {
    width: 140px;
}

.inventory-table th:nth-child(5),
.inventory-table td:nth-child(5),
.inventory-table th:nth-child(6),
.inventory-table td:nth-child(6) {
    width: 110px;
    text-align: center;
}

.inventory-table th:nth-child(7),
.inventory-table td:nth-child(7) {
    width: 160px;
}

.inventory-table th:nth-child(8),
.inventory-table td:nth-child(8) {
    width: 120px;
}

.inventory-table th:nth-child(9),
.inventory-table td:nth-child(9) {
    width: 100px;
    text-align: right;
}

.inventory-actions-head,
.inventory-actions-cell {
    position: sticky;
    right: 0;
    z-index: 3;
    width: 170px !important;
    min-width: 170px !important;
    background: #ffffff;
    box-shadow: -10px 0 18px rgba(15, 23, 42, 0.06);
}

.inventory-actions-head {
    z-index: 5;
    background: #f7f8fb !important;
    text-align: center !important;
}

.inventory-actions-cell {
    text-align: center !important;
}

.inventory-table tr:hover .inventory-actions-cell {
    background: #fcfcfd;
}

.inventory-actions {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: nowrap;
}

.inventory-actions .small-btn {
    margin: 0;
    min-width: 66px;
    padding: 8px 10px;
    font-size: 12px;
}

.stock-category-card {
    overflow: visible;
}

.stock-category-card .stock-category-header {
    position: sticky;
    left: 0;
}

@media (max-width: 900px) {
    .inventory-table {
        min-width: 1080px;
    }

    .inventory-actions-head,
    .inventory-actions-cell {
        width: 150px !important;
        min-width: 150px !important;
    }

    .inventory-actions .small-btn {
        min-width: 58px;
        padding: 7px 8px;
    }
}


/* EMAILS DE REPOSIÇÃO EDITÁVEIS */
.email-mode-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    margin-top: 16px;
}

.email-mode-grid article {
    background: #f8fafc;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 16px;
}

.email-mode-grid strong {
    display: block;
    margin-bottom: 5px;
    color: var(--text);
}

.email-mode-grid span {
    color: var(--muted);
    line-height: 1.45;
}

.email-edit-card {
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 22px;
    margin-top: 18px;
    box-shadow: var(--shadow2);
}

.email-edit-form {
    display: grid;
    gap: 16px;
}

.email-request-table {
    min-width: 980px;
}

.email-request-table td,
.email-request-table th {
    vertical-align: middle;
}

.email-small-input {
    width: 92px;
    min-width: 92px;
    padding: 8px 9px;
    text-align: center;
    font-weight: 800;
}

.email-body-textarea {
    min-height: 290px;
    line-height: 1.45;
    font-family: Consolas, "Courier New", monospace;
    font-size: 13px;
}

.email-actions-row {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.email-send-button {
    width: auto;
    min-width: 210px;
}

@media (max-width: 900px) {
    .email-mode-grid {
        grid-template-columns: 1fr;
    }

    .email-actions-row {
        flex-direction: column;
        align-items: stretch;
    }

    .email-actions-row .small-btn,
    .email-send-button {
        width: 100%;
        text-align: center;
    }
}


/* MELHORIAS GERAIS PRO - INVENTÁRIO, MOVIMENTOS E DASHBOARD */
.clean-inventory-layout {
    display: grid;
    grid-template-columns: 370px 1fr;
    gap: 18px;
    align-items: start;
}

.inventory-side-panel {
    position: sticky;
    top: 92px;
    display: grid;
    gap: 16px;
}

.inventory-summary-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.inventory-summary-grid article {
    background: #f8fafc;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 14px;
}

.inventory-summary-grid strong {
    display: block;
    font-size: 24px;
    color: var(--orange);
}

.inventory-summary-grid span {
    color: var(--muted);
    font-size: 12px;
}

.inventory-filters {
    display: grid;
    gap: 12px;
}

.inventory-filter-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.inventory-main-actions {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 18px;
}

.inventory-table-clean {
    min-width: 1040px;
}

.inventory-table-clean th,
.inventory-table-clean td {
    padding: 10px 11px;
}

.inventory-table-clean th:nth-child(2),
.inventory-table-clean td:nth-child(2) {
    width: 310px;
    white-space: normal;
}

.inventory-table-clean .inventory-actions-head,
.inventory-table-clean .inventory-actions-cell {
    width: 145px !important;
    min-width: 145px !important;
}

.product-status-pill {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 900;
}

.product-status-pill.ok {
    background: #ecfdf3;
    color: #027a48;
}

.product-status-pill.low {
    background: #fef3f2;
    color: #b42318;
}

.product-status-pill.expiry {
    background: #fffaeb;
    color: #b54708;
}

.movements-toolbar {
    display: grid;
    grid-template-columns: 1fr 220px auto;
    gap: 12px;
    align-items: end;
}

.movements-kpi-grid,
.dashboard-alert-grid {
    display: grid;
    gap: 14px;
}

.movements-kpi-grid {
    grid-template-columns: repeat(4, 1fr);
    margin-bottom: 18px;
}

.dashboard-alert-grid {
    grid-template-columns: 1fr 1fr;
    margin-top: 18px;
}

.movements-kpi-grid article {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 16px;
    box-shadow: var(--shadow2);
}

.movements-kpi-grid strong {
    display: block;
    font-size: 24px;
    color: var(--orange);
}

.movements-kpi-grid span {
    color: var(--muted);
    font-size: 12px;
}

.dashboard-list {
    display: grid;
    gap: 10px;
}

.dashboard-list-item {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #f8fafc;
}

.dashboard-list-item strong {
    display: block;
}

.dashboard-list-item span {
    color: var(--muted);
    font-size: 12px;
}

@media (max-width: 1250px) {
    .clean-inventory-layout {
        grid-template-columns: 1fr;
    }

    .inventory-side-panel {
        position: static;
    }

    .inventory-main-actions,
    .dashboard-alert-grid,
    .movements-kpi-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 760px) {
    .inventory-main-actions,
    .dashboard-alert-grid,
    .movements-kpi-grid,
    .movements-toolbar {
        grid-template-columns: 1fr;
    }
}


/* GESTÃO DE UTILIZADORES */
.inline-password-form {
    display: flex;
    gap: 8px;
    align-items: center;
}

.inline-password-form input {
    min-width: 150px;
    height: 36px;
    padding: 7px 9px;
    font-size: 12px;
}

.inline-password-form button {
    width: auto;
    min-width: 80px;
    height: 36px;
    padding: 7px 10px;
    font-size: 12px;
}


/* UTILIZADORES, CARGOS E GESTOR DE EQUIPA */
.inline-password-form {
    display: flex;
    gap: 8px;
    align-items: center;
}

.inline-password-form input {
    min-width: 150px;
    height: 36px;
    padding: 7px 9px;
    font-size: 12px;
}

.inline-password-form button {
    width: auto;
    min-width: 80px;
    height: 36px;
    padding: 7px 10px;
    font-size: 12px;
}

.form-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.form-grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}

@media(max-width:900px){
    .form-grid-3,
    .form-grid-4 {
        grid-template-columns: 1fr;
    }
}

/* =========================================================
   COFIHST - TEMPLATE HORIZONTAL CLEAN (v3)
   Apenas visual/UX: não altera rotas, dados ou lógica.
   ========================================================= */
:root{
  --brand:#0b73ce;
  --brand-2:#095da8;
  --brand-soft:#eef7ff;
  --bg:#f7f9fc;
  --surface:#ffffff;
  --surface-2:#f2f6fb;
  --text:#172033;
  --muted:#667085;
  --border:#d9e2ec;
  --border-strong:#b7c8dc;
  --success:#078a4f;
  --danger:#c62828;
  --warning:#d97706;
  --shadow:none;
  --shadow2:none;
  --radius:10px;
}
*{box-sizing:border-box}
html,body{min-height:100%}
body{
  background:var(--bg)!important;
  color:var(--text)!important;
  font-family:Arial, "Segoe UI", sans-serif!important;
  font-size:14px;
}
a{color:inherit;text-decoration:none}
input,select,textarea{
  border:1px solid var(--border-strong)!important;
  border-radius:8px!important;
  padding:10px 12px!important;
  background:#fff!important;
  color:var(--text)!important;
  font-size:14px!important;
}
input:focus,select:focus,textarea:focus{
  border-color:var(--brand)!important;
  box-shadow:0 0 0 3px rgba(11,115,206,.12)!important;
}
button,.btn-primary,.btn-teal{
  background:var(--brand)!important;
  color:#fff!important;
  border:1px solid var(--brand)!important;
  border-radius:8px!important;
  padding:10px 14px!important;
  font-weight:700!important;
  cursor:pointer!important;
}
button:hover,.btn-primary:hover,.btn-teal:hover{background:var(--brand-2)!important}

/* Layout: sai o sidebar pesado, entra barra horizontal */
.app-layout{
  display:block!important;
  min-height:100vh!important;
  background:var(--bg)!important;
}
.sidebar{
  position:sticky!important;
  top:0!important;
  z-index:50!important;
  width:100%!important;
  height:auto!important;
  min-height:0!important;
  background:#fff!important;
  color:var(--text)!important;
  border-right:0!important;
  border-bottom:1px solid var(--border)!important;
  padding:0!important;
  box-shadow:0 1px 6px rgba(16,24,40,.08)!important;
  display:grid!important;
  grid-template-columns:auto 1fr auto!important;
  align-items:center!important;
}
.sidebar-brand{
  display:flex!important;
  align-items:center!important;
  gap:10px!important;
  padding:10px 18px!important;
  min-width:225px!important;
  border-right:1px solid var(--border)!important;
}
.sidebar-logo{
  width:38px!important;
  height:38px!important;
  border-radius:9px!important;
  background:var(--brand)!important;
  color:#fff!important;
  display:grid!important;
  place-items:center!important;
  font-weight:800!important;
  font-size:18px!important;
}
.sidebar-brand strong{
  display:block!important;
  color:#102a43!important;
  text-transform:uppercase!important;
  letter-spacing:.02em!important;
  font-size:16px!important;
}
.sidebar-brand span{
  display:block!important;
  color:var(--muted)!important;
  font-size:12px!important;
  margin-top:1px!important;
}
.sidebar-nav{
  display:flex!important;
  align-items:center!important;
  gap:2px!important;
  overflow-x:auto!important;
  padding:8px 12px!important;
  margin:0!important;
}
.sidebar-nav a{
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:6px!important;
  white-space:nowrap!important;
  padding:10px 12px!important;
  border-radius:8px!important;
  color:#213547!important;
  background:transparent!important;
  border:1px solid transparent!important;
  font-weight:700!important;
  font-size:13px!important;
}
.sidebar-nav a:hover{
  color:var(--brand)!important;
  background:var(--brand-soft)!important;
  border-color:#cfe7ff!important;
}
.sidebar-footer{
  display:block!important;
  padding:0 18px!important;
  color:var(--muted)!important;
  font-size:12px!important;
  border-left:1px solid var(--border)!important;
  line-height:1.25!important;
  white-space:nowrap!important;
}
.main-shell{display:block!important;min-height:auto!important;background:var(--bg)!important}
.topbar{
  height:auto!important;
  min-height:64px!important;
  background:#fff!important;
  border-bottom:1px solid var(--border)!important;
  padding:12px 24px!important;
  display:flex!important;
  justify-content:space-between!important;
  align-items:center!important;
  box-shadow:none!important;
}
.topbar-title strong{font-size:20px!important;color:#102a43!important}
.topbar-title span{display:block!important;color:var(--muted)!important;font-size:13px!important;margin-top:3px!important}
.topbar-actions{display:flex!important;align-items:center!important;gap:10px!important}
.notification-dot{
  background:#fff7ed!important;
  border:1px solid #fed7aa!important;
  border-radius:9px!important;
  padding:8px 10px!important;
  color:#9a3412!important;
  position:relative!important;
}
.notification-dot b{
  background:#ef4444!important;
  color:#fff!important;
  border-radius:999px!important;
  padding:2px 6px!important;
  font-size:11px!important;
  margin-left:4px!important;
}
.user-chip{
  border:1px solid var(--border)!important;
  background:#fff!important;
  border-radius:10px!important;
  padding:7px 10px!important;
  display:flex!important;
  align-items:center!important;
  gap:8px!important;
}
.avatar{background:var(--brand)!important;color:#fff!important;border-radius:8px!important;width:32px!important;height:32px!important;display:grid!important;place-items:center!important;font-weight:800!important}
.user-chip strong{font-size:13px!important;color:#102a43!important}
.user-chip span{font-size:11px!important;color:var(--muted)!important}
.logout-link{
  background:#ef4444!important;
  color:#fff!important;
  border-radius:8px!important;
  padding:9px 12px!important;
  font-weight:800!important;
}
.content{
  padding:22px 28px 40px!important;
  max-width:1440px!important;
  margin:0 auto!important;
}

/* Cabeçalhos mais simples */
.page-head{
  background:#fff!important;
  border:1px solid var(--border)!important;
  border-left:5px solid var(--brand)!important;
  border-radius:10px!important;
  padding:20px 22px!important;
  margin-bottom:18px!important;
  box-shadow:none!important;
  display:flex!important;
  justify-content:space-between!important;
  gap:18px!important;
  align-items:center!important;
}
.page-head h1{font-size:25px!important;margin:4px 0 5px!important;color:#102a43!important}
.page-head p{margin:0!important;color:var(--muted)!important;font-size:14px!important}
.page-kicker{color:var(--brand)!important;text-transform:uppercase!important;font-weight:900!important;font-size:12px!important;letter-spacing:.05em!important}

/* Cartões e dashboards sem estética pesada */
.kpi-grid{
  display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:14px!important;
  margin-bottom:18px!important;
}
.kpi-card{
  background:#fff!important;
  border:1px solid var(--border)!important;
  border-top:4px solid var(--brand)!important;
  border-radius:10px!important;
  padding:16px!important;
  box-shadow:none!important;
}
.kpi-card span{display:block!important;color:#475467!important;font-weight:800!important;font-size:13px!important;margin-bottom:8px!important}
.kpi-card strong{display:block!important;color:var(--brand)!important;font-size:30px!important;line-height:1!important;margin-bottom:8px!important}
.kpi-card small{display:block!important;color:var(--muted)!important;font-size:12px!important;font-weight:700!important}
.module-grid,.quick-actions,.dashboard-alert-grid,.dashboard-chart-grid{
  display:grid!important;
  gap:14px!important;
}
.module-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important;margin-bottom:20px!important}
.module-card,.quick-card,.form-card,.table-card,.stock-category-card,.edit-product-panel{
  background:#fff!important;
  border:1px solid var(--border)!important;
  border-radius:10px!important;
  box-shadow:none!important;
  padding:18px!important;
}
.module-card:hover,.quick-card:hover{
  border-color:var(--brand)!important;
  background:var(--brand-soft)!important;
}
.module-card .icon,.quick-card .icon,.empty-icon{
  width:34px!important;
  height:34px!important;
  border-radius:8px!important;
  background:var(--brand-soft)!important;
  border:1px solid #cfe7ff!important;
  color:var(--brand)!important;
  display:grid!important;
  place-items:center!important;
  font-size:18px!important;
  margin-bottom:10px!important;
}
.module-card h3,.form-card h3,.table-card h3{margin:0 0 8px!important;color:#102a43!important;font-size:18px!important}
.module-card p,.form-card p,.table-card p{margin:0!important;color:var(--muted)!important}

/* Formulários mais claros */
.form-card,.table-card{margin-bottom:18px!important}
.section-title-row,.panel-title,.stock-category-header,.email-card-header{
  display:flex!important;
  justify-content:space-between!important;
  align-items:center!important;
  gap:14px!important;
  margin-bottom:14px!important;
}
label{font-weight:800!important;color:#344054!important;font-size:13px!important;margin-bottom:6px!important}
.form-info,.alert,.flash,.consulta-observacoes{
  border-radius:8px!important;
  padding:12px 14px!important;
  border:1px solid #fed7aa!important;
  background:#fff7ed!important;
  color:#9a3412!important;
}

/* Tabelas */
.table-wrapper{overflow-x:auto!important;border:1px solid var(--border)!important;border-radius:10px!important;background:#fff!important}
.data-table{width:100%!important;border-collapse:collapse!important;background:#fff!important;border-radius:0!important;overflow:hidden!important}
.data-table th{
  background:#eef6ff!important;
  color:#0b3b66!important;
  font-weight:900!important;
  border-bottom:1px solid var(--border-strong)!important;
  padding:12px!important;
  white-space:nowrap!important;
}
.data-table td{
  border-bottom:1px solid var(--border)!important;
  border-right:0!important;
  padding:11px 12px!important;
  color:#243b53!important;
}
.data-table tr:hover td{background:#f8fbff!important}
.data-empty{text-align:center!important;color:var(--muted)!important;padding:24px!important}

/* Stock e ações */
.stock-tabs{display:flex!important;flex-wrap:wrap!important;gap:8px!important;margin:16px 0!important}
.stock-tab{
  background:#fff!important;
  border:1px solid var(--border-strong)!important;
  border-radius:8px!important;
  color:#213547!important;
  padding:9px 12px!important;
  font-weight:800!important;
}
.stock-tab.active,.stock-tab:hover{background:var(--brand)!important;color:#fff!important;border-color:var(--brand)!important}
.stock-actions-panel{grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:12px!important}
.stock-action-button{
  background:#fff!important;
  border:1px solid var(--border)!important;
  border-radius:10px!important;
  padding:15px!important;
  box-shadow:none!important;
}
.stock-action-button:hover{background:var(--brand-soft)!important;border-color:var(--brand)!important;transform:none!important}
.small-btn{border-radius:7px!important;padding:7px 9px!important;font-weight:800!important}
.small-btn.success{background:#ecfdf3!important;color:#067647!important;border:1px solid #abefc6!important}
.small-btn.danger{background:#fef3f2!important;color:#b42318!important;border:1px solid #fecdca!important}
.small-btn.neutral{background:#f2f4f7!important;color:#344054!important;border:1px solid var(--border)!important}
.status{border-radius:999px!important;padding:5px 9px!important;font-size:11px!important;font-weight:900!important}
.status.active,.status.success{background:#ecfdf3!important;color:#067647!important}
.status.inactive{background:#fef3f2!important;color:#b42318!important}

/* Login mais neutro */
.login-body{background:linear-gradient(135deg,#f7f9fc,#eaf2fb)!important}
.login-hero,.login-panel{
  border-radius:14px!important;
  box-shadow:none!important;
  border:1px solid var(--border)!important;
}
.login-badge,.role-option:hover,.role-option.active{border-color:var(--brand)!important;color:var(--brand)!important}
.login-submit{background:var(--brand)!important;border-color:var(--brand)!important}

/* Responsivo */
@media(max-width:1100px){
  .sidebar{grid-template-columns:1fr!important}
  .sidebar-brand{border-right:0!important;border-bottom:1px solid var(--border)!important}
  .sidebar-footer{display:none!important}
  .sidebar-nav{justify-content:flex-start!important}
  .kpi-grid,.module-grid,.stock-actions-panel{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}
@media(max-width:760px){
  .content{padding:16px!important}
  .topbar{align-items:flex-start!important;flex-direction:column!important}
  .topbar-actions{width:100%!important;justify-content:space-between!important;flex-wrap:wrap!important}
  .kpi-grid,.module-grid,.stock-actions-panel,.user-form,.empresa-form,.utente-form,.marcacao-form,.fornecedor-form,.consumivel-form,.perfil-form,.fornecedor-page-form,.stock-edit-form,.excel-import-form,.search-form{grid-template-columns:1fr!important}
}


/* Dashboard simples e user friendly */
.clean-topbar{height:70px;background:#fff;border-bottom:1px solid #e5eaf3;display:flex;align-items:center;gap:22px;padding:0 24px;position:sticky;top:0;z-index:50;box-shadow:0 2px 14px rgba(15,23,42,.05)}
.brand-area{display:flex;align-items:center;gap:10px;min-width:220px}.brand-logo{width:38px;height:38px;border-radius:10px;background:#0b74d1;color:#fff;display:grid;place-items:center;font-weight:900}.brand-area strong{display:block;color:#0f172a}.brand-area span{display:block;font-size:12px;color:#64748b}.clean-nav{display:flex;gap:6px;align-items:center;flex:1;overflow:auto}.clean-nav a{padding:10px 12px;border-radius:10px;text-decoration:none;color:#1e293b;font-weight:800;font-size:14px;white-space:nowrap}.clean-nav a:hover,.clean-nav a.active{background:#eaf4ff;color:#075aa7}.clean-user{display:flex;align-items:center;gap:10px;white-space:nowrap}.clean-user span{font-size:13px;color:#475569;font-weight:700}.clean-user a{background:#ef4444;color:#fff;text-decoration:none;padding:9px 14px;border-radius:10px;font-weight:900}.simple-dashboard{max-width:1180px;margin:0 auto;padding:34px 24px 70px}.welcome-panel{background:linear-gradient(135deg,#ffffff,#eef7ff);border:1px solid #dbeafe;border-radius:22px;padding:30px;display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:24px}.section-label{text-transform:uppercase;color:#0b74d1;font-weight:900;font-size:12px;letter-spacing:.12em}.welcome-panel h1{font-size:34px;line-height:1.1;margin:8px 0;color:#0f172a}.welcome-panel p{color:#64748b;margin:0;font-size:16px}.today-box{background:#fff;border:1px solid #dbeafe;border-radius:18px;padding:18px 22px;min-width:210px;box-shadow:0 12px 26px rgba(15,23,42,.07)}.today-box strong{display:block;color:#0f172a;font-size:20px}.today-box span{color:#64748b;font-size:14px}.main-actions-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.big-action{background:#fff;border:1px solid #e2e8f0;border-radius:20px;padding:24px;display:flex;gap:18px;align-items:center;text-decoration:none;color:#0f172a;box-shadow:0 10px 24px rgba(15,23,42,.06);transition:.18s}.big-action:hover{transform:translateY(-2px);border-color:#93c5fd;box-shadow:0 16px 34px rgba(15,23,42,.1)}.big-icon{width:62px;height:62px;border-radius:18px;display:grid;place-items:center;font-size:30px;background:#eff6ff}.big-action h2{margin:0 0 6px;font-size:23px}.big-action p{margin:0;color:#64748b;font-size:15px}.big-action.agenda .big-icon{background:#dbeafe}.big-action.stock .big-icon{background:#dcfce7}.big-action.utentes .big-icon{background:#fef3c7}.big-action.reports .big-icon{background:#f3e8ff}.quick-strip{margin-top:22px;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}.quick-strip a{background:#f8fafc;border:1px solid #e2e8f0;border-radius:16px;text-decoration:none;padding:16px;color:#0f172a}.quick-strip strong{display:block;margin-bottom:4px}.quick-strip span{font-size:13px;color:#64748b}@media(max-width:900px){.clean-topbar{height:auto;align-items:flex-start;flex-direction:column;padding:14px}.clean-user{width:100%;justify-content:space-between}.welcome-panel{flex-direction:column;align-items:flex-start}.main-actions-grid,.quick-strip{grid-template-columns:1fr}}

/* Dashboard friendly user - versão simples */
.home-clean-body{background:#f4f7fb;color:#0f172a;}
.friendly-dashboard{max-width:1180px;margin:0 auto;padding:34px 24px 50px;}
.friendly-hero{display:flex;align-items:center;justify-content:space-between;gap:22px;background:linear-gradient(135deg,#ffffff 0%,#eef7ff 100%);border:1px solid #dbe7f3;border-radius:24px;padding:30px 34px;box-shadow:0 14px 34px rgba(15,23,42,.07);}
.friendly-hero h1{font-size:30px;line-height:1.2;margin:8px 0 8px;color:#102033;letter-spacing:-.03em;}
.friendly-hero p{margin:0;color:#5f6f84;font-size:16px;}
.primary-cta{display:inline-flex;align-items:center;justify-content:center;min-width:180px;height:54px;border-radius:16px;background:#0b74de;color:#fff;text-decoration:none;font-weight:800;box-shadow:0 12px 24px rgba(11,116,222,.25);}
.primary-cta:hover{filter:brightness(.96);transform:translateY(-1px);}
.day-summary-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;margin-top:20px;}
.day-summary-grid article{display:flex;align-items:center;gap:14px;background:#fff;border:1px solid #dce7f4;border-radius:18px;padding:18px 20px;box-shadow:0 8px 22px rgba(15,23,42,.05);}
.day-summary-grid span{width:44px;height:44px;display:flex;align-items:center;justify-content:center;background:#eaf4ff;border-radius:14px;font-size:22px;}
.day-summary-grid strong{display:block;font-size:18px;color:#102033;margin-bottom:2px;}
.day-summary-grid small{display:block;color:#607085;font-size:13px;}
.quick-actions-panel{background:#fff;border:1px solid #dce7f4;border-radius:22px;padding:24px;margin-top:20px;box-shadow:0 10px 26px rgba(15,23,42,.05);}
.quick-actions-panel h2,.friendly-card h2{margin:0 0 16px;color:#102033;font-size:20px;}
.quick-actions-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;}
.quick-actions-grid a{display:flex;flex-direction:column;gap:6px;min-height:92px;padding:18px;border-radius:16px;border:1px solid #d8e4f0;background:#f8fbff;color:#102033;text-decoration:none;transition:.16s ease;}
.quick-actions-grid a:hover{background:#eaf4ff;border-color:#9fc6ee;transform:translateY(-2px);}
.quick-actions-grid b{font-size:16px;}
.quick-actions-grid span{color:#607085;font-size:13px;line-height:1.4;}
.dashboard-two-columns{display:grid;grid-template-columns:1.4fr .9fr;gap:20px;margin-top:20px;}
.friendly-card{background:#fff;border:1px solid #dce7f4;border-radius:22px;padding:24px;box-shadow:0 10px 26px rgba(15,23,42,.05);}
.large-card{min-height:260px;}
.card-title-row{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:8px;}
.card-title-row a{color:#0b74de;text-decoration:none;font-weight:800;font-size:14px;}
.empty-friendly{height:185px;border:1px dashed #bdd0e5;border-radius:18px;background:#f8fbff;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:24px;color:#607085;}
.empty-friendly h3{margin:8px 0 6px;color:#102033;font-size:18px;}
.empty-friendly p{max-width:520px;margin:0;line-height:1.45;}
.empty-icon{font-size:34px;}
.friendly-alert-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:12px;}
.friendly-alert-list li{display:flex;gap:12px;align-items:flex-start;border:1px solid #e0e9f4;background:#f8fbff;border-radius:16px;padding:14px;}
.friendly-alert-list li>span{width:34px;height:34px;display:flex;align-items:center;justify-content:center;background:#fff;border-radius:10px;border:1px solid #d8e4f0;}
.friendly-alert-list strong{display:block;margin-bottom:2px;color:#102033;}
.friendly-alert-list small{display:block;color:#607085;line-height:1.35;}
@media(max-width:1000px){.day-summary-grid,.quick-actions-grid{grid-template-columns:repeat(2,1fr)}.dashboard-two-columns{grid-template-columns:1fr}.friendly-hero{flex-direction:column;align-items:flex-start}.primary-cta{width:100%;}}
@media(max-width:640px){.day-summary-grid,.quick-actions-grid{grid-template-columns:1fr}.friendly-dashboard{padding:20px 14px}.friendly-hero{padding:24px}.friendly-hero h1{font-size:24px}}

/* Inventário friendly user - versão profissional */
.inventory-content-pro{max-width:1480px;margin:0 auto;padding:24px 28px 60px;background:#f6f8fb;}
.inventory-hero-pro{display:flex;justify-content:space-between;gap:24px;align-items:center;background:linear-gradient(135deg,#ffffff 0%,#eef7ff 100%);border:1px solid #d8e4f0;border-radius:18px;padding:24px 28px;margin-bottom:18px;box-shadow:0 8px 24px rgba(15,38,75,.06)}
.inventory-label-pro{display:inline-block;color:#0967c7;font-weight:900;text-transform:uppercase;letter-spacing:.12em;font-size:12px;margin-bottom:8px}
.inventory-hero-pro h1{margin:0;color:#10233f;font-size:30px;line-height:1.1}.inventory-hero-pro p{margin:8px 0 0;color:#60708a;font-size:15px}.inventory-hero-actions-pro{display:flex;gap:10px;align-items:center;flex-wrap:wrap}.primary-action-pro,.secondary-action-pro,.tool-action-pro{border:0;text-decoration:none;display:inline-flex;align-items:center;justify-content:center;border-radius:12px;font-weight:800;cursor:pointer;white-space:nowrap}.primary-action-pro{background:#0b74d1;color:#fff;padding:13px 18px;box-shadow:0 8px 18px rgba(11,116,209,.25)}.primary-action-pro:hover{background:#075da9}.secondary-action-pro{background:#fff;color:#183352;border:1px solid #cbd7e5;padding:12px 16px}.secondary-action-pro:hover,.tool-action-pro:hover{border-color:#0b74d1;color:#0b74d1}.inventory-kpis-pro{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-bottom:18px}.inventory-kpis-pro article{background:#fff;border:1px solid #dbe5f0;border-radius:16px;padding:16px;display:flex;gap:12px;align-items:center}.inventory-kpis-pro span{width:44px;height:44px;border-radius:14px;background:#eef6ff;display:grid;place-items:center;font-size:22px}.inventory-kpis-pro strong{display:block;font-size:28px;color:#0b64bd;line-height:1}.inventory-kpis-pro small{display:block;color:#5d6d84;font-weight:700;margin-top:4px}.inventory-kpis-pro .kpi-danger span{background:#fff1f1}.inventory-kpis-pro .kpi-danger strong{color:#dc2626}.inventory-tools-pro{background:#fff;border:1px solid #dbe5f0;border-radius:16px;padding:14px;display:grid;grid-template-columns:1fr 210px 190px auto auto;gap:10px;align-items:center;margin-bottom:18px}.inventory-search-pro{height:46px;display:flex;gap:10px;align-items:center;border:1px solid #ccd9e8;border-radius:12px;padding:0 14px;background:#fff}.inventory-search-pro input{border:0;outline:0;width:100%;font-size:15px;color:#14243c}.inventory-tools-pro select{height:46px;border:1px solid #ccd9e8;border-radius:12px;padding:0 12px;background:#fff;font-weight:700;color:#14243c}.tool-action-pro{height:46px;background:#f8fafc;color:#163557;border:1px solid #ccd9e8;padding:0 14px}.inventory-table-card-pro{background:#fff;border:1px solid #dbe5f0;border-radius:18px;box-shadow:0 10px 28px rgba(15,38,75,.06);overflow:hidden}.inventory-table-header-pro{padding:18px 20px;border-bottom:1px solid #e7edf5;display:flex;justify-content:space-between;gap:16px;align-items:center}.inventory-table-header-pro h2{margin:0;color:#10233f;font-size:21px}.inventory-table-header-pro p{margin:4px 0 0;color:#60708a}.inventory-table-scroll-pro{overflow:auto}.inventory-master-table-pro{width:100%;border-collapse:separate;border-spacing:0;min-width:1150px}.inventory-master-table-pro th{background:#edf6ff;color:#06345f;text-align:left;font-size:13px;text-transform:uppercase;letter-spacing:.04em;padding:14px 16px;border-bottom:1px solid #d3e2f2}.inventory-master-table-pro td{padding:14px 16px;border-bottom:1px solid #edf1f6;vertical-align:middle;color:#17314f}.inventory-master-table-pro tbody tr:hover{background:#f8fbff}.product-main-cell-pro strong{display:block;font-size:15px;color:#10233f}.product-main-cell-pro small{display:block;color:#64748b;margin-top:3px;font-size:12px}.category-pill-pro{display:inline-flex;border-radius:999px;background:#eef6ff;color:#075da9;padding:6px 10px;font-weight:800;font-size:12px}.stock-number-pro{font-size:18px;color:#10233f}.stock-low-pro{color:#dc2626}.status-pill-pro{display:inline-flex;padding:7px 10px;border-radius:999px;font-size:12px;font-weight:900}.status-pill-pro.low{background:#fff0f0;color:#c31515}.status-pill-pro.ok{background:#ebfff3;color:#118344}.table-actions-pro{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.btn-edit-pro,.btn-remove-pro,.quick-stock-form-pro button{text-decoration:none;border:0;border-radius:10px;padding:9px 11px;font-weight:900;font-size:12px;cursor:pointer}.btn-edit-pro{background:#e9fff3;color:#08773d;border:1px solid #b7efce}.btn-remove-pro{background:#fff0f0;color:#c31515;border:1px solid #ffd0d0}.quick-stock-form-pro{display:flex;gap:6px;align-items:center}.quick-stock-form-pro input{width:70px;height:34px;border:1px solid #ccd9e8;border-radius:9px;padding:0 8px}.quick-stock-form-pro button{height:34px;background:#0b74d1;color:#fff}.empty-table-pro{text-align:center;color:#64748b;font-weight:700;padding:30px!important}.product-modal-pro{position:fixed;inset:0;display:none;z-index:5000}.product-modal-pro.is-open{display:block}.product-modal-backdrop-pro{position:absolute;inset:0;background:rgba(12,23,38,.45);backdrop-filter:blur(2px)}.product-modal-card-pro{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:min(860px,calc(100vw - 28px));max-height:92vh;overflow:auto;background:#fff;border-radius:20px;box-shadow:0 30px 90px rgba(0,0,0,.28);border:1px solid #dbe5f0}.product-modal-head-pro{display:flex;justify-content:space-between;gap:16px;align-items:flex-start;padding:22px 24px;border-bottom:1px solid #e7edf5}.product-modal-head-pro h2{margin:0;color:#10233f}.product-modal-head-pro p{margin:5px 0 0;color:#64748b}.product-modal-head-pro button{width:42px;height:42px;border-radius:50%;border:0;background:#eef2f7;color:#15243b;font-size:26px;cursor:pointer}.product-form-pro{padding:22px 24px}.product-form-pro label{font-weight:900;color:#263b58;margin-bottom:6px;display:block}.product-form-pro input,.product-form-pro select,.product-form-pro textarea{width:100%;border:1px solid #ccd9e8;border-radius:11px;padding:11px 12px;background:#fff;color:#14243c}.product-form-pro .form-grid-2{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-bottom:14px}.product-form-pro textarea{resize:vertical}.modal-actions-pro{display:flex;justify-content:flex-end;gap:10px;margin-top:18px}@media(max-width:1100px){.inventory-kpis-pro{grid-template-columns:repeat(2,1fr)}.inventory-tools-pro{grid-template-columns:1fr 1fr}.inventory-search-pro{grid-column:1/-1}.inventory-hero-pro{align-items:flex-start;flex-direction:column}}@media(max-width:720px){.inventory-content-pro{padding:18px 12px 40px}.inventory-kpis-pro,.inventory-tools-pro,.product-form-pro .form-grid-2{grid-template-columns:1fr}.inventory-hero-actions-pro{width:100%}.primary-action-pro,.secondary-action-pro{width:100%}.product-modal-card-pro{top:10px;transform:translateX(-50%);max-height:calc(100vh - 20px)}}


/* ===== Correção final: menu completo + login todo azul ===== */
.clean-topbar{
    min-height:64px;
    height:auto;
    padding:10px 18px;
    gap:14px;
    flex-wrap:wrap;
    align-items:center;
}
.clean-topbar .brand-area{min-width:210px;}
.clean-nav.full-nav-restored{
    display:flex;
    align-items:center;
    justify-content:center;
    flex-wrap:wrap;
    gap:6px;
    flex:1 1 760px;
}
.clean-nav.full-nav-restored a{
    padding:9px 10px;
    border-radius:10px;
    font-size:13px;
    font-weight:900;
    color:#102a43;
    white-space:nowrap;
}
.clean-nav.full-nav-restored a:hover{
    background:#eaf3ff;
    color:#0b63ce;
}
.clean-nav.full-nav-restored a.active{
    background:#e7f1ff;
    color:#0b63ce;
}
.clean-user{margin-left:auto;}
@media(max-width:1200px){
    .clean-topbar{align-items:flex-start;}
    .clean-nav.full-nav-restored{justify-content:flex-start;order:3;flex-basis:100%;}
    .clean-user{order:2;}
}

/* Login sem laranja: azul COFIHST */
.login-premium-body{
    background:radial-gradient(circle at 12% 12%,rgba(13,110,253,.18),transparent 28%),linear-gradient(135deg,#eef6ff 0%,#f8fbff 60%,#ffffff 100%) !important;
}
.login-premium-hero{
    background:linear-gradient(135deg,#0b63ce 0%,#0d6efd 55%,#1e8bff 100%) !important;
}
.login-premium-hero::before{
    background:radial-gradient(circle at 20% 20%,rgba(255,255,255,.24) 0 2px,transparent 3px) !important;
    background-size:22px 22px !important;
}
.login-premium-hero::after{
    background:linear-gradient(135deg,rgba(255,255,255,.18),rgba(255,255,255,.05)) !important;
    border-color:rgba(255,255,255,.25) !important;
}
.cofihst-dot-logo,
.premium-login-button,
.primary-cta,
.brand-logo{
    background:#0d6efd !important;
}
.cofihst-word,
.login-premium-kicker,
.login-premium-copy h1 strong,
.login-panel-header span,
.premium-medico-button,
.login-security-note{
    color:#0b63ce !important;
}
.input-with-icon:focus-within{
    border-color:#0d6efd !important;
    box-shadow:0 0 0 4px rgba(13,110,253,.12) !important;
}
.premium-medico-button{
    border-color:#0d6efd !important;
    background:#eef6ff !important;
}
.premium-medico-button:hover{
    background:#dbeafe !important;
    color:#084298 !important;
}
.login-premium-services article{
    border-color:rgba(255,255,255,.30) !important;
    background:rgba(255,255,255,.14) !important;
    color:white !important;
}
.service-icon{
    background:rgba(255,255,255,.18) !important;
    color:white !important;
}

/* Pequenos acertos para o visual ficar mais limpo */
.friendly-dashboard{max-width:1180px;margin:0 auto;padding:32px 20px 54px;}
.friendly-hero{border-color:#d6e8ff;background:linear-gradient(135deg,#ffffff,#f2f8ff);}
.quick-actions-panel,.friendly-card,.day-summary-grid article{border-color:#d9e7f7;}


/* ===== Login final mais limpo e profissional ===== */
.login-premium-body{
    min-height:100vh!important;
    background:#f4f8ff!important;
}
.login-premium-shell{
    grid-template-columns:1.08fr .92fr!important;
    gap:70px!important;
    padding:70px 78px!important;
    background:linear-gradient(90deg,#0b74d1 0 53%,#f4f8ff 53% 100%)!important;
}
.login-premium-hero{
    min-height:calc(100vh - 140px)!important;
    background:linear-gradient(135deg,#0b74d1,#106ee8)!important;
    border:0!important;
    border-radius:0!important;
    box-shadow:none!important;
    padding:0!important;
    color:#fff!important;
}
.login-premium-hero::before{
    opacity:.18!important;
    background:radial-gradient(circle,#ffffff 1px,transparent 2px)!important;
    background-size:22px 22px!important;
}
.login-premium-hero::after{
    display:none!important;
}
.cofihst-logo-block{
    position:relative!important;
    z-index:2!important;
    margin-bottom:120px!important;
}
.cofihst-word,
.cofihst-subtitle{
    color:#fff!important;
}
.login-premium-copy{
    position:relative!important;
    z-index:2!important;
    max-width:650px!important;
}
.login-premium-kicker{
    background:rgba(255,255,255,.14)!important;
    color:#eaf4ff!important;
    border:1px solid rgba(255,255,255,.22)!important;
}
.login-premium-copy h1{
    color:#fff!important;
    font-size:62px!important;
    line-height:1.02!important;
    letter-spacing:-.055em!important;
}
.login-premium-copy h1 strong{
    color:#d9ecff!important;
    display:block!important;
}
.login-premium-copy p{
    color:#e8f3ff!important;
    font-size:21px!important;
    max-width:560px!important;
}
.login-premium-services{
    display:none!important;
}
.login-premium-panel{
    width:min(100%,520px)!important;
    justify-self:center!important;
    border-radius:28px!important;
    padding:42px!important;
    box-shadow:0 30px 80px rgba(20,40,80,.14)!important;
}
.login-panel-header span{
    background:#eaf4ff!important;
    color:#0b64bd!important;
}
.login-panel-header h2{
    font-size:38px!important;
    letter-spacing:-.04em!important;
}
.input-with-icon{
    border-radius:14px!important;
    background:#fff!important;
}
.input-with-icon input{
    height:52px!important;
    font-size:15px!important;
}
.premium-login-button{
    height:58px!important;
    border-radius:14px!important;
    font-size:16px!important;
    background:#0b74d1!important;
    box-shadow:0 16px 32px rgba(11,116,209,.24)!important;
}
.premium-login-button:hover,
.premium-medico-button:hover{
    background:#075da9!important;
}
.premium-medico-form{
    margin-top:18px!important;
    padding:22px!important;
    background:#f4f9ff!important;
    border:1px solid #d5e8ff!important;
    border-radius:20px!important;
}
.medico-form-title strong{
    font-size:19px!important;
    color:#0f223d!important;
}
.medico-form-title small{
    color:#5d6f86!important;
}
.premium-medico-button{
    height:52px!important;
    background:#fff!important;
    color:#0b64bd!important;
    border:1px solid #0b74d1!important;
    border-radius:14px!important;
}
.login-security-note{
    color:#0b64bd!important;
}
@media(max-width:980px){
    .login-premium-shell{
        display:block!important;
        padding:30px 18px!important;
        background:#0b74d1!important;
    }
    .login-premium-hero{
        min-height:auto!important;
        padding:30px 0!important;
    }
    .cofihst-logo-block{margin-bottom:40px!important;}
    .login-premium-copy h1{font-size:42px!important;}
    .login-premium-panel{margin:20px auto!important;}
}

/* =========================================================
   COFIHST - Template unificado final
   Mantém o mesmo menu, fonte e espaçamento em todas as páginas.
   ========================================================= */
:root{
  --cofi-blue:#0f73d8;
  --cofi-blue-dark:#0759ae;
  --cofi-bg:#f5f8fc;
  --cofi-border:#dbe5f1;
  --cofi-text:#10233f;
  --cofi-muted:#5c6f8b;
}
html, body{
  font-family: Inter, Arial, Helvetica, sans-serif !important;
  background: var(--cofi-bg) !important;
  color: var(--cofi-text) !important;
  margin:0 !important;
  font-size:15px !important;
}
body *{box-sizing:border-box;}
.unified-topbar{
  position:sticky;
  top:0;
  z-index:1000;
  min-height:70px;
  display:flex;
  align-items:center;
  gap:18px;
  padding:10px 18px;
  background:#fff;
  border-bottom:1px solid var(--cofi-border);
  box-shadow:0 8px 24px rgba(15,44,88,.06);
}
.unified-brand{
  width:230px;
  min-width:230px;
  display:flex;
  align-items:center;
  gap:10px;
  color:var(--cofi-text);
  text-decoration:none;
}
.unified-logo{
  width:42px;height:42px;border-radius:12px;
  background:var(--cofi-blue);
  color:#fff;
  display:flex;align-items:center;justify-content:center;
  font-weight:900;
}
.unified-brand strong{display:block;font-size:17px;line-height:1.1;}
.unified-brand small{display:block;color:var(--cofi-muted);font-size:12px;margin-top:2px;}
.unified-nav{
  flex:1;
  display:flex;
  align-items:center;
  gap:4px;
  overflow-x:auto;
  scrollbar-width:thin;
  white-space:nowrap;
}
.unified-nav a{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:10px 12px;
  border-radius:11px;
  color:var(--cofi-text);
  text-decoration:none;
  font-weight:800;
  font-size:14px;
}
.unified-nav a:hover,
.unified-nav a.active{
  background:#eaf3ff;
  color:var(--cofi-blue-dark);
}
.unified-user{
  min-width:max-content;
  display:flex;
  align-items:center;
  gap:10px;
  color:var(--cofi-text);
  font-weight:800;
}
.unified-user span{max-width:120px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.unified-user strong{font-size:12px;color:var(--cofi-muted);}
.unified-logout{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:11px 16px;
  border-radius:12px;
  background:#ef4444;
  color:#fff !important;
  text-decoration:none;
  font-weight:900;
}
/* Esconder menus antigos para não haver duas barras/menu lateral */
body > .clean-topbar,
body > header.clean-topbar,
body > header.topbar,
body > header.app-header,
body > .app-header,
.app-layout > .sidebar,
aside.sidebar:not(.agenda-sidebar):not(#sidebar){display:none !important;}
.app-layout{display:block !important;min-height:auto !important;width:100% !important;}
.content,
.dashboard-container,
.dashboard,
.clean-home,
.home-clean-main,
.inventory-content-pro,
main.content{
  width:min(1440px, calc(100% - 40px)) !important;
  max-width:1440px !important;
  margin:28px auto !important;
  padding:0 !important;
}
.page-head,
.card,
.panel,
.table-card,
.form-card,
.inventory-toolbar,
.quick-card,
.dashboard-card,
.clean-hero,
.home-hero,
section{
  border-radius:16px;
}
.page-head{
  background:#fff;
  border:1px solid var(--cofi-border);
  padding:22px 24px;
  box-shadow:0 10px 24px rgba(15,44,88,.05);
}
.page-head h1{font-size:28px !important;margin:6px 0 !important;}
.page-head p{color:var(--cofi-muted) !important;}
button,.btn,.small-btn,input,select,textarea{
  font-family:inherit !important;
}
input,select,textarea{
  border:1px solid #cfdced !important;
  border-radius:10px !important;
  padding:12px 14px !important;
  font-size:14px !important;
}
table{font-size:14px !important;}
th{background:#eaf3ff !important;color:#063a70 !important;font-weight:900 !important;}
.btn,.small-btn,button[type='submit']{
  border-radius:11px !important;
  font-weight:900 !important;
}
@media (max-width:1100px){
  .unified-topbar{align-items:flex-start;flex-wrap:wrap;}
  .unified-brand{width:auto;min-width:0;}
  .unified-nav{order:3;width:100%;}
  .content,.dashboard-container,.dashboard,.clean-home,.home-clean-main,.inventory-content-pro,main.content{width:calc(100% - 24px) !important;margin:18px auto !important;}
}

/* Correção final: página Pesquisar Utentes unificada e sem bloqueios */
.clean-page{max-width:1280px;margin:0 auto;padding:34px 24px 80px;}
.compact-hero{margin-bottom:18px;}
.search-panel-pro{margin-bottom:18px;}
.quick-actions-row{display:flex;gap:10px;flex-wrap:wrap;align-items:center;}
.section-title-row{display:flex;justify-content:space-between;align-items:center;gap:14px;margin-bottom:12px;}
.soft-badge{display:inline-flex;align-items:center;border:1px solid #dbeafe;background:#eff6ff;color:#075985;border-radius:999px;padding:6px 10px;font-weight:800;font-size:12px;}
.empty-panel-large{min-height:210px;display:flex;align-items:center;justify-content:center;}
.detail-card-highlight{border-left:6px solid #1479d4;}
@media (max-width: 900px){.clean-page{padding:20px 14px}.section-title-row{align-items:flex-start;flex-direction:column}.search-form{grid-template-columns:1fr!important}.search-form button{width:100%}}

/* =========================================================
   COFIHST - Responsivo telemóvel/tablet
   ========================================================= */
.mobile-menu-toggle{display:none;border:0;background:var(--cofi-blue);color:#fff;border-radius:12px;width:44px;height:44px;font-size:22px;font-weight:900;line-height:1;padding:0;box-shadow:0 8px 18px rgba(15,115,216,.22)}
.unified-mobile-row{display:flex;align-items:center;gap:12px;min-width:230px}.unified-mobile-row .unified-brand{width:230px;min-width:230px}
.table-responsive,.table-wrapper,.responsive-table-wrap{width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}
img,svg,video{max-width:100%;height:auto}.card,.panel,.table-card,.form-card,.inventory-table-panel-pro,.inventory-hero-pro,.inventory-kpis-pro,.inventory-tools-pro,.modal,.stock-category-card{max-width:100%}
@media (max-width: 900px){
  html,body{font-size:14px!important;overflow-x:hidden!important}
  .unified-topbar{position:sticky!important;top:0;display:block!important;padding:10px 12px!important;min-height:auto!important}
  .unified-mobile-row{width:100%;min-width:0;justify-content:space-between!important}
  .unified-mobile-row .unified-brand,.unified-brand{width:auto!important;min-width:0!important;flex:1!important}
  .unified-brand small{display:none!important}.unified-logo{width:38px!important;height:38px!important;border-radius:10px!important}.unified-brand strong{font-size:16px!important}
  .mobile-menu-toggle{display:grid!important;place-items:center!important;flex:0 0 auto!important}
  .unified-nav{display:none!important;width:100%!important;order:unset!important;overflow:visible!important;white-space:normal!important;padding:10px 0 6px!important;grid-template-columns:1fr!important;gap:7px!important}
  body.mobile-menu-open .unified-nav{display:grid!important}
  .unified-nav a{display:flex!important;width:100%!important;justify-content:flex-start!important;padding:13px 14px!important;border:1px solid #dbeafe!important;background:#f8fbff!important;border-radius:12px!important;font-size:15px!important}
  .unified-user{display:none!important;width:100%!important;padding:8px 0 0!important;border-top:1px solid #dbeafe!important;margin-top:8px!important;justify-content:space-between!important}
  body.mobile-menu-open .unified-user{display:flex!important}
  .unified-logout{padding:10px 14px!important}
  body > .clean-topbar,body > header.clean-topbar,body > header.topbar,body > header.app-header,body > .app-header,.app-layout > .sidebar,aside.sidebar:not(.agenda-sidebar):not(#sidebar){display:none!important}
  .app-layout,.main-shell{display:block!important;width:100%!important;min-width:0!important;overflow-x:hidden!important}
  .content,.dashboard-container,.dashboard,.clean-home,.home-clean-main,.inventory-content-pro,main.content,.clean-page,.simple-dashboard{width:100%!important;max-width:100%!important;margin:0!important;padding:14px!important}
  .page-head,.welcome-panel,.inventory-hero-pro,.hero,.clean-hero,.home-hero{padding:16px!important;border-radius:14px!important;margin-bottom:14px!important;display:block!important}
  .page-head h1,.welcome-panel h1,.inventory-hero-pro h1{font-size:24px!important;line-height:1.15!important}.page-head p,.welcome-panel p,.inventory-hero-pro p{font-size:14px!important}
  .page-actions,.inventory-hero-actions-pro,.topbar-actions,.stock-form-actions,.form-actions-right,.quick-actions-row,.filter-buttons{display:grid!important;grid-template-columns:1fr!important;gap:10px!important;width:100%!important;justify-content:stretch!important}
  .page-actions a,.page-actions button,.inventory-hero-actions-pro a,.inventory-hero-actions-pro button,.form-actions-right button,.quick-actions-row a,.quick-actions-row button{width:100%!important;text-align:center!important}
  .kpi-grid,.quick-actions,.module-grid,.main-actions-grid,.quick-strip,.inventory-kpis-pro,.inventory-tools-pro,.stock-actions-panel,.dashboard-chart-grid,.form-grid-2,.form-grid-3,.form-grid-4,.user-form,.empresa-form,.utente-form,.marcacao-form,.fornecedor-form,.consumivel-form,.perfil-form,.fornecedor-page-form,.stock-edit-form,.excel-import-form,.search-form,.medico-resumo-grid,.empresa-resumo-grid,.historico-resumo-grid,.consulta-resumo,.utente-detalhe-grid,.consulta-detalhe-grid,.consumivel-add-row,.data-grid{grid-template-columns:1fr!important;display:grid!important;gap:12px!important}
  .kpi-card,.quick-card,.module-card,.big-action,.inventory-kpis-pro article,.table-card,.form-card,.card,.panel,.inventory-table-panel-pro{border-radius:14px!important;padding:14px!important}
  .big-action,.quick-card{align-items:flex-start!important}.big-icon{width:48px!important;height:48px!important;font-size:24px!important}.big-action h2,.quick-card h3,.module-card h3{font-size:18px!important}
  .table-card,.inventory-table-panel-pro,.stock-category-card{overflow:hidden!important}
  table{display:block!important;width:100%!important;max-width:100%!important;overflow-x:auto!important;-webkit-overflow-scrolling:touch!important;border-spacing:0!important;white-space:nowrap!important}
  thead,tbody,tr{width:max-content!important;min-width:100%!important}th,td{font-size:13px!important;padding:10px!important;vertical-align:top!important}
  .stock-table td:first-child{min-width:190px!important}
  input,select,textarea{font-size:16px!important;min-height:44px!important;width:100%!important}button,.btn,.small-btn,.btn-primary,.primary-action-pro,.secondary-action-pro{min-height:44px!important;font-size:15px!important}
  .modal-backdrop,.stock-alert-overlay{padding:12px!important;align-items:flex-start!important;overflow-y:auto!important}.modal,.stock-alert-modal{width:100%!important;max-width:100%!important;margin:20px 0!important;border-radius:16px!important;padding:16px!important}.modal-actions{display:grid!important;grid-template-columns:1fr!important;gap:10px!important}.modal-actions button{width:100%!important}
  .login-shell,.login-shell.v2{display:block!important;padding:16px!important}.login-hero{display:none!important}.login-panel,.login-panel.v2{width:100%!important;max-width:460px!important;margin:24px auto!important;padding:22px!important}.login-box{padding:16px!important}
}
@media (max-width: 480px){
  .content,.dashboard-container,.dashboard,.clean-home,.home-clean-main,.inventory-content-pro,main.content,.clean-page,.simple-dashboard{padding:10px!important}.unified-topbar{padding:8px 10px!important}.unified-logo{width:34px!important;height:34px!important}.unified-brand strong{font-size:15px!important}.mobile-menu-toggle{width:40px!important;height:40px!important;font-size:20px!important}.page-head h1,.welcome-panel h1,.inventory-hero-pro h1{font-size:21px!important}.kpi-card strong,.inventory-kpis-pro strong{font-size:22px!important}
}
