:root{font-family:Montserrat,Arial,sans-serif;color:#142235;background:#f3f5f8;--blue:#106bd8;--blue-dark:#0757b5;--header:#5d5e60;--ink:#142235;--muted:#6f7883;--line:#8a8a8a;--white:#fff;--red:#d73535;--border:#d9e0e7}*{box-sizing:border-box}html{background:#f3f5f8}body{margin:0;min-height:100vh;background:#f3f5f8}a{color:var(--blue)}button,input,textarea{font:inherit}.site-header{background:var(--header);color:#fff}.header-inner{width:min(1080px,calc(100% - 40px));min-height:116px;margin:auto;display:flex;align-items:center;justify-content:space-between;gap:30px}.brand{display:flex;align-items:center;gap:10px;color:#fff;text-decoration:none}.brand-mark{position:relative;width:54px;height:58px;display:grid;place-items:center}.brand-mark i{position:absolute;top:0;left:0;right:0;height:6px;background:#0a83f5}.brand-mark b{font-size:38px;line-height:1;font-weight:400;letter-spacing:-9px;transform:translateX(-4px)}.brand-name{font-size:30px;font-weight:400;letter-spacing:-1px}.brand>strong{font-size:25px;color:#1284f4;font-weight:600;letter-spacing:.02em;margin-left:7px}nav{display:flex;align-items:center;gap:8px}nav a{color:#fff;text-decoration:none;padding:11px 16px;border-radius:8px;font-size:14px;font-weight:600}nav a:hover,nav a.active{background:#fff;color:var(--blue)}.menu-toggle{display:none;width:44px;height:44px;border:0;background:transparent;padding:9px}.menu-toggle span{display:block;height:2px;background:#fff;margin:6px 0;border-radius:3px}main{width:min(790px,calc(100% - 40px));margin:0 auto;padding:76px 0 60px}.eyebrow{font-size:18px;letter-spacing:.01em;margin:0 0 48px;color:var(--ink)}h1{font-size:48px;line-height:1.08;margin:0 0 20px;color:#000;letter-spacing:-1.3px}h2{font-size:27px;color:#000;margin:0}.total-billed{font-size:25px;margin:0;color:var(--ink)}.total-billed strong{font-weight:500}.new-invoice-button,.save-button,.export-button,.delete-invoice{width:100%;min-height:74px;border:0;border-radius:15px;display:flex;align-items:center;justify-content:center;text-decoration:none;font-size:25px;font-weight:500;cursor:pointer}.new-invoice-button,.save-button,.export-button{background:var(--blue);color:#fff}.new-invoice-button:hover,.save-button:hover,.export-button:hover{background:var(--blue-dark)}.new-invoice-button{margin:72px 0 78px}.history h2{margin-bottom:37px}.history-row{min-height:104px;border-top:2px dotted #676767;display:flex;align-items:center;justify-content:space-between;gap:20px;padding:18px 8px;color:var(--ink);text-decoration:none}.history-row:last-child{border-bottom:2px dotted #676767}.history-row>span{display:grid;gap:12px;min-width:0}.history-row strong{font-size:22px;color:#07578e;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.history-row small{font-size:20px;color:#000;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.history-row i{font-style:normal;font-size:42px;font-weight:300;color:#999}.history-row:hover strong{color:var(--blue)}.notice{padding:14px 16px;border:1px solid #b9dec7;border-radius:10px;background:#edf9f1;color:#187844;margin:0 0 26px}.empty{color:var(--muted);text-align:center;padding:28px}.back-link,.back{display:inline-flex;margin-bottom:30px;color:var(--blue);font-weight:600;text-decoration:none}.invoice-form-page h1{font-size:39px;margin-bottom:42px}.form-section{background:#fff;border:1px solid var(--border);border-radius:14px;padding:24px;margin:0 0 22px}.form-section h2{font-size:21px}.section-title{display:flex;align-items:center;justify-content:space-between;gap:15px;margin-bottom:21px}.form-section>h2{margin-bottom:21px}.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.form-grid .full{grid-column:1/-1}label{display:grid;gap:8px;font-size:13px;font-weight:700;color:#34445a}input,textarea{width:100%;border:1px solid #c5d0db;border-radius:9px;background:#fff;color:var(--ink);padding:13px;font-size:16px;outline:0}input:focus,textarea:focus{border-color:var(--blue);box-shadow:0 0 0 3px rgba(16,107,216,.13)}textarea{resize:vertical}.field-help,.form-note{font-size:12px;color:var(--muted);margin:7px 0 0}.autocomplete{position:relative}.suggestions{position:absolute;z-index:30;left:0;right:0;top:70px;background:#fff;border:1px solid var(--border);border-radius:10px;box-shadow:0 14px 30px rgba(20,40,60,.17);overflow:auto;max-height:300px}.suggestion{width:100%;min-height:48px;padding:11px 13px;border:0;border-bottom:1px solid var(--border);background:#fff;color:var(--ink);text-align:left}.suggestion:hover{background:#eef6ff}.remove-service{border:0;background:transparent;color:var(--red);font-size:13px;font-weight:600;cursor:pointer}.add-service{width:100%;min-height:52px;border:1px dashed var(--blue);border-radius:10px;background:#eef6ff;color:var(--blue);font-weight:700;margin-bottom:22px;cursor:pointer}.save-button{margin-top:4px}.edit-actions{display:grid;grid-template-columns:1fr auto;gap:12px;margin-top:22px}.download-link{min-height:74px;padding:0 24px;border:1px solid var(--blue);border-radius:15px;display:flex;align-items:center;justify-content:center;color:var(--blue);font-weight:700;text-decoration:none}.delete-invoice-form{margin-top:18px}.delete-invoice{background:var(--red);color:#fff}.delete-invoice:hover{background:#b82727}.page-title{display:flex;align-items:flex-end;justify-content:space-between;gap:20px;margin-bottom:28px}.page-title h1{font-size:42px;margin:0 0 8px}.page-title .eyebrow{font-size:15px;margin-bottom:20px}.lead{color:var(--muted);margin:0;line-height:1.5}.round-add{width:52px;height:52px;border-radius:12px;background:var(--blue);color:#fff;text-decoration:none;display:grid;place-items:center;font-size:30px}.search-bar{display:flex;gap:10px;margin:25px 0}.search-bar input{flex:1}.search-bar button,.contact-card button:not(.danger),.login button{border:0;border-radius:9px;background:var(--blue);color:#fff;padding:12px 18px;font-weight:700}.contact-list{background:transparent}.contact-row{min-height:82px;border-top:2px dotted #777;display:flex;align-items:center;gap:14px;padding:14px 8px;color:var(--ink);text-decoration:none}.contact-row:last-child{border-bottom:2px dotted #777}.contact-avatar{width:43px;height:43px;border-radius:50%;background:#e4f1ff;color:var(--blue);display:grid;place-items:center;font-weight:700;flex:0 0 auto}.contact-avatar.large{width:76px;height:76px;font-size:28px;margin:0 auto}.contact-data{display:grid;gap:6px;flex:1;min-width:0}.contact-data strong{font-size:18px;color:#07578e}.contact-data small{font-size:14px;color:var(--muted)}.chevron{font-size:34px;color:#999}.contact-card{background:#fff;border:1px solid var(--border);border-radius:14px;padding:25px}.contact-card>h1{text-align:center;font-size:31px;margin:12px 0 28px}.contact-card form{display:grid;gap:17px}.delete-form{margin-top:24px}.danger{width:100%;border:0;border-radius:9px;background:#fff0f0;color:var(--red);padding:13px;font-weight:700}.flash-wrap{padding-bottom:0}.flash,.error{color:#b52929;text-align:center}.flash{padding:13px;background:#fff0f0;border-radius:10px}.login{max-width:430px;background:#fff;border:1px solid var(--border);border-radius:14px;padding:28px}.login h1{font-size:34px;text-align:center}.login form{display:grid;gap:17px}.link{border:0;background:transparent;color:#6a7480;cursor:pointer}footer{text-align:center;padding:0 20px 30px}
@media(max-width:760px){.header-inner{width:calc(100% - 30px);min-height:84px}.brand-mark{width:39px;height:44px}.brand-mark i{height:5px}.brand-mark b{font-size:29px}.brand-name{font-size:22px}.brand>strong{font-size:18px;margin-left:3px}.menu-toggle{display:block}.site-header nav{display:none;position:absolute;top:84px;left:0;right:0;background:var(--header);padding:8px 15px 16px;border-top:1px solid rgba(255,255,255,.18)}.site-header nav.open{display:grid}.site-header nav a{padding:13px 12px}.eyebrow{font-size:15px;margin-bottom:38px}h1{font-size:40px}.total-billed{font-size:21px}.new-invoice-button{margin:58px 0 64px;min-height:66px;font-size:22px}.history h2{font-size:25px}.history-row{min-height:94px}.history-row strong{font-size:19px}.history-row small{font-size:17px}.form-grid{grid-template-columns:1fr}.form-grid .full{grid-column:auto}.edit-actions{grid-template-columns:1fr}.download-link{min-height:62px}.export-button,.delete-invoice,.save-button{min-height:64px;font-size:21px}}
@media(max-width:480px){main{width:calc(100% - 30px);padding:48px 0 44px}.header-inner{width:calc(100% - 24px)}.brand{gap:7px}.brand-name{font-size:20px}.brand>strong{font-size:16px}.invoice-form-page h1,.page-title h1{font-size:32px}.form-section{padding:17px;margin-bottom:16px}.new-invoice-button{border-radius:13px}.history-row{padding-left:0;padding-right:0}.page-title{align-items:center}.search-bar{display:grid}.search-bar button{width:100%}.contact-card{padding:18px}}
.site-header{background:#07111f}.site-header nav{background:#07111f}.site-header nav a,.site-header nav a:hover,.site-header nav a.active{color:#fff}.site-header nav a:hover,.site-header nav a.active{background:#123b68}.brand img{display:block;width:auto;height:58px}@media(max-width:760px){.brand img{height:44px}}
.form-grid>*{min-width:0}.form-grid input[type=date]{display:block;width:100%;min-width:0;max-width:100%;box-sizing:border-box;-webkit-appearance:none;appearance:none;min-height:48px}.pdf-view-page{width:min(1080px,calc(100% - 40px));padding-top:42px}.pdf-view-toolbar{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:20px}.pdf-view-toolbar .back-link{margin:0}.pdf-download{display:inline-flex;align-items:center;justify-content:center;min-height:46px;padding:0 18px;border:1px solid var(--blue);border-radius:10px;color:var(--blue);font-weight:700;text-decoration:none;background:#fff}.pdf-frame{display:block;width:100%;height:calc(100vh - 250px);min-height:620px;border:1px solid var(--border);border-radius:14px;background:#fff}@media(max-width:760px){.pdf-view-page{width:calc(100% - 24px);padding-top:24px}.pdf-view-toolbar{align-items:stretch;flex-direction:column}.pdf-view-toolbar .back-link,.pdf-download{min-height:48px;margin:0;align-items:center;justify-content:center}.pdf-frame{height:calc(100vh - 280px);min-height:520px;border-radius:10px}}
.pdf-view-toolbar{justify-content:flex-start}.pdf-view-toolbar .back-link{display:inline-flex;padding:0 18px;border:1px solid var(--blue);border-radius:10px;background:#fff}@media(max-width:760px){.pdf-view-toolbar .back-link{width:100%}.pdf-frame{width:100%;height:auto;min-height:0;aspect-ratio:210/297;max-height:none;overflow:auto}}
.pdf-view-toolbar,.pdf-canvas-wrap{width:100%;max-width:100%}.pdf-view-toolbar .back-link{width:100%;min-height:64px;align-items:center;justify-content:center;font-size:20px}.pdf-canvas-wrap{position:relative;overflow:hidden;border:1px solid var(--border);border-radius:14px;background:#fff}.pdf-canvas-wrap canvas{display:block;width:100%;max-width:100%;height:auto}.pdf-loading{margin:0;padding:28px;text-align:center;color:var(--muted)}@media(max-width:760px){.pdf-view-page{width:calc(100% - 30px)}.pdf-view-toolbar .back-link{min-height:60px;font-size:18px}.pdf-canvas-wrap{border-radius:10px}.pdf-loading{padding:22px 12px}}
select{font:inherit}.contact-card select{width:100%;border:1px solid #c5d0db;border-radius:9px;background:#fff;color:var(--ink);padding:13px;font-size:16px;outline:0}.contact-card select:focus{border-color:var(--blue);box-shadow:0 0 0 3px rgba(16,107,216,.13)}

/* V6.0 — Dashboard / Estadísticas */
.stats-page{width:min(1080px,calc(100% - 40px));padding-top:54px}.stats-heading{display:flex;align-items:flex-end;justify-content:space-between;gap:24px;margin-bottom:28px}.stats-heading .eyebrow{margin-bottom:18px;font-size:15px}.stats-heading h1{margin-bottom:8px}.today-card{background:#fff;border:1px solid var(--border);border-radius:13px;padding:13px 18px;display:grid;gap:3px;min-width:170px}.today-card span{font-size:13px;color:var(--muted)}.today-card strong{font-size:15px}.metric-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-bottom:18px}.metric-card{background:#fff;border:1px solid var(--border);border-radius:15px;padding:18px;display:flex;gap:14px;align-items:flex-start;min-width:0;box-shadow:0 5px 18px rgba(20,40,60,.035)}.metric-card>div:last-child{min-width:0;display:grid;gap:6px}.metric-card span{font-size:14px;font-weight:600;color:#111827}.metric-card strong{font-size:24px;line-height:1.1;color:#0c1422;white-space:nowrap}.metric-card small{font-size:12px;color:var(--muted);line-height:1.35}.metric-icon{width:44px;height:44px;border-radius:11px;display:grid;place-items:center;color:#fff;font-size:21px;font-weight:700;flex:0 0 auto}.metric-icon.blue{background:#2f91ed}.metric-icon.green{background:#37b76d}.metric-icon.orange{background:#ff9d3c}.metric-icon.violet{background:#7258ea}.stats-card{background:#fff;border:1px solid var(--border);border-radius:15px;padding:22px;margin-bottom:18px;box-shadow:0 5px 18px rgba(20,40,60,.03)}.stats-card h2{font-size:21px}.stats-card-title{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:20px}.stats-card-title select{border:1px solid var(--border);border-radius:9px;background:#f8fafc;padding:9px 32px 9px 12px;color:var(--ink)}.stats-card-title a{color:var(--blue);text-decoration:none;font-weight:600;font-size:14px}.bar-chart{height:270px;display:grid;grid-template-columns:repeat(12,minmax(0,1fr));gap:8px;align-items:end;padding-top:28px}.bar-col{height:100%;display:grid;grid-template-rows:22px 1fr 22px;gap:5px;text-align:center;min-width:0}.bar-value{font-size:10px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.bar-track{height:100%;display:flex;align-items:flex-end;border-bottom:1px solid #d8e0e8;background:linear-gradient(to top,rgba(224,230,237,.35) 1px,transparent 1px);background-size:100% 25%}.bar-fill{width:72%;margin:0 auto;background:#a9cef8;border-radius:5px 5px 0 0;min-height:3px}.bar-fill.current{background:#2f91ed}.bar-col>span{font-size:12px;color:#536176}.semester-card h2{margin-bottom:22px}.semester-bars{height:260px;display:flex;justify-content:center;align-items:stretch;gap:70px}.semester-item{width:min(220px,36%);display:grid;grid-template-rows:25px 1fr 48px;text-align:center;gap:6px}.semester-item>strong{font-size:15px}.semester-track{display:flex;align-items:flex-end;border-bottom:1px solid #cfd8e3}.semester-fill{width:70%;margin:0 auto;border-radius:5px 5px 0 0;min-height:4px}.semester-fill.previous{background:#ff9d3c}.semester-fill.current{background:#37b76d}.semester-item>span{font-size:13px;line-height:1.3}.semester-item small{display:block;color:var(--muted);font-size:11px}.latest-list{border-top:1px solid var(--border)}.latest-row{display:grid;grid-template-columns:90px minmax(0,1fr) 120px 105px 18px;gap:12px;align-items:center;min-height:58px;border-bottom:1px solid var(--border);color:var(--ink);text-decoration:none}.latest-row strong{color:#07578e}.latest-row i{font-style:normal;font-size:28px;color:#999}.latest-client{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.status-badge{display:inline-flex;align-items:center;justify-content:center;width:max-content;border-radius:999px;padding:6px 10px;font-size:12px;font-style:normal;font-weight:700}.status-badge.paid{background:#dcf7e7;color:#15803d}.status-badge.pending{background:#fff0d8;color:#a65300}.payment-panel{margin-top:22px;background:#fff;border:1px solid var(--border);border-radius:14px;padding:18px;display:flex;align-items:center;justify-content:space-between;gap:16px}.payment-panel>div{display:flex;align-items:center;gap:12px}.payment-panel>div>span{font-weight:700}.payment-toggle{border:0;border-radius:10px;background:#1f9d55;color:#fff;padding:12px 16px;font-weight:700;cursor:pointer}.payment-toggle.undo{background:#fff0d8;color:#8a4b00}.invoice-home .eyebrow{margin-bottom:48px}
@media(max-width:900px){.metric-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.metric-card strong{font-size:23px}.latest-row{grid-template-columns:75px minmax(0,1fr) 105px 95px 15px}}
@media(max-width:760px){.stats-page{width:calc(100% - 30px);padding-top:42px}.stats-heading{align-items:flex-start}.stats-heading h1{font-size:36px}.today-card{display:none}.metric-grid{gap:12px}.metric-card{padding:14px;gap:11px}.metric-icon{width:39px;height:39px;font-size:18px}.metric-card span{font-size:12px}.metric-card strong{font-size:19px}.metric-card small{font-size:11px}.stats-card{padding:17px}.stats-card h2{font-size:18px}.bar-chart{height:225px;gap:4px;overflow-x:auto}.bar-col{min-width:34px}.bar-value{display:none}.semester-bars{height:230px;gap:32px}.semester-item{width:40%}.latest-row{grid-template-columns:66px minmax(0,1fr) auto 16px;gap:8px;min-height:64px}.latest-row>span:nth-of-type(2){display:none}.latest-row .status-badge{font-size:10px;padding:5px 8px}.payment-panel{align-items:stretch;flex-direction:column}.payment-panel>div{justify-content:space-between}.payment-toggle{width:100%;min-height:48px}}
@media(max-width:480px){.stats-page{width:calc(100% - 24px);padding-top:34px}.stats-heading .eyebrow{margin-bottom:14px}.stats-heading h1{font-size:32px}.metric-grid{grid-template-columns:1fr 1fr}.metric-card{display:grid;grid-template-columns:36px minmax(0,1fr);padding:12px}.metric-icon{width:36px;height:36px}.metric-card strong{font-size:17px;white-space:normal}.stats-card{padding:14px}.stats-card-title{margin-bottom:14px}.stats-card-title h2{font-size:17px}.semester-bars{gap:18px}.semester-item{width:44%}.latest-row{grid-template-columns:60px minmax(0,1fr) 78px 12px}.latest-row .status-badge{display:none}}

/* V6.1 preview — unified light dashboard language across Manager */
main:not(.stats-page):not(.pdf-view-page){width:min(960px,calc(100% - 40px));padding-top:54px}
.page-title,.invoice-form-page>h1,.history h2{letter-spacing:-.02em}
.page-title{align-items:center;margin-bottom:22px}.page-title h1{font-size:38px}.page-title .eyebrow{margin-bottom:10px;color:#718096;font-size:12px;font-weight:700;letter-spacing:.08em}.lead{font-size:14px}
.round-add{border-radius:14px;box-shadow:0 7px 18px rgba(16,107,216,.16)}
.search-bar{background:#fff;border:1px solid var(--border);border-radius:15px;padding:10px;margin:18px 0 20px;box-shadow:0 5px 18px rgba(20,40,60,.035)}.search-bar input{border:0;background:#f7f9fb}.search-bar input:focus{box-shadow:none;background:#fff}
.contact-list,.history{display:grid;gap:10px}.contact-row,.history-row{border:1px solid var(--border)!important;background:#fff;border-radius:15px;min-height:76px;padding:14px 16px;box-shadow:0 5px 18px rgba(20,40,60,.035)}.contact-row:hover,.history-row:hover{border-color:#bdd5ee!important;box-shadow:0 7px 22px rgba(20,40,60,.07)}.contact-data strong,.history-row strong{color:#162438;font-size:17px}.contact-data small,.history-row small{color:var(--muted);font-size:13px}.contact-avatar{width:40px;height:40px}.chevron,.history-row i{font-size:28px;color:#a6afb9}
.contact-card,.form-section,.login{border-radius:16px;box-shadow:0 5px 18px rgba(20,40,60,.035);border-color:#e1e6ec}.contact-card{max-width:760px;margin:0 auto;padding:28px}.contact-card>h1{font-size:27px}.contact-avatar.large{background:#edf5ff}
.invoice-form-page .eyebrow{margin-bottom:12px;color:#718096;font-size:12px;font-weight:700;letter-spacing:.08em}.invoice-form-page h1{font-size:38px;margin-bottom:26px}.back-link{margin-bottom:24px;font-size:14px}.form-section{padding:22px;margin-bottom:14px}.form-section h2{font-size:18px}.section-title,.form-section>h2{margin-bottom:16px}label{font-size:12px;color:#4a596c}input,textarea{border-color:#d7dee6;background:#fbfcfd;min-height:46px}.add-service{border:1px solid #c9def5;background:#f3f8fe;border-radius:13px}.save-button,.export-button,.delete-invoice,.download-link{min-height:58px;border-radius:13px;font-size:17px}.edit-actions{margin-top:14px}.delete-invoice-form{margin-top:12px}.payment-panel{border-radius:15px;box-shadow:0 5px 18px rgba(20,40,60,.035)}
.new-invoice-button{min-height:60px;border-radius:14px;font-size:18px;margin:26px 0 32px;box-shadow:0 7px 18px rgba(16,107,216,.14)}.total-billed{font-size:18px}.eyebrow{margin-bottom:22px}.history h2{font-size:23px;margin-bottom:14px}
.notice{border-radius:13px}.login{margin-top:54px}.login h1{font-size:30px}.login button{min-height:48px;border-radius:12px}
footer{color:#7b8794}
@media(max-width:760px){main:not(.stats-page):not(.pdf-view-page){width:calc(100% - 24px);padding-top:30px}.page-title h1,.invoice-form-page h1{font-size:30px}.page-title{margin-bottom:16px}.round-add{width:46px;height:46px}.search-bar{margin:14px 0 16px;padding:7px}.contact-row,.history-row{min-height:70px;padding:12px 13px}.contact-data strong,.history-row strong{font-size:16px}.contact-data small,.history-row small{font-size:12px}.contact-card{padding:18px}.form-section{padding:16px}.new-invoice-button{margin:20px 0 26px;min-height:56px;font-size:17px}.history h2{font-size:21px}.invoice-form-page .eyebrow{margin-bottom:9px}.invoice-form-page h1{margin-bottom:20px}.save-button,.export-button,.delete-invoice,.download-link{min-height:56px;font-size:17px}}


/* V6.2 preview — invoice list aligned with Estadísticas */
.invoice-home .history{display:block;background:#fff;border:1px solid var(--border);border-radius:15px;padding:0 22px;box-shadow:0 5px 18px rgba(20,40,60,.03)}
.invoice-home .history h2{padding:22px 0 16px;margin:0;border-bottom:1px solid var(--border)}
.invoice-home .history-row{display:grid;grid-template-columns:110px minmax(0,1fr) 24px;gap:22px;align-items:center;min-height:64px;margin:0;padding:0;border:0!important;border-bottom:1px solid var(--border)!important;border-radius:0;box-shadow:none;background:#fff}
.invoice-home .history-row:last-child{border-bottom:0!important}
.invoice-home .history-row strong{font-size:18px;color:#07578e;white-space:nowrap}
.invoice-home .history-client{font-size:17px;color:var(--ink);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.invoice-home .history-row i{justify-self:end;font-size:30px;color:#999}
.invoice-home .history-row:hover{border-color:var(--border)!important;box-shadow:none}
.invoice-home .new-invoice-button{margin-top:22px}
@media(max-width:760px){.invoice-home .history{padding:0 14px}.invoice-home .history h2{padding:18px 0 12px}.invoice-home .history-row{grid-template-columns:88px minmax(0,1fr) 18px;gap:10px;min-height:64px}.invoice-home .history-row strong{font-size:17px}.invoice-home .history-client{font-size:17px}.invoice-home .history-row i{justify-self:end}}
@media(max-width:480px){.invoice-home .history-row{grid-template-columns:76px minmax(0,1fr) 18px}.invoice-home .history{padding:0 12px}}
.stats-page .latest-row i{justify-self:end}

/* V6.3 preview — historial idéntico a Últimas facturas */
.invoice-home .history-row strong{color:#07578e!important}
@media(max-width:760px){
  .invoice-home .history-row{grid-template-columns:66px minmax(0,1fr) 16px;gap:8px}
}
@media(max-width:480px){
  .invoice-home .history-row{grid-template-columns:60px minmax(0,1fr) 12px;gap:8px}
}


/* V6.4 invoices history mirrors latest invoices in statistics */
.invoice-home .history{padding:22px;display:block}
.invoice-home .history h2{margin:0 0 20px;padding:0;border:0}
.invoice-home .history .latest-list{border-top:1px solid var(--border)}
.invoice-home .history .latest-row{display:grid;grid-template-columns:90px minmax(0,1fr) 120px 105px 18px;gap:12px;align-items:center;min-height:58px;border-bottom:1px solid var(--border)!important;color:var(--ink);text-decoration:none;padding:0;margin:0;border-radius:0;box-shadow:none;background:#fff}
.invoice-home .history .latest-row strong{font-size:18px;color:#07578e!important;white-space:nowrap}
.invoice-home .history .latest-client{font-size:17px;color:var(--ink);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.invoice-home .history .latest-row i{justify-self:end;font-style:normal;font-size:28px;color:#999}
.invoice-home .history .latest-row:hover{border-color:var(--border)!important;box-shadow:none}
@media(max-width:900px){.invoice-home .history .latest-row{grid-template-columns:75px minmax(0,1fr) 105px 95px 15px}}
@media(max-width:760px){.invoice-home .history{padding:17px}.invoice-home .history h2{margin-bottom:14px}.invoice-home .history .latest-row{grid-template-columns:66px minmax(0,1fr) auto 16px;gap:8px;min-height:64px}.invoice-home .history .latest-row>span:nth-of-type(2){display:none}.invoice-home .history .latest-row .status-badge{font-size:10px;padding:5px 8px}}
@media(max-width:480px){.invoice-home .history{padding:14px}.invoice-home .history .latest-row{grid-template-columns:60px minmax(0,1fr) 78px 12px}.invoice-home .history .latest-row .status-badge{display:none}}


/* V6.5 logout moved into the top navigation */
#main-nav .nav-logout{margin:0 0 0 12px;padding-left:16px;border-left:1px solid rgba(255,255,255,.32);display:flex;align-items:center}
#main-nav .nav-logout button{border:0;background:transparent;color:#fff;padding:11px 16px;border-radius:8px;font:inherit;font-size:14px;font-weight:600;cursor:pointer}
#main-nav .nav-logout button:hover{background:#fff;color:var(--blue)}
footer{min-height:20px;padding:0}
@media(max-width:760px){
  #main-nav .nav-logout{margin:8px 0 0;padding:12px 0 0;border-left:0;border-top:1px solid rgba(255,255,255,.28)}
  #main-nav .nav-logout button{width:100%;text-align:left;padding:13px 12px}
}
