/* ICICI COMPACT TOP BLOCKS TO MATCH IBKR */
header { padding: 18px 34px !important; }
h1 { font-size: 30px !important; }
.sub { margin-top: 5px !important; font-size: 13px !important; }
.container { padding: 22px 34px 36px !important; }
.dashboard-grid, .top-grid { display: grid !important; grid-template-columns: 360px repeat(3, minmax(210px, 1fr)) !important; gap: 14px !important; margin-bottom: 18px !important; align-items: stretch !important; }
.action-card, .connection-card, .card:first-child { min-height: 190px !important; padding: 18px !important; border-radius: 16px !important; }
.metric-column { min-height: 190px !important; }
.metric-card { min-height: 95px !important; padding: 12px 16px !important; }
.metric-label { font-size: 14px !important; margin-bottom: 8px !important; }
.metric-value, .value, .value-small { font-size: 24px !important; line-height: 1.1 !important; }
.card h2 { font-size: 14px !important; margin-bottom: 8px !important; }
button, .secondary-btn { padding: 10px 14px !important; font-size: 13px !important; margin-bottom: 10px !important; }
.status { font-size: 14px !important; margin-top: 8px !important; }
.action-card div[style], .connection-card p, .small { font-size: 12px !important; line-height: 1.35 !important; }
.charts-grid { gap: 14px !important; margin-bottom: 18px !important; }
.chart-card { min-height: 280px !important; padding: 16px !important; }
.chart-card h2 { font-size: 16px !important; margin-bottom: 10px !important; }
.chart-wrap { height: 220px !important; }
.table-card, .card:has(table) { padding: 16px !important; }
.table-card h2, .card:has(table) h2 { font-size: 20px !important; }
@media (max-width: 1100px) { .dashboard-grid, .top-grid, .charts-grid { grid-template-columns: 1fr !important; } .metric-column { min-height: unset !important; } }

/* ICICI HEADER FINAL ALIGNMENT TO MATCH IBKR */
.hamburger { display: none !important; }
header { padding: 18px 34px !important; gap: 0 !important; }
.title-block { margin-left: 0 !important; }
.title-block h1, h1 { font-size: 30px !important; margin-left: 0 !important; }
.sub { margin-left: 0 !important; }
.container { padding-top: 22px !important; }
.dashboard-grid, .top-grid { margin-top: 0 !important; }

/* RESTORE ICICI HAMBURGER */
.hamburger { display: inline-flex !important; align-items: center !important; justify-content: center !important; }
header { gap: 18px !important; }
.title-block { margin-left: 0 !important; }

/* ICICI HEADER HEIGHT REDUCE WHILE KEEPING HAMBURGER */
header { padding: 10px 34px !important; min-height: 70px !important; gap: 16px !important; align-items: center !important; }
.hamburger { display: inline-flex !important; align-items: center !important; justify-content: center !important; width: 42px !important; height: 42px !important; padding: 0 !important; font-size: 18px !important; flex-shrink: 0 !important; }
.title-block h1, h1 { font-size: 28px !important; line-height: 1.05 !important; margin: 0 !important; }
.title-block .sub, header .sub, .sub { font-size: 12px !important; margin-top: 4px !important; line-height: 1.2 !important; }
.container { padding-top: 14px !important; }
.dashboard-grid, .top-grid { margin-top: 0 !important; }

/* FORCE ICICI HEADER HEIGHT TO MATCH IBKR */
body > header { height: 72px !important; min-height: 72px !important; padding: 0 34px !important; display: flex !important; align-items: center !important; gap: 16px !important; box-sizing: border-box !important; }
body > header .hamburger { display: inline-flex !important; width: 40px !important; height: 40px !important; min-width: 40px !important; padding: 0 !important; align-items: center !important; justify-content: center !important; font-size: 18px !important; }
body > header .title-block h1 { font-size: 28px !important; line-height: 1 !important; margin: 0 !important; }
body > header .title-block .sub { font-size: 12px !important; line-height: 1.1 !important; margin-top: 4px !important; }
.container { padding-top: 12px !important; }
.dashboard-grid, .top-grid { margin-top: 0 !important; }

