/* e Tapaal - refinements on top of the Robust theme */
:root { --tp-blue:#1e88e5; --tp-ink:#2b3445; --tp-mute:#7b8497; --tp-line:#e6e9f0; --tp-bg:#f3f5f9; }
body { background: var(--tp-bg); color: var(--tp-ink); font-size: 14px; }

/* top bar + menu */
.tp-nav { background: linear-gradient(90deg,#0d47a1,#1e88e5); box-shadow: 0 2px 10px rgba(13,40,100,.25); padding: .35rem 1rem; }
.tp-nav .navbar-brand small { opacity: .8; font-weight: 400; }
.tp-nav .nav-link { font-weight: 600; font-size: 13.5px; }
.tp-nav .nav-link small { opacity: .75; font-weight: 400; }
.dropdown-menu { border: 0; border-radius: 8px; box-shadow: 0 8px 24px rgba(20,30,60,.18); font-size: 13.5px; }
.dropdown-item { padding: .4rem 1.1rem; }
@media (min-width: 992px) { .tp-nav .dropdown:hover > .dropdown-menu { display: block; margin-top: 0; } }
.tp-main { padding: 1.3rem 1.5rem 70px; max-width: 1500px; margin: 0 auto; }
.tp-footer { position: fixed; bottom: 0; left: 0; right: 0; background: #1f2a3d; color: #aab4c8; font-size: 12px; padding: .45rem 1.2rem; z-index: 5; }

/* cards */
.card { border: 0; border-radius: 10px; box-shadow: 0 1px 3px rgba(30,40,70,.08), 0 4px 14px rgba(30,40,70,.05); margin-bottom: 1.2rem; }
.card-header { background: transparent; border-bottom: 1px solid var(--tp-line); padding: .9rem 1.2rem; }
.card-title { font-size: 1.05rem !important; font-weight: 700 !important; margin: 0; }
.card-title small { font-weight: 400; color: var(--tp-mute); }
.card-body { padding: 1.1rem 1.2rem; }
.tile-icon { font-size: 2.2rem; opacity: .9; }

/* stat tiles */
.tile { box-shadow: inset 4px 0 0 var(--tp-blue), 0 1px 3px rgba(30,40,70,.08), 0 4px 14px rgba(30,40,70,.05) !important; transition: transform .12s, box-shadow .12s; }
.tile:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(30,40,70,.14) !important; }
.tile h3 { font-size: 1.9rem; font-weight: 700; margin-bottom: 0; }
.tile span { color: var(--tp-mute); font-size: 12.5px; }
.tile.t-info{--tp-blue:#00acc1}.tile.t-warning{--tp-blue:#fb8c00}.tile.t-primary{--tp-blue:#5c6bc0}
.tile.t-danger{--tp-blue:#e53935}.tile.t-success{--tp-blue:#43a047}.tile.t-secondary{--tp-blue:#78909c}
.tile:hover{box-shadow: inset 4px 0 0 var(--tp-blue), 0 6px 18px rgba(30,40,70,.14) !important}
a .tile, a:hover .tile { color: inherit; text-decoration: none; }

/* tables */
table.tp { border-collapse: separate; border-spacing: 0; }
table.tp th, table.tp td { padding: .55rem .7rem !important; vertical-align: middle; font-size: 13px; border-color: var(--tp-line) !important; }
table.tp thead th { background: #eef2f8; color: #46526b; font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .4px; border-top: 0 !important; position: sticky; top: 0; z-index: 1; }
table.tp tbody tr:hover { background: #f1f7ff !important; }
table.tp .num a { font-weight: 700; }
.subject { max-width: 440px; white-space: normal; line-height: 1.35; }
.table-responsive { border-radius: 8px; }

/* badges */
.badge { font-size: 11.5px; font-weight: 600; padding: .35em .65em; border-radius: 20px; }

/* forms */
.form-control, .custom-select { border-radius: 6px; border-color: #d5dbe6; }
.form-control:focus { border-color: var(--tp-blue); box-shadow: 0 0 0 .15rem rgba(30,136,229,.15); }
label { font-weight: 600; font-size: 12.5px; color: #46526b; margin-bottom: .25rem; }
.btn { border-radius: 6px; font-weight: 600; }
.nav-tabs .nav-link { font-weight: 600; }

/* letter page: read-only fields look like text, not inputs */
.ro { background: #f8f9fc; border: 1px solid var(--tp-line); border-radius: 6px; padding: .45rem .7rem; min-height: 36px; font-size: 13.5px; word-break: break-word; }

/* history timeline */
.history { max-height: 420px; overflow: auto; padding: .4rem .2rem .4rem 1rem; border-left: 3px solid #cfd8e6; background: none; }
.hrow { position: relative; padding: 0 0 .9rem .9rem; font-size: 13px; }
.hrow:before { content: ''; position: absolute; left: -1.36rem; top: .3rem; width: 11px; height: 11px; border-radius: 50%; background: var(--tp-blue); border: 2px solid #fff; box-shadow: 0 0 0 2px #cfd8e6; }
.hrow .when { color: var(--tp-mute); font-size: 11.5px; }
.hrow .what { font-weight: 700; }
.hrow .who { color: var(--tp-mute); }

.alert { border-radius: 8px; border: 0; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
footer.footer { font-size: 12px; }
.content-body { padding-bottom: 50px; }

@media print {
  body { background: #fff; }
  .card { box-shadow: none !important; border: 1px solid #ccc !important; }
  table.tp thead th { position: static; }
}
@media print { .no-print, .tp-nav, .tp-footer, .alert { display: none !important; } .tp-main { padding: 0; } }

/* login */
body.tp-login { min-height: 100vh; padding-top: 9vh; background: linear-gradient(135deg,#0d47a1 0%,#1e88e5 55%,#4fc3f7 100%); }
.login-card { border-radius: 14px; box-shadow: 0 18px 50px rgba(0,0,0,.28); }
.tp-nav .nav-link i { color: #fff !important; opacity: .9; }

/* dashboard */
.chartbox { position: relative; height: 250px; }
.live { color: #43a047; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; }
.live i { font-size: 9px; animation: pulse 1.6s infinite; }
.live.busy i { color: #fb8c00; }
@keyframes pulse { 0% { opacity: 1 } 50% { opacity: .25 } 100% { opacity: 1 } }
.ring { --p: 0; width: 150px; height: 150px; margin: 0 auto; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(closest-side, #fff 76%, transparent 77% 100%), conic-gradient(#43a047 calc(var(--p) * 1%), #e6e9f0 0); transition: background .6s; }
.ring span { font-size: 1.7rem; font-weight: 700; }

/* professional tables and filter bars */
.table-striped tbody tr:nth-of-type(odd) { background: #fafbfd; }
table.tp { margin-bottom: 0; }
table.tp.table-bordered, table.tp.table-bordered td, table.tp.table-bordered th { border-left: 0; border-right: 0; }
table.tp tfoot th { background: #eef2f8; border-top: 2px solid #cfd8e6 !important; }
.tp-filter { background: #fff; border-radius: 10px; box-shadow: 0 1px 3px rgba(30,40,70,.08); padding: 1rem 1.2rem .4rem; margin-bottom: 1.2rem; }
.tp-filter .form-group { margin-bottom: .8rem; }
.tp-filter .btn { min-width: 90px; }
.page-title { font-size: 1.25rem; font-weight: 700; margin-bottom: 1rem; }
.page-title small { font-weight: 400; color: var(--tp-mute); }
.select2-container--default .select2-selection--single { height: 38px; border-color: #d5dbe6; border-radius: 6px; }
.select2-container--default .select2-selection--single .select2-selection__rendered { line-height: 36px; }
.select2-container--default .select2-selection--single .select2-selection__arrow { height: 36px; }
