:root {
    --navy: #0b2d54;
    --navy-deep: #082444;
    --blue: #3769e8;
    --bg: #f7f9fd;
    --surface: #ffffff;
    --text: #172640;
    --muted: #68758b;
    --border: #dfe6f0;
    --green: #18a557;
    --orange: #eda41f;
    --red: #e23a43;
    --purple: #7738cf;
    --info: #3266d7;
    --danger: #d83842;
    --shadow: 0 10px 28px rgba(31, 55, 88, .08);
    --shadow-hover: 0 18px 42px rgba(31, 55, 88, .13);
    --radius: 18px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    min-height: 100vh;
    font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--text);
    background: var(--bg);
}

a { color: inherit; }
svg { display: block; }

.app-shell { min-height: 100vh; display: flex; }
.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: 290px;
    min-height: 100vh;
    padding: 28px 24px 26px;
    overflow: hidden;
    color: #fff;
    background:
        radial-gradient(circle at 18% 72%, rgba(35, 104, 169, .22), transparent 26%),
        linear-gradient(165deg, var(--navy-deep), var(--navy) 70%, #0b3866);
    z-index: 30;
}

.brand { display: flex; align-items: center; gap: 14px; min-height: 55px; }
.brand-icon {
    position: relative;
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    display: grid;
    place-items: center;
    color: #fff;
}
.brand-icon svg { width: 44px; height: 44px; }
.brand-icon span {
    position: absolute;
    right: 0;
    bottom: 4px;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: #4778ff;
    box-shadow: 0 0 0 3px rgba(255,255,255,.15);
}
.brand strong { display: block; font-size: 17px; line-height: 1.25; letter-spacing: -.02em; }
.brand small { display: block; margin-top: 5px; color: #9eb4d0; font-size: 14px; }
.sidebar-divider { height: 1px; margin: 26px 0 18px; background: rgba(255,255,255,.09); }

.side-nav { display: grid; gap: 7px; }
.nav-label {
    margin: 18px 15px 6px;
    color: #91a9c7;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .05em;
}
.nav-item {
    display: flex;
    align-items: center;
    gap: 15px;
    min-height: 50px;
    padding: 0 16px;
    border-radius: 10px;
    color: #f2f6fc;
    font-size: 14px;
    font-weight: 650;
    text-decoration: none;
    transition: transform .18s ease, background .18s ease, color .18s ease, box-shadow .18s ease;
}
.nav-item svg { width: 24px; height: 24px; color: #64b8ff; }
.nav-item:hover { background: rgba(255,255,255,.08); transform: translateX(3px); }
.nav-item.active {
    background: linear-gradient(135deg, #2c67df, #386fe9);
    box-shadow: 0 10px 24px rgba(22, 71, 176, .33);
}
.nav-item.active svg { color: #fff; }
.nav-separator { height: 1px; margin: 17px 0 2px; background: rgba(255,255,255,.13); }

.sidebar-art { position: absolute; left: 14px; right: 14px; bottom: 0; height: 235px; opacity: .72; pointer-events: none; }
.desk-line { position: absolute; left: 6px; bottom: 66px; width: 170px; height: 7px; border-radius: 7px; background: #5c91c1; }
.monitor { position: absolute; left: 40px; bottom: 74px; width: 58px; height: 43px; border-radius: 3px; background: #194c79; border: 6px solid #346f9f; }
.monitor::after { content: ""; position: absolute; width: 8px; height: 18px; left: 20px; top: 38px; background: #2d668f; }
.chair { position: absolute; left: 112px; bottom: 22px; width: 48px; height: 68px; border-radius: 14px 14px 8px 8px; background: #376d9b; transform: skew(-8deg); }
.plant { position: absolute; right: 17px; bottom: 0; width: 62px; height: 142px; }
.plant b { position: absolute; left: 22px; bottom: 0; width: 38px; height: 42px; border-radius: 3px 3px 11px 11px; background: #5e8eb0; }
.plant i { position: absolute; width: 19px; height: 54px; border-radius: 70% 0 70% 0; background: #1b8b7b; transform-origin: bottom; }
.plant i:nth-child(1) { left: 30px; bottom: 38px; transform: rotate(-26deg); }
.plant i:nth-child(2) { left: 20px; bottom: 61px; transform: rotate(18deg); }
.plant i:nth-child(3) { left: 42px; bottom: 72px; transform: rotate(42deg); }

.app-main { min-width: 0; width: calc(100% - 290px); margin-left: 290px; min-height: 100vh; display: flex; flex-direction: column; }
.top-header {
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 4.2%;
    background: rgba(255,255,255,.96);
    border-bottom: 1px solid #e1e7f0;
    box-shadow: 0 4px 18px rgba(28, 52, 85, .04);
}
.menu-button {
    width: 50px;
    height: 50px;
    display: grid;
    place-items: center;
    border: 1px solid #dce4ef;
    border-radius: 11px;
    color: #315b91;
    background: #fff;
    box-shadow: 0 3px 12px rgba(26, 54, 91, .04);
}
.menu-button svg { width: 25px; height: 25px; }
.header-actions { display: flex; align-items: center; gap: 24px; }
.date-card, .user-card {
    height: 62px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 18px;
    background: #fff;
    border: 1px solid #e0e6ef;
    border-radius: 14px;
    box-shadow: 0 5px 16px rgba(31, 53, 82, .035);
}
.date-card svg { width: 27px; height: 27px; color: #356af0; }
.date-card strong, .user-card strong { display: block; font-size: 14px; color: #21314b; }
.date-card span, .user-card span { display: block; margin-top: 3px; font-size: 12px; color: #66768e; }
.user-card { min-width: 225px; }
.avatar { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; background: linear-gradient(135deg,#5e7cf3,#3e63dc); color: white; }
.avatar svg { width: 27px; height: 27px; }
.chevron { width: 18px; height: 18px; margin-left: auto; color: #3769df; }

.content-area { width: min(1160px, 91%); margin: 32px auto 45px; flex: 1; }
.welcome-block { margin-bottom: 31px; animation: fadeUp .45s ease both; }
.eyebrow { display: inline-block; margin-bottom: 7px; color: #3f6fe5; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .09em; }
.welcome-block h2 { margin: 0 0 9px; color: #172640; font-size: clamp(27px, 2.5vw, 34px); line-height: 1.12; letter-spacing: -.045em; }
.welcome-block p { margin: 0; max-width: 750px; color: #56657b; font-size: 15px; line-height: 1.65; }

.dashboard-cards { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 24px; }
.dashboard-card {
    position: relative;
    min-height: 235px;
    display: grid;
    grid-template-columns: 145px 1fr;
    align-items: center;
    overflow: hidden;
    padding: 28px 30px;
    background: #fff;
    border: 1px solid #dfe6ef;
    border-radius: 18px;
    box-shadow: var(--shadow);
    transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
    animation: fadeUp .48s ease both;
}
.dashboard-card:nth-child(2) { animation-delay: .06s; }
.dashboard-card:nth-child(3) { animation-delay: .12s; }
.dashboard-card:nth-child(4) { animation-delay: .18s; }
.dashboard-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-hover); border-color: #ced8e7; }
.card-icon {
    position: relative;
    z-index: 2;
    width: 130px;
    height: 130px;
    display: grid;
    place-items: center;
    border-radius: 24px;
}
.card-icon svg { width: 75px; height: 75px; }
.card-content { position: relative; z-index: 3; padding-left: 8px; }
.card-number { display: inline; margin-right: 7px; font-size: 20px; font-weight: 800; }
.card-content h3 { display: inline; margin: 0; font-size: 20px; letter-spacing: -.025em; }
.card-content p { min-height: 48px; margin: 15px 0 22px; max-width: 325px; color: #536176; font-size: 14px; line-height: 1.7; }
.action-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    min-width: 170px;
    min-height: 42px;
    padding: 10px 17px;
    color: white;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 750;
    text-decoration: none;
    box-shadow: 0 7px 15px rgba(18, 55, 90, .12);
    transition: transform .18s ease, filter .18s ease;
}
.action-button:hover { transform: translateY(-2px); filter: brightness(1.03); }
.action-button span { font-size: 20px; font-weight: 400; line-height: 1; }
.watermark-icon { position: absolute; right: -38px; top: 52px; opacity: .11; transform: rotate(-4deg); }
.watermark-icon svg { width: 150px; height: 150px; }
.card-green .card-icon { color: var(--green); background: #e8f7ee; }
.card-green .card-number, .card-green h3, .card-green .watermark-icon { color: var(--green); }
.card-green .action-button { background: linear-gradient(135deg,#16a34a,#18b05a); }
.card-orange .card-icon { color: var(--orange); background: #fff5df; }
.card-orange .card-number, .card-orange h3, .card-orange .watermark-icon { color: #e1970d; }
.card-orange .action-button { background: linear-gradient(135deg,#eca11e,#f3b02c); }
.card-blue .card-icon { color: #3273cf; background: #eaf2ff; }
.card-blue .card-number, .card-blue h3, .card-blue .watermark-icon { color: #3273cf; }
.card-blue .action-button { background: linear-gradient(135deg,#3273cf,#3b83e5); }
.card-purple .card-icon { color: var(--purple); background: #f3ebff; }
.card-purple .card-number, .card-purple h3, .card-purple .watermark-icon { color: var(--purple); }
.stats-content p { min-height: auto; }
.mini-stats { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; margin-top: 20px; }
.mini-stats div { padding: 11px 9px; border-radius: 10px; background: #faf8fe; border: 1px solid #eee7f9; text-align: center; }
.mini-stats strong { display: block; color: #6f34bf; font-size: 21px; }
.mini-stats span { display: block; margin-top: 3px; color: #667085; font-size: 10px; line-height: 1.25; }

.info-panel {
    position: relative;
    min-height: 128px;
    display: flex;
    align-items: center;
    gap: 20px;
    margin-top: 31px;
    padding: 27px 250px 27px 34px;
    overflow: hidden;
    background: linear-gradient(105deg,#fff,#f7faff);
    border: 1px solid #d9e4f4;
    border-radius: 16px;
    box-shadow: 0 8px 22px rgba(41, 79, 124, .06);
    animation: fadeUp .52s .2s ease both;
}
.info-icon { width: 49px; height: 49px; flex: 0 0 49px; display: grid; place-items: center; border: 3px solid var(--info); border-radius: 50%; color: var(--info); font-size: 26px; font-weight: 700; font-family: Georgia, serif; }
.info-panel h3 { margin: 0 0 7px; color: #2d61c9; font-size: 17px; }
.info-panel p { margin: 0; color: #5d6878; font-size: 13px; line-height: 1.65; }
.building-art { position: absolute; right: 30px; bottom: 0; width: 190px; height: 102px; opacity: .52; }
.building { position: absolute; bottom: 0; display: block; background: linear-gradient(#8eb3ef,#c2d5f5); border-radius: 5px 5px 0 0; }
.building::after { content:""; position:absolute; inset: 10px 8px; background: repeating-linear-gradient(90deg,rgba(255,255,255,.75) 0 7px,transparent 7px 15px), repeating-linear-gradient(0deg,rgba(255,255,255,.55) 0 7px,transparent 7px 15px); }
.b1 { left: 30px; width: 66px; height: 74px; }
.b2 { left: 92px; width: 49px; height: 55px; }
.b3 { left: 137px; width: 32px; height: 39px; }
.tree { position: absolute; right: 2px; bottom: 0; width: 5px; height: 40px; background: #6b91d4; }
.tree::before { content:""; position:absolute; left:-10px; top:-17px; width:25px; height:32px; background:#88a9e8; border-radius:50% 50% 45% 45%; }

/* Páginas internas */
.page-title { display:flex; justify-content:space-between; align-items:center; gap:20px; margin-bottom:22px; }
.page-title h2, .two-columns h2 { margin:0 0 7px; color:#172640; font-size:26px; letter-spacing:-.035em; }
.page-title p { margin:0; color:#68758b; font-size:14px; }
.form-card, .resource-item, .table-wrap {
    background:#fff;
    border:1px solid #dfe6ef;
    box-shadow:var(--shadow);
}
.form-card { padding:30px; border-radius:18px; }
.form-card label { display:block; margin-bottom:17px; color:#34445b; font-size:13px; font-weight:700; }
input, select {
    width:100%;
    margin-top:8px;
    padding:13px 14px;
    border:1px solid #dbe3ee;
    border-radius:9px;
    background:#fbfcfe;
    color:#172640;
    font:inherit;
    outline:none;
    transition:border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
input:focus, select:focus { border-color:#648be7; background:#fff; box-shadow:0 0 0 4px rgba(55,105,232,.10); }
.grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:2px 18px; }
.full { grid-column:1/-1; }
.button, button {
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-height:43px;
    padding:10px 18px;
    border:0;
    border-radius:8px;
    background:linear-gradient(135deg,#3265d9,#3f75eb);
    color:white;
    font:inherit;
    font-size:13px;
    font-weight:750;
    text-decoration:none;
    cursor:pointer;
    box-shadow:0 8px 18px rgba(50,101,217,.18);
    transition:transform .18s ease, box-shadow .18s ease;
}
.button:hover, button:hover { transform:translateY(-2px); box-shadow:0 12px 24px rgba(50,101,217,.22); }
.button.secondary { background:#fff; color:#315fca; border:1px solid #d7e0ef; box-shadow:none; }
button.danger { min-height:36px; padding:8px 12px; background:#fff3f3; color:var(--danger); border:1px solid #f2c7ca; box-shadow:none; }
.two-columns { display:grid; grid-template-columns:.88fr 1.2fr; gap:26px; align-items:start; }
.resource-list { display:grid; gap:13px; }
.resource-item { position:relative; padding:19px 20px 19px 24px; border-radius:13px; transition:transform .18s ease, box-shadow .18s ease; }
.resource-item::before { content:""; position:absolute; left:0; top:13px; bottom:13px; width:4px; border-radius:4px; background:#3e72e5; }
.resource-item:hover { transform:translateY(-2px); box-shadow:var(--shadow-hover); }
.resource-item strong { display:block; color:#223653; font-size:14px; }
.resource-item span, .resource-item small { display:block; margin-top:6px; color:#6b7788; font-size:12px; }
.table-wrap { overflow-x:auto; border-radius:16px; }
table { width:100%; min-width:850px; border-collapse:collapse; }
thead { background:#f1f5fb; }
th { color:#506078; font-size:11px; text-transform:uppercase; letter-spacing:.045em; }
th, td { padding:14px 15px; border-bottom:1px solid #e9eef5; text-align:left; }
td { color:#38475e; font-size:13px; }
tbody tr { background:#fff; transition:background .16s ease; }
tbody tr:hover { background:#f9fbfe; }
.badge { display:inline-flex; align-items:center; padding:6px 10px; border-radius:999px; background:#ebf7f0; color:#19864c; font-size:10px; font-weight:800; }
.alert { padding:14px 16px; margin-bottom:20px; border-radius:11px; border:1px solid transparent; font-size:13px; box-shadow:0 5px 14px rgba(33,56,87,.05); }
.alert.success { background:#ecf9f1; color:#23764a; border-color:#cbe9d7; }
.alert.error { background:#fff1f1; color:#a6363d; border-color:#f1ced0; }

.app-footer { min-height:62px; display:grid; place-items:center; padding:20px; color:#627086; background:#fff; border-top:1px solid #e2e8f0; font-size:11px; }

@keyframes fadeUp { from { opacity:0; transform:translateY(12px); } to { opacity:1; transform:translateY(0); } }

@media (max-width: 1080px) {
    .sidebar { width:240px; }
    .app-main { width:calc(100% - 240px); margin-left:240px; }
    .brand strong { font-size:15px; }
    .dashboard-card { grid-template-columns:110px 1fr; padding:24px 22px; }
    .card-icon { width:100px; height:100px; }
    .card-icon svg { width:60px; height:60px; }
    .mini-stats { grid-template-columns:1fr; }
    .stats-card { min-height:285px; }
}

@media (max-width: 820px) {
    .app-shell { display:block; }
    .sidebar { position:relative; width:100%; min-height:auto; padding:18px; }
    .sidebar-art { display:none; }
    .brand { min-height:auto; }
    .brand-icon { width:40px; height:40px; flex-basis:40px; }
    .brand-icon svg { width:36px; height:36px; }
    .sidebar-divider { margin:14px 0; }
    .side-nav { grid-template-columns:repeat(2,minmax(0,1fr)); }
    .nav-label, .nav-separator { display:none; }
    .nav-item { min-height:45px; padding:0 12px; }
    .app-main { width:100%; margin-left:0; }
    .top-header { height:auto; min-height:74px; padding:12px 4%; }
    .menu-button { display:none; }
    .header-actions { width:100%; justify-content:space-between; gap:10px; }
    .date-card, .user-card { height:52px; padding:0 12px; }
    .user-card { min-width:0; }
    .content-area { width:92%; margin-top:25px; }
    .dashboard-cards { grid-template-columns:1fr; }
    .dashboard-card { min-height:210px; }
    .info-panel { padding-right:32px; }
    .building-art { display:none; }
    .two-columns, .grid { grid-template-columns:1fr; }
    .page-title { align-items:flex-start; flex-direction:column; }
}

@media (max-width: 540px) {
    .side-nav { grid-template-columns:1fr 1fr; gap:5px; }
    .nav-item { font-size:12px; gap:9px; }
    .nav-item svg { width:20px; height:20px; }
    .date-card { display:none; }
    .header-actions { justify-content:flex-end; }
    .user-card { width:100%; }
    .dashboard-card { grid-template-columns:82px 1fr; padding:20px 16px; min-height:190px; }
    .card-icon { width:72px; height:72px; border-radius:16px; }
    .card-icon svg { width:43px; height:43px; }
    .card-content h3, .card-number { font-size:17px; }
    .card-content p { min-height:auto; margin:12px 0 17px; font-size:12px; }
    .action-button { min-width:145px; min-height:38px; font-size:12px; }
    .watermark-icon { display:none; }
    .stats-card { min-height:255px; }
    .mini-stats { grid-template-columns:repeat(3,1fr); }
    .mini-stats strong { font-size:18px; }
    .mini-stats span { font-size:8px; }
    .info-panel { align-items:flex-start; padding:22px 18px; }
}
