*{box-sizing:border-box}
html,body{min-height:100%}
body{margin:0;font-family:Arial,Helvetica,sans-serif;background:#fff;color:#17324d}
.topbar{height:140px;border-bottom:1px solid #d9e0e7;display:flex;align-items:flex-start;padding:15px 3.5%;gap:20px;background:#fff}
.ip-logo{width:82px;height:64px;display:flex;align-items:center;justify-content:center;overflow:hidden}
.ip-logo img{display:block;width:82px;height:64px;object-fit:contain}
.top-title{flex:1}.tool-title{font-size:31px;font-weight:800;color:#287fdc;margin:5px 0 25px}
.meta{color:#7c2ed4;font-size:13px;line-height:1.8}.clock{font-size:25px;color:#0877e8;font-weight:800;padding-top:2px;min-width:130px;text-align:right}
.layout{display:flex;min-height:calc(100vh - 140px)}
.sidebar{width:205px;border-right:1px solid #d5dde5;padding:14px 10px;background:#fff}
/* Alternate sidebar colour requested earlier; page/action buttons retain their individual colours. */
.navbtn{display:block;background:#00843d;color:#fff;text-decoration:none;font-weight:700;padding:14px 14px;margin-bottom:6px;border-radius:0;font-size:14px}
.navbtn:hover,.navbtn.active{background:#006b31}
.main{flex:1;padding:14px 20px;min-width:0;background:#fff}
.ticker{height:31px;border:1px solid #cbd8e4;background:#f4f8fc;text-align:center;color:#1769b6;font-size:12px;font-weight:700;padding:7px;margin-bottom:28px;white-space:nowrap;overflow:hidden}
.page-title{font-size:28px;margin:0 0 22px;color:#203c58}
.panelbox{border:1px solid #c8d1da;margin-bottom:18px;padding:8px;background:#fff}.panelbox legend{font-size:12px;padding:0 4px}
.toolbar{display:flex;gap:16px;align-items:center;flex-wrap:wrap;padding:7px}.toolbar label{font-size:13px}.field{display:flex;align-items:center;gap:8px}.field input,.field select{height:29px;border:1px solid #c7d1db;padding:4px 8px;background:#fff;color:#17324d}
.btn{border:0;padding:10px 28px;color:#fff;font-weight:700;cursor:pointer;font-size:13px;display:inline-flex;align-items:center;justify-content:center;text-decoration:none;min-height:34px;border-radius:0}.btn:hover{filter:brightness(.94)}button.btn{font-family:inherit}
.green{background:#2eb51a}.blue{background:#2f83db}.red{background:#f03}.orange{background:#ff7016}.purple{background:#9b4fc1}.gray{background:#888}
.actionbar{display:flex;gap:8px;justify-content:center;flex-wrap:wrap;margin:16px 0}
.data-table{width:100%;border-collapse:collapse}.data-table th{font-size:12px;color:#1c2f43;padding:9px 7px;border-bottom:1px solid #ccd5de}.data-table td{font-size:12px;padding:9px 7px;text-align:center;border-bottom:0}.data-table tr[onclick]{cursor:pointer}.data-table tr[onclick]:hover{background:#f4f8fc}
.data-scroll{height:330px;overflow:auto;border:1px solid #cfd8e0}
.stats{display:grid;grid-template-columns:repeat(4,1fr);gap:14px}.stat{border:1px solid #bdc8d3;height:136px;padding:0 12px;position:relative;background:#fff}.stat legend{font-size:12px}.stat-icon{text-align:center;font-size:30px;margin:14px 0 3px}.stat-num{text-align:center;font-size:27px;font-weight:800}.stat-link{display:block;color:inherit;text-decoration:none}.stat-link fieldset{cursor:pointer;transition:transform .12s ease,box-shadow .12s ease}.stat-link:hover fieldset{transform:translateY(-2px);box-shadow:0 3px 10px rgba(0,0,0,.12)}
.activity{height:330px;border:1px solid #c8d1da;overflow:auto;padding:12px 18px;font-family:Consolas,monospace;font-size:13px;white-space:pre-line;background:#fff}.formrow{display:grid;grid-template-columns:repeat(4,1fr);gap:20px;margin-bottom:10px}.formrow.two{grid-template-columns:repeat(2,1fr)}
.formgroup label{display:block;font-size:12px;margin-bottom:5px}.formgroup input,.formgroup select,.formgroup textarea{width:100%;height:29px;border:1px solid #c5d0da;padding:5px 8px;background:#fff;color:#17324d}.formgroup textarea{height:80px}.formgroup input[readonly]{background:#eef3f7}
.searchrow{display:flex;gap:8px;align-items:center;margin:12px 0}.searchrow input{height:28px}.totalbar{display:flex;justify-content:space-between;font-weight:700;padding:10px 18px}.footer{text-align:center;color:#1671c8;font-size:12px;font-weight:700;padding:16px}
/* Shared application layout: all pages use the same header and India Post-red sidebar. */
.subpage{min-height:100vh;background:#fff;padding:12px 16px}.subpage-main{width:100%;padding-top:18px}.back-dashboard{display:inline-block;background:#888;color:#fff;text-decoration:none;padding:8px 13px;font-size:13px;margin-bottom:20px}.back-dashboard:hover{background:#666}
.notice{padding:10px 14px;background:#eef7ff;border:1px solid #b8d9f5;margin-bottom:15px}.error{padding:10px 14px;background:#fff1f1;border:1px solid #f0b0b0;color:#a00;margin-bottom:15px}.muted{color:#607080}.grid2{display:grid;grid-template-columns:1fr 1fr;gap:14px}.backup-storage-info{border:1px solid #c8d1da;margin-bottom:18px;padding:8px;background:#fff}.backup-info{font-size:13px;line-height:1.55}.backup-steps{margin-top:12px;padding:10px;background:#f4f8fc;border:1px solid #cbd8e4}.backup-note{margin-top:12px;padding:10px;background:#fff8e8;border:1px solid #ead39b}
/* Theme */
body.theme-dark{background:#121820;color:#e8eef4}.theme-dark .subpage,.theme-dark .main,.theme-dark .topbar,.theme-dark .sidebar,.theme-dark .panelbox,.theme-dark .stat,.theme-dark .activity,.theme-dark .ticker,.theme-dark .backup-storage-info{background:#1b2530;color:#e8eef4;border-color:#465566}.theme-dark .layout{background:#121820}.theme-dark .sidebar{border-right-color:#465566}.theme-dark .page-title,.theme-dark .data-table th,.theme-dark .data-table td,.theme-dark .panelbox legend,.theme-dark label,.theme-dark .field{color:#e8eef4}.theme-dark .field input,.theme-dark .field select,.theme-dark .formgroup input,.theme-dark .formgroup select,.theme-dark .formgroup textarea{background:#202c38;color:#f1f6fa;border-color:#465565}.theme-dark .formgroup input[readonly]{background:#273542;color:#dfe9f1}.theme-dark .ticker{background:#202c38;color:#83c4ff}.theme-dark .activity{color:#dce8f5}.theme-light .navbtn{background:#00843d}.theme-light .navbtn:hover,.theme-light .navbtn.active{background:#006b31}.theme-dark .navbtn{background:#c8102e}.theme-dark .navbtn:hover,.theme-dark .navbtn.active{background:#8f0d20}.theme-dark .back-dashboard{background:#59636d}.theme-dark .data-table tr[onclick]:hover{background:#24313e}.theme-dark .notice{background:#19354a;border-color:#315f7e;color:#e9f5ff}.theme-dark .backup-steps{background:#202c38;border-color:#465565}.theme-dark .backup-note{background:#40371f;border-color:#6d5d2e;color:#f8edbd}.theme-dark .muted{color:#b8c6d3}.theme-dark .footer{color:#83c4ff}
.theme-switch{display:flex;gap:10px;flex-wrap:wrap;margin-top:4px}.theme-option{display:inline-flex;align-items:center;gap:7px;border:1px solid #c5d0da;padding:9px 14px;cursor:pointer;background:#fff;color:#17324d;font-weight:700;min-width:105px;justify-content:center}.theme-option input{margin:0;width:auto;height:auto}.theme-option:has(input:checked){border-color:#287fdc;box-shadow:0 0 0 1px #287fdc inset}.theme-help{display:block;margin-top:8px;color:#607080;line-height:1.5}.theme-dark .theme-option{background:#202c38;color:#edf4fa;border-color:#465565}.theme-dark .theme-option:has(input:checked){border-color:#83c4ff;box-shadow:0 0 0 1px #83c4ff inset}.theme-dark .theme-help{color:#b8c6d3}
@media(max-width:1000px){.stats{grid-template-columns:repeat(2,1fr)}.formrow,.formrow.two{grid-template-columns:1fr 1fr}.sidebar{width:180px}.grid2{grid-template-columns:1fr}}
@media(max-width:700px){.topbar{height:auto}.tool-title{font-size:22px}.clock{display:none}.layout{display:block}.sidebar{width:100%;display:flex;flex-wrap:wrap;gap:5px}.navbtn{margin:0;flex:1 1 45%}.main{padding:10px}.formrow,.formrow.two,.stats{grid-template-columns:1fr}.ticker{font-size:10px}.data-scroll{height:280px}.subpage{padding:10px}}

/* Final dashboard presentation fixes */
.clock-wrap{min-width:180px;text-align:right;padding-top:2px}.clock-wrap .clock{padding-top:0;min-width:0}.date-day{font-size:13px;color:#0877e8;font-weight:700;margin-top:26px;white-space:nowrap}.theme-dark .date-day{color:#83c4ff}
.stat{cursor:default}.stat fieldset,.stat-link fieldset{cursor:default}.stat:hover{box-shadow:none;transform:none}.stat-link:hover fieldset{transform:none;box-shadow:none}
.theme-dark .stat-num{color:#f1f6fa}.theme-dark .stat-icon{filter:none}

/* Daily Issue: dropdown-style time and holiday marker layout */
.issue-top-row{grid-template-columns:1fr 1fr 1.25fr 1fr;align-items:start}
.issue-fields-row{grid-template-columns:1fr 1fr .72fr .95fr .95fr .9fr .9fr .9fr;gap:14px}
.time-group .time-selects{display:flex;align-items:center;gap:4px;height:29px}
.time-group .time-selects select{width:46px;height:29px;padding:3px 4px}
.time-group .time-selects span{font-weight:700;color:#17324d}
.holiday-box{padding-top:1px;min-height:95px}
.holiday-main,.holiday-sub{display:flex!important;align-items:center;gap:6px;margin:0 0 7px!important;font-size:13px!important}
.holiday-main input,.holiday-sub input[type=checkbox]{width:auto!important;height:auto!important;margin:0}
.holiday-sub{color:#17324d}
.holiday-sub input:disabled + span{color:#c7c7c7}
.holiday-sub input[type=text],.holiday-sub input:not([type]){height:28px!important;width:180px!important;margin-left:4px}
#issueHolidayName{height:28px;width:180px;margin-left:4px}
.theme-dark .time-group .time-selects span,.theme-dark .holiday-sub{color:#e8eef4}
.theme-dark .holiday-sub input:disabled + span{color:#7d8894}
@media(max-width:1200px){.issue-fields-row{grid-template-columns:repeat(4,1fr)}}
@media(max-width:700px){.issue-top-row,.issue-fields-row{grid-template-columns:1fr}}

/* Compact Daily Issue layout: modeled on the user's preferred compact form. */
.page-Daily-Issue .main{padding:10px 12px;max-width:1180px}
.page-Daily-Issue .page-title{font-size:27px;margin:0 0 12px}
.page-Daily-Issue .panelbox{padding:6px;margin-bottom:10px}
.page-Daily-Issue .issue-top-row{grid-template-columns:1fr 1fr 1.55fr;gap:12px;margin-bottom:8px}
.page-Daily-Issue .issue-fields-row{grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-bottom:8px}
.page-Daily-Issue .formrow.two{gap:12px;margin-bottom:8px}
.page-Daily-Issue .formgroup label{font-size:12px;margin-bottom:4px}
.page-Daily-Issue .formgroup input,.page-Daily-Issue .formgroup select{height:28px}
.page-Daily-Issue .formgroup textarea{height:78px}
.page-Daily-Issue .holiday-box{min-height:70px;padding:0;display:flex;flex-direction:column;justify-content:flex-start}
.page-Daily-Issue .holiday-main,.page-Daily-Issue .holiday-sub{margin:0 0 5px!important;font-size:12px!important;line-height:20px}
.page-Daily-Issue .holiday-main input,.page-Daily-Issue .holiday-sub input[type=checkbox]{width:auto!important;height:auto!important}
.page-Daily-Issue #issueHolidayName{height:26px!important;width:170px!important}
.page-Daily-Issue .actionbar{margin:10px 0 4px}
.page-Daily-Issue .searchrow{margin:8px 0}
.page-Daily-Issue .data-scroll{height:260px}

/* Compact shared form sizing on desktop; mobile remains fluid. */
.formrow{gap:12px;margin-bottom:8px}
.panelbox{padding:7px;margin-bottom:12px}
.actionbar{margin:10px 0}

/* Calendar picker matching the supplied compact blue-header calendar. */
.dsm-datepicker{position:fixed;z-index:99999;width:230px;background:#fff;border:1px solid #c7cdd5;border-radius:0 0 8px 8px;box-shadow:0 4px 16px rgba(0,0,0,.22);display:none;font-family:Arial,Helvetica,sans-serif;overflow:hidden}
.dsm-datepicker.open{display:block}
.dsm-dp-head{height:48px;background:#287fdc;color:#fff;display:grid;grid-template-columns:40px 1fr 40px;align-items:center;text-align:center}
.dsm-dp-head strong{font-size:15px}
.dsm-dp-head button{height:48px;border:0;background:transparent;color:#fff;font-size:25px;cursor:pointer}
.dsm-dp-head button:hover{background:rgba(255,255,255,.12)}
.dsm-dp-week,.dsm-dp-days{display:grid;grid-template-columns:repeat(7,1fr)}
.dsm-dp-week{padding:8px 6px 4px;font-size:11px;color:#4e5965;text-align:center}
.dsm-dp-days{padding:0 6px 8px}
.dsm-dp-days button{border:0;background:#fff;color:#273747;height:29px;font-size:12px;border-radius:3px;cursor:pointer}
.dsm-dp-days button:hover{background:#e7f1fb}
.dsm-dp-days button.muted{color:#aeb6bf}
.dsm-dp-days button.today{outline:1px solid #287fdc}
.dsm-dp-days button.selected{background:#287fdc;color:#fff}
.theme-dark .dsm-datepicker{background:#1b2530;border-color:#465566}
.theme-dark .dsm-dp-week{color:#c6d0da}
.theme-dark .dsm-dp-days button{background:#1b2530;color:#e8eef4}
.theme-dark .dsm-dp-days button.muted{color:#697786}
.theme-dark .dsm-dp-days button:hover{background:#263746}

@media(max-width:900px){
 .page-Daily-Issue .issue-top-row{grid-template-columns:1fr 1fr}
 .page-Daily-Issue .holiday-box{grid-column:1/-1}
 .page-Daily-Issue .issue-fields-row{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:600px){
 .page-Daily-Issue .issue-top-row,.page-Daily-Issue .issue-fields-row,.page-Daily-Issue .formrow.two{grid-template-columns:1fr}
 .page-Daily-Issue .holiday-box{grid-column:auto}
}

/* Daily Issue: In Time precedes Out Time and keep the compact desktop form. */
.page-Daily-Issue .issue-fields-row{grid-template-columns:1.15fr 1.15fr .72fr .9fr .9fr .9fr .95fr .95fr;gap:9px;align-items:end}
.page-Daily-Issue .time-group .time-selects select{width:44px}
@media(max-width:1200px){.page-Daily-Issue .issue-fields-row{grid-template-columns:repeat(4,minmax(0,1fr));}}
@media(max-width:700px){.page-Daily-Issue .issue-fields-row{grid-template-columns:1fr}}
