/* AUMAPROC — Estilos globales */
/* Paleta: Verde oscuro #006747, Verde claro #80CE3A, Amarillo #E3EE00, Naranja #FD4C0F */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body { font-family: 'Barlow', sans-serif; background: #F5F6F2; color: #1C2B1A; min-height: 100vh; font-size: 14px; }

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-thumb { background: #C8D4C0; border-radius: 3px; }

/* ── TOPBAR ── */
.topbar { background: #006747; padding: 0 20px; display: flex; align-items: center; justify-content: space-between; height: 54px; position: sticky; top: 0; z-index: 200; box-shadow: 0 2px 8px rgba(0,103,71,.25); }
.topbar-left { display: flex; align-items: center; gap: 8px; }
.logo { font-family: 'Barlow Condensed', sans-serif; font-weight: 800; font-size: 22px; color: #E3EE00; letter-spacing: 1px; text-decoration: none; }
.logo-sep { color: rgba(255,255,255,.3); }
.logo-sub { font-family: 'Barlow Condensed', sans-serif; font-weight: 600; font-size: 13px; color: rgba(255,255,255,.65); letter-spacing: 2px; text-transform: uppercase; }
.topbar-right { display: flex; align-items: center; gap: 12px; }
.user-info { display: flex; align-items: center; gap: 8px; }
.user-avatar { width: 32px; height: 32px; border-radius: 50%; background: #80CE3A; color: #1C2B1A; display: flex; align-items: center; justify-content: center; font-family: 'Barlow Condensed', sans-serif; font-weight: 800; font-size: 13px; }
.user-name { font-size: 12px; font-weight: 600; color: #fff; }
.user-role { font-size: 10px; padding: 1px 7px; border-radius: 10px; color: #fff; font-weight: 600; display: inline-block; margin-top: 2px; }
.btn-logout { background: rgba(255,255,255,.15); color: #fff; border: 1px solid rgba(255,255,255,.25); border-radius: 5px; padding: 5px 12px; font-size: 12px; font-family: 'Barlow', sans-serif; cursor: pointer; text-decoration: none; transition: background .15s; }
.btn-logout:hover { background: rgba(255,255,255,.25); }

/* ── NAVBAR ── */
.navbar { background: #fff; border-bottom: 2px solid #E5E8E0; padding: 0 20px; display: flex; box-shadow: 0 1px 4px rgba(0,0,0,.05); overflow-x: auto; }
.nbtn { background: none; border: none; border-bottom: 3px solid transparent; padding: 11px 16px; font-size: 13px; font-weight: 600; font-family: 'Barlow', sans-serif; color: #6B7A65; cursor: pointer; text-decoration: none; transition: all .15s; white-space: nowrap; margin-bottom: -2px; display: inline-block; }
.nbtn.on, .nbtn:hover { color: #006747; }
.nbtn.on { border-bottom-color: #80CE3A; }
.nbtn-new { color: #FD4C0F !important; font-weight: 700; }

/* ── FLASH ── */
.flash-msg { padding: 12px 20px; font-size: 13px; font-weight: 600; }
.flash-ok { background: #F0FBE8; border-bottom: 1px solid #86EFAC; color: #166534; }
.flash-error { background: #FEF2F2; border-bottom: 1px solid #FCA5A5; color: #DC2626; }

/* ── MAIN ── */
.main { padding: 22px 20px; max-width: 1200px; margin: 0 auto; }
.footer { text-align: center; padding: 16px; font-size: 11px; color: #8A9A82; display: flex; gap: 16px; justify-content: center; border-top: 1px solid #E5E8E0; margin-top: 40px; }

/* ── TIPOGRAFÍA ── */
.ptitle { font-family: 'Barlow Condensed', sans-serif; font-weight: 800; font-size: 26px; color: #006747; margin-bottom: 3px; }
.psub { color: #8A9A82; font-size: 12px; margin-bottom: 18px; }
.sec-title { font-family: 'Barlow Condensed', sans-serif; font-weight: 700; font-size: 13px; color: #006747; text-transform: uppercase; letter-spacing: 1px; padding-bottom: 7px; border-bottom: 2px solid #E3EE00; display: inline-block; margin-bottom: 14px; }

/* ── CARDS ── */
.card { background: #fff; border: 1px solid #E5E8E0; border-radius: 10px; overflow: hidden; margin-bottom: 14px; box-shadow: 0 1px 3px rgba(0,0,0,.04); }
.cardp { background: #fff; border: 1px solid #E5E8E0; border-radius: 10px; padding: 18px; margin-bottom: 14px; box-shadow: 0 1px 3px rgba(0,0,0,.04); }
.ch { padding: 10px 16px; border-bottom: 1px solid #EEF0EA; font-family: 'Barlow Condensed', sans-serif; font-weight: 700; font-size: 13px; color: #006747; text-transform: uppercase; letter-spacing: 1px; background: #F9FAF7; display: flex; justify-content: space-between; align-items: center; }

/* ── STATS ── */
.stats-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-bottom: 20px; }
.stat-card { background: #fff; border: 1px solid #E5E8E0; border-radius: 10px; padding: 16px 14px; border-left: 4px solid; box-shadow: 0 1px 3px rgba(0,0,0,.04); }
.stat-icon { font-size: 18px; margin-bottom: 5px; }
.stat-val { font-family: 'Barlow Condensed', sans-serif; font-weight: 800; font-size: 32px; }
.stat-lbl { font-size: 10px; color: #8A9A82; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; margin-top: 2px; }

/* ── ROWS ── */
.rrow { padding: 12px 16px; border-bottom: 1px solid #EEF0EA; display: flex; align-items: center; gap: 10px; transition: background .12s; text-decoration: none; color: inherit; }
.rrow:hover { background: #F5F9F0; }
.rrow:last-child { border-bottom: none; }
.dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.rid { font-family: 'Barlow Condensed', sans-serif; font-weight: 700; color: #006747; width: 78px; font-size: 13px; flex-shrink: 0; }
.rdesc { font-size: 13px; font-weight: 600; color: #1C2B1A; }
.rmeta { color: #8A9A82; font-size: 11px; margin-top: 1px; }

/* ── BADGES ── */
.badge { font-size: 10px; padding: 2px 8px; border-radius: 20px; font-weight: 700; flex-shrink: 0; }
.b-urg { background: #FEE2D5; color: #C2390A; }
.b-turn { background: #E8F5D8; color: #166534; }
.b-step { font-size: 10px; padding: 2px 8px; border-radius: 20px; background: #F0F2EC; color: #6B7A65; flex-shrink: 0; }

/* ── ALERT BOX ── */
.alert-box { background: #FFFBF0; border: 1px solid #FDE68A; border-left: 4px solid #FD4C0F; border-radius: 10px; padding: 14px 16px; margin-bottom: 18px; }
.alert-title { font-family: 'Barlow Condensed', sans-serif; font-weight: 700; font-size: 15px; color: #FD4C0F; margin-bottom: 10px; }
.alert-row { background: #fff; border: 1px solid #E5E8E0; border-radius: 7px; padding: 10px 14px; display: flex; justify-content: space-between; align-items: center; margin-bottom: 5px; text-decoration: none; color: inherit; transition: border-color .15s; }
.alert-row:hover { border-color: #80CE3A; }

/* ── FORMS ── */
.lbl { color: #6B7A65; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; display: block; margin-bottom: 4px; margin-top: 12px; }
.inp { background: #fff; border: 1px solid #D5D9CE; border-radius: 6px; padding: 9px 11px; color: #1C2B1A; width: 100%; font-family: 'Barlow', sans-serif; font-size: 13px; transition: border .15s; }
.inp:focus { outline: none; border-color: #006747; box-shadow: 0 0 0 3px rgba(0,103,71,.08); }
textarea.inp { resize: vertical; min-height: 60px; }
select.inp { cursor: pointer; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%236B7A65'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; padding-right: 28px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }

/* ── BUTTONS ── */
.btn { display: inline-block; border: none; border-radius: 7px; padding: 9px 20px; cursor: pointer; font-family: 'Barlow Condensed', sans-serif; font-weight: 700; font-size: 14px; text-decoration: none; transition: all .15s; }
.btn-primary { background: #FD4C0F; color: #fff; box-shadow: 0 2px 5px rgba(253,76,15,.25); }
.btn-primary:hover { background: #e04009; }
.btn-success { background: #80CE3A; color: #1C2B1A; box-shadow: 0 2px 5px rgba(128,206,58,.25); }
.btn-success:hover { background: #6db830; }
.btn-dark { background: #006747; color: #fff; }
.btn-dark:hover { background: #005038; }
.btn-secondary { background: #F0F2EC; color: #6B7A65; border: 1px solid #E5E8E0; font-family: 'Barlow', sans-serif; font-size: 13px; }
.btn-secondary:hover { background: #E5E8E0; }
.btn-sm { padding: 5px 12px; font-size: 12px; border-radius: 5px; }
.btn-danger-sm { background: #FEE2D5; color: #C2390A; border: none; border-radius: 5px; padding: 5px 9px; cursor: pointer; font-size: 12px; }

/* ── DETAIL GRID ── */
.detail-grid { display: flex; gap: 18px; align-items: flex-start; }
.detail-main { flex: 1; min-width: 0; }
.detail-side { width: 265px; flex-shrink: 0; }
.info-cell { background: #F7F8F5; border-radius: 7px; padding: 9px 11px; border: 1px solid #EEF0EA; }
.info-key { color: #8A9A82; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; margin-bottom: 3px; }
.info-val { color: #1C2B1A; font-size: 13px; font-weight: 700; }

/* ── TIMELINE ── */
.tstep { display: flex; gap: 8px; margin-bottom: 6px; }
.tcircle { width: 22px; height: 22px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 9px; font-weight: 700; border: 2px solid; }
.tline { width: 2px; flex: 1; min-height: 8px; margin: 2px auto 0; }
.tstep-content { padding-bottom: 10px; }
.tstep-name { font-size: 11px; font-weight: 600; }
.tstep-meta { font-size: 10px; color: #6B7A65; margin-top: 1px; }
.tstep-nota { font-size: 10px; color: #94A3B8; font-style: italic; }

/* ── ACTION BOX ── */
.action-box { background: #F5FBF0; border: 1px solid #80CE3A; border-left: 4px solid #006747; border-radius: 10px; padding: 16px; margin-top: 12px; }
.action-title { font-family: 'Barlow Condensed', sans-serif; font-weight: 700; font-size: 15px; color: #006747; margin-bottom: 10px; }

/* ── COTIZACIÓN ── */
.cot-box { background: #EFF6FF; border: 1px solid #BFDBFE; border-radius: 9px; padding: 14px; margin-top: 12px; }
.cot-title { font-family: 'Barlow Condensed', sans-serif; font-weight: 700; font-size: 14px; color: #1D4ED8; margin-bottom: 8px; }

/* ── PERSONA CARD ── */
.persona-card { background: #F9FAF7; border: 1px solid #E5E8E0; border-radius: 7px; padding: 9px 12px; display: flex; align-items: center; gap: 9px; margin-top: 7px; }
.persona-avatar { width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-family: 'Barlow Condensed', sans-serif; font-weight: 800; font-size: 13px; flex-shrink: 0; }
.persona-name { font-weight: 700; font-size: 13px; color: #1C2B1A; }
.persona-role-lbl { font-size: 11px; color: #8A9A82; margin-top: 1px; }

/* ── SEARCH ── */
.search-wrap { position: relative; }
.sinp { background: #fff; border: 2px solid #D5D9CE; border-radius: 8px; padding: 9px 12px 9px 38px; color: #1C2B1A; width: 100%; font-family: 'Barlow', sans-serif; font-size: 13px; transition: all .15s; }
.sinp:focus { outline: none; border-color: #006747; box-shadow: 0 0 0 3px rgba(0,103,71,.08); }
.sicon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: #8A9A82; font-size: 14px; pointer-events: none; }
.sdrop { position: absolute; top: calc(100% + 3px); left: 0; right: 0; background: #fff; border: 1px solid #D5D9CE; border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.1); z-index: 400; max-height: 220px; overflow-y: auto; display: none; }
.sdrop.open { display: block; }
.sdrop-item { padding: 9px 13px; cursor: pointer; display: flex; align-items: center; gap: 9px; transition: background .1s; border-bottom: 1px solid #F0F2EC; text-decoration: none; color: inherit; }
.sdrop-item:hover { background: #F5F9F0; }
.sdrop-new { padding: 9px 13px; cursor: pointer; background: #F9FAF7; color: #374151; font-size: 12px; font-weight: 600; border-top: 1px solid #E5E8E0; }
.sdrop-new:hover { background: #EEF0EA; }

/* ── ITEM CARDS ── */
.item-card { background: #F9FAF7; border: 1px solid #E5E8E0; border-radius: 7px; padding: 10px 12px; margin-bottom: 7px; display: flex; align-items: center; gap: 10px; }
.item-card.is-new { background: #FFFBF0; border-color: #FDE68A; }
.qty-inp { background: #fff; border: 1px solid #D5D9CE; border-radius: 5px; padding: 5px 6px; width: 68px; text-align: center; font-family: 'Barlow Condensed', sans-serif; font-weight: 700; font-size: 14px; }
.qty-inp:focus { outline: none; border-color: #006747; }
.tag-new { font-size: 9px; padding: 1px 6px; border-radius: 4px; background: #FEF3C7; color: #92400E; font-weight: 700; border: 1px solid #FDE68A; margin-left: 5px; }

/* ── DISCIPLINE ICONS ── */
.disc-icon { border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }

/* ── INFO TIP ── */
.info-tip { background: #E8F5D8; border: 1px solid #86EFAC; border-radius: 8px; padding: 10px 14px; font-size: 12px; color: #166534; margin-bottom: 14px; }
.warn-tip { background: #FFFBF0; border: 1px solid #FDE68A; border-left: 3px solid #FD4C0F; border-radius: 8px; padding: 10px 14px; font-size: 12px; color: #92400E; margin-bottom: 12px; }

/* ── DONE BOX ── */
.done-box { background: #F0FBE8; border: 1px solid #86EFAC; border-radius: 9px; padding: 14px; text-align: center; color: #166534; font-family: 'Barlow Condensed', sans-serif; font-weight: 700; font-size: 16px; }

/* ── PRICE CHIP ── */
.price-chip { background: #E8F5D8; color: #166534; font-size: 10px; padding: 2px 8px; border-radius: 10px; font-weight: 600; white-space: nowrap; }

/* ── LOGIN ── */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #006747 0%, #004d35 100%); }
.login-box { background: #fff; border-radius: 14px; padding: 36px; width: 100%; max-width: 400px; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.login-logo { font-family: 'Barlow Condensed', sans-serif; font-weight: 800; font-size: 32px; color: #006747; letter-spacing: 1px; text-align: center; margin-bottom: 4px; }
.login-sub { text-align: center; color: #8A9A82; font-size: 13px; margin-bottom: 28px; }
.login-error { background: #FEF2F2; border: 1px solid #FCA5A5; border-radius: 7px; padding: 10px 14px; color: #DC2626; font-size: 13px; margin-bottom: 16px; }

/* ── TABLES ── */
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; padding: 9px 14px; color: #8A9A82; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; border-bottom: 2px solid #EEF0EA; background: #F9FAF7; }
.table td { padding: 10px 14px; border-bottom: 1px solid #EEF0EA; font-size: 13px; }
.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: #F9FAF7; }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .detail-grid { flex-direction: column; }
  .detail-side { width: 100%; }
  .grid2, .grid3 { grid-template-columns: 1fr; }
  .main { padding: 14px 12px; }
}