/* ICICI FINAL HEADER COMPRESSION */
body > header { height: 60px !important; min-height: 60px !important; padding: 0 34px !important; display: flex !important; align-items: center !important; gap: 14px !important; box-sizing: border-box !important; }
body > header .hamburger { display: inline-flex !important; width: 38px !important; height: 38px !important; min-width: 38px !important; padding: 0 !important; align-items: center !important; justify-content: center !important; font-size: 18px !important; }
body > header .title-block h1 { font-size: 27px !important; line-height: 1 !important; margin: 0 !important; }
body > header .title-block .sub { font-size: 11px !important; line-height: 1 !important; margin-top: 3px !important; }
.container { padding-top: 10px !important; }

/* HARD ICICI HEADER COMPRESSION */
html body header { height: 54p* !important; min-height: 54px !imp*rtant; max-height: 54px !important* padding: 0 34px !important; margi*: 0 !important; display: flex !imp*rtant; align-items: center !import*nt; gap: 14px !important; box-sizi*g: border-box !important; overflow* hidden !important; }
html body *eader .hamburger { display: inline*flex !important; width: 38px !impo*tant; height: 38px !important; min*width: 38px !important; padding: 0*!important; align-items: center !i*portant; justify-content: center !*mportant; font-size: 18px !importa*t; }
html body header .title-blo*k { margin: 0 !important; padding:*0 !important; }
html body header*.title-block h1 { font-size: 27px *important; line-height: 1 !importa*t; margin: 0 !important; padding: * !important; }
html body header *title-block .sub { font-size: 11px !important; line-height: 1 !important; margin-top: 3px !important; padding: 0 !important; }
.container { padding-top: 8px !important; }
.dashboard-grid, .top-grid { margin-top: 0 !important; }

/* FINAL ICICI HEADER COMPACT FIX */
body > header, header { height: 50px !important; min-height: 50px !important; max-height: 50px !important; padding: 0 30px !important; margin: 0 !important; display: flex !important; align-items: center !important; gap: 12px !important; overflow: hidden !important; box-sizing: border-box !important; }
.hamburger { display: inline-flex !important; width: 36px !important; height: 36px !important; min-width: 36px !important; padding: 0 !important; align-items: center !important; justify-content: center !important; font-size: 17px !important; }
.title-block h1, header h1 { font-size: 26px !important; line-height: 1 !important; margin: 0 !important; padding: 0 !important; }
.title-block .sub, header .sub, .sub { font-size: 10px !important; line-height: 1 !important; margin-top: 2px !important; padding: 0 !important; }
.container { padding-top: 6px !important; }
.top-grid { margin-top: 0 !important; }

/* ICICI CARD AREA COMPACT TO MATCH IBKR */
body .top-grid { display: grid !important; grid-template-columns: 345px repeat(3, minmax(210px, 1fr)) !important; grid-template-rows: 128px 128px !important; gap: 14px !important; margin: 0 0 14px 0 !important; align-items: stretch !important; }
body .top-grid > .card { min-height: 128px !important; height: 128px !important; padding: 12px 18px !important; border-radius: 16px !important; box-sizing: border-box !important; }
body .top-grid > .card:nth-child(1) { grid-column: 1 !important; grid-row: 1 / span 2 !important; height: 270px !important; min-height: 270px !important; padding: 16px 18px !important; }
body .top-grid > .card:nth-child(2) { grid-column: 2 !important; grid-row: 1 !important; }
body .top-grid > .card:nth-child(5) { grid-column: 2 !important; grid-row: 2 !important; }
body .top-grid > .card:nth-child(3) { grid-column: 3 !important; grid-row: 1 !important; }
body .top-grid > .card:nth-child(6) { grid-column: 3 !important; grid-row: 2 !important; }
body .top-grid > .card:nth-child(4) { grid-column: 4 !important; grid-row: 1 !important; }
body .top-grid > .card:nth-child(7) { grid-column: 4 !important; grid-row: 2 !important; }
body .top-grid .value, body .top-grid .value-small { font-size: 23px !important; line-height: 1.05 !important; }
body .top-grid .card h2 { font-size: 14px !important; margin: 0 0 6px 0 !important; line-height: 1.15 !important; }
body .top-grid button, body .top-grid .secondary-btn { padding: 9px 13px !important; font-size: 13px !important; margin-bottom: 8px !important; }
body .top-grid .status { font-size: 14px !important; margin-top: 8px !important; }
