@import url(https://fonts.googleapis.com/css?family=Poppins:300,400,500,600,700);
body{
    background-color: #f5f5f5;
    font-size: .95em!important;
    font-family: Poppins;
}
main > .container {
    padding: 70px 15px 20px;
}

.footer {
    background-color: #f5f5f5;
    font-size: .9em;
    height: 60px;
    padding-top: 20px!important;
}

.footer > .container {
    padding-right: 15px;
    padding-left: 15px;
}

.not-set {
    color: #c55;
    font-style: italic;
}

/* add sorting icons to gridview sort links */
a.asc:after, a.desc:after {
    content: '';
    left: 3px;
    display: inline-block;
    width: 0;
    height: 0;
    border: solid 5px transparent;
    margin: 4px 4px 2px 4px;
    background: transparent;
}

a.asc:after {
    border-bottom: solid 7px #212529;
    border-top-width: 0;
}

a.desc:after {
    border-top: solid 7px #212529;
    border-bottom-width: 0;
}

.grid-view th,
.grid-view td:last-child {
    white-space: nowrap;
}

.grid-view .filters input,
.grid-view .filters select {
    min-width: 50px;
}

.hint-block {
    display: block;
    margin-top: 5px;
    color: #999;
}

.error-summary {
    color: #a94442;
    background: #fdf7f7;
    border-left: 3px solid #eed3d7;
    padding: 10px 20px;
    margin: 0 0 15px 0;
}

/* align the logout "link" (button in form) of the navbar */
.nav li > form > button.logout {
    padding-top: 7px;
    color: rgba(0, 0, 0, 0.5);
}

@media(max-width:767px) {
    .nav li > form > button.logout {
        display:block;
        text-align: left;
        width: 100%;
        padding: 10px 0;
    }
}

.nav > li > form > button.logout:focus,
.nav > li > form > button.logout:hover {
    text-decoration: none;
    color: rgba(0, 0, 0, 0.5);
}

.nav > li > form > button.logout:focus {
    outline: none;
}

.shadow{
    -webkit-box-shadow: 0 0 4px rgba(0,0,0,.5);
    -moz-box-shadow: 0 0 4px rgba(0,0,0,.5);
    box-shadow: 0 0 4px rgba(0,0,0,.5);
}
.navbar{
    padding: 1rem 1rem;
}
.bg--dark{
    background-color: #3b4251;
}
footer p{
    color: #e7e7e7;
}
.content{
    margin-top: 60px;
    margin-bottom: 20px;
}
.boxed{
    background-color: #fff;
    border: 1px solid #e7e7e7;
    border-radius: 2px;
    padding: 20px;
}
.hr-20{
    margin-left: -20px;
    margin-right: -20px;
}
.hr-15{
    margin-left: -15px;
    margin-right: -15px;
}
.summary{
    margin-bottom: 15px;
}
.help-block{
    color: #AB292A;
}
.profile-picture{
    border: 1px solid #e7e7e7;
    width: 80px;
    height: 80px;
    border-radius: 80px;
    background-color: #f5f5f5;
}
.profile-picture img{
    border-radius: 50px;
}
.btn-dark,.btn-secondary{
    color: #fff!important;
}
.summary{
    display: none;
}
a,a:hover{
    text-decoration: none;
    color:steelblue;
}
.steps{
    margin-bottom: 0!important;
}
.step{
    border: 1px solid #777;
    background-color: #777;
    border-radius: 30px;
    height: 30px;
    width: 30px;
    padding-top: 3px;
    text-align: center;
    color: #fff;
    font-weight: bold;
    cursor: pointer;
}
.active-step{
    border: 1px solid #231F20;
    background-color: #231F20;
}
.box-header{
    margin-bottom: -10px;
}
.box-header h6{
    margin-top: 5px;
}
.boxed h6,.boxed h5{
    font-weight: 800;
    text-transform: uppercase;
    font-size: .9em;
}
.form-separator{
    padding: 10px 20px;
    margin:0px -20px;
    border-bottom:1px solid #e7e7e7;
    margin-bottom: 20px;
}
.form-separator h6{
    text-transform: capitalize;
    font-size:1em;
    font-weight: 700;
}
.form-text{
    font-style: italic;
}
.application-documents td:first-child{
    width:50%;
}
.detail-view th{
  width: 50%;
}
.dropdown-item{
    padding-top:10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}
.dropdown-item:last-child{
    border-bottom: none;
}
.dropdown-menu{
    padding-top:0px;
    padding-bottom: 0px;
}
.form-group label:first-child{
    font-weight: 500;
    color:#242424;
}
.form-footer{
    margin-top:30px;
}
.hint-block{
    font-style: italic;
}
.section-title{
	font-size: 13px;
    font-weight: 500;
	margin: 20px 0px;
	text-transform: uppercase;
}
.mpesa-form-header{
    background-color: #103245;
    margin:-20px -20px 20px -20px;
    border-bottom: 1px solid #e7e7e7;
    padding:30px 20px 20px 20px;
    border-top-right-radius: 3px;
    border-top-left-radius: 3px;
}
.mpesa-form-header h5{
    color:#ffffff !important;
}
.mpesa-form-footer{
    padding-top:10px;
    margin-top:20px;
}
.btn-link{
    color:steelblue;
}
.fc-center h2{
    font-size: .9em;
}
.btn-group{
    border:1px solid #e7e7e7;
    border-radius: 3px;
}
.fc-month-button,.fc-prev-button{
    border-right: 1px solid #e7e7e7;
}
.navbar-brand{
    padding:0;
}
.navbar-brand img{
    width: 70px;
}
.paybill-instructions{
    text-align:left !important;
}
.paybill-instructions li{
    line-height: 2em;
}
.payment-header td:first-child{
    background-color: #f5f5f5;
    font-weight: bold;
}
.btn-link,.btn-link:focus, .btn-link.focus{
    text-decoration: none!important;
    text-transform: none;
    box-shadow:none !important;
}
.pagination{
    justify-content: center;
}
.pagination li>a,.pagination li>span {
    height: 31px;
    width: 31px;
    padding: 0;
    border: 0;
    margin: 0;
    display: -webkit-inline-box;
    display: -webkit-inline-flex;
    display: -ms-inline-flexbox;
    display: inline-flex;
    -webkit-box-align: center;
    -webkit-align-items: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: center;
    -webkit-justify-content: center;
    -ms-flex-pack: center;
    justify-content: center;
    color: inherit;
    -webkit-border-radius: 50%!important;
    border-radius: 50%!important
}
.pagination li>a:focus,.pagination li>a:hover,.pagination li>span:focus,.pagination li>span:hover {
    color: #5c6bc0;
    background-color: #e9ecef
}
.pagination li .page-link-solid {
    color: #5c6bc0;
    background-color: #e9ecef
}
.pagination .active>a,.pagination .active>a:focus,.pagination .active>a:hover,.pagination .active>span,.pagination .active>span:focus,.pagination .active>span:hover,.pagination .page-item.active .page-link {
    background-color: #0075B7;
    border-color: #0075B7;
    color: #fff
}
.toggle.ios, .toggle-on.ios, .toggle-off.ios { border-radius: 20rem; }
.toggle.ios .toggle-handle { border-radius: 20rem; }
td .ul-divided li{
    border-bottom:1px solid #e7e7e7;
    padding: 5px;
    margin: 5px -10px 0px;
}
td .ul-divided li:last-child{
    border-bottom: none;
}

/* ═══════════════════════════════════════════
   Dashboard Redesign — Stats + Cards + AJAX
   ═══════════════════════════════════════════ */

/* Greeting */
.dashboard-header {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 16px;
    color: #333;
}

/* ── Stat Cards ── */
.stat-cards { margin-bottom: 18px; }
.stat-card {
    border-radius: 10px;
    padding: 16px 18px;
    color: #fff;
    margin-bottom: 12px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,.12);
    transition: transform .15s, box-shadow .15s;
}
.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,.16);
}
.stat-card .stat-value {
    font-size: 24px;
    font-weight: 700;
    display: block;
    line-height: 1.2;
}
.stat-card .stat-label {
    font-size: 11px;
    opacity: .88;
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-top: 4px;
    display: block;
}
.stat-card.sc-matters { background: linear-gradient(135deg, #1c84c6 0%, #1565a8 100%); }
.stat-card.sc-balance { background: linear-gradient(135deg, #1ab394 0%, #138a73 100%); }
.stat-card.sc-events  { background: linear-gradient(135deg, #f8ac59 0%, #e09440 100%); }
.stat-card.sc-docs    { background: linear-gradient(135deg, #ed5565 0%, #d43f4f 100%); }

/* ── Tabs ── */
.dash-tab-content {
    padding-top: 16px;
}
#dashTabs .nav-link {
    color: #555;
    font-size: 13px;
    padding: 10px 16px;
}
#dashTabs .nav-link.active {
    font-weight: 600;
    color: #1c84c6;
    border-bottom-color: transparent;
}
#dashTabs .nav-link i {
    margin-right: 5px;
}

/* ── Tab loading spinner ── */
.tab-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 60px 0;
}

/* ── Matter Cards ── */
.matter-list { padding: 4px 0; }
.matter-card {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 14px 16px;
    margin-bottom: 10px;
    background: #fff;
    transition: box-shadow .15s, border-color .15s;
}
.matter-card:hover {
    box-shadow: 0 3px 14px rgba(0,0,0,.07);
    border-color: #c8dff0;
}
.matter-card-icon {
    font-size: 24px;
    color: #1c84c6;
    flex-shrink: 0;
    margin-top: 2px;
}
.matter-card-body {
    flex: 1;
    min-width: 0;
}
.matter-card-title {
    font-weight: 600;
    font-size: 14px;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.matter-card-meta {
    font-size: 12px;
    color: #888;
    margin-top: 4px;
}
.matter-card-meta .sep {
    margin: 0 5px;
    color: #ccc;
}
.matter-card-right {
    flex-shrink: 0;
    text-align: right;
    min-width: 100px;
}
.matter-status-badge {
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: .4px;
}

/* ── Tab summary bar ── */
.tab-summary-bar {
    border-radius: 6px;
    padding: 10px 14px;
    font-size: 13px;
    margin-bottom: 14px;
}
.tab-summary-bar i { margin-right: 6px; }
.tab-summary-success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
}
.tab-summary-danger {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

/* ── Dash table ── */
.dash-table { font-size: 13px; }
.dash-table th { background: #f8f9fa; font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .3px; }
.dash-table td { vertical-align: middle; }

/* ── Empty state ── */
.empty-state {
    text-align: center;
    padding: 52px 24px;
    color: #bbb;
}
.empty-state i { display: block; margin-bottom: 14px; }
.empty-state p { font-size: 14px; margin: 0; }

/* ═══════════════════════════════════════════
   Matter View — Hero Header
   ═══════════════════════════════════════════ */

.matter-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    padding: 20px 22px;
    margin-bottom: 18px;
    box-shadow: 0 1px 6px rgba(0,0,0,.05);
}
.matter-hero-main {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    flex: 1;
    min-width: 0;
}
.matter-hero-icon {
    font-size: 28px;
    color: #1c84c6;
    flex-shrink: 0;
    margin-top: 2px;
}
.matter-hero-body { flex: 1; min-width: 0; }
.matter-hero-title {
    font-weight: 700;
    font-size: 16px;
    color: #222;
    margin: 0 0 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.matter-hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}
.mh-pill {
    display: inline-block;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 3px 10px;
    font-size: 11px;
    color: #555;
}
.mh-pill i { margin-right: 3px; color: #888; }
.matter-hero-actions { flex-shrink: 0; }

/* Tab count badge */
.tab-badge {
    font-size: 10px;
    padding: 2px 5px;
    border-radius: 10px;
    vertical-align: middle;
    margin-left: 2px;
}

/* Matter Details grid */
.matter-details-grid {
    padding: 8px 0;
}
.matter-detail-row {
    display: flex;
    border-bottom: 1px solid #f0f0f0;
    padding: 10px 0;
    font-size: 13px;
}
.matter-detail-row:last-child { border-bottom: none; }
.matter-detail-label {
    width: 160px;
    flex-shrink: 0;
    font-weight: 600;
    color: #666;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .3px;
    padding-top: 1px;
}
.matter-detail-value { flex: 1; color: #333; }

/* Instructions sections */
.instructions-section { margin-bottom: 20px; }
.instructions-section-title {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: #1c84c6;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 6px;
    margin-bottom: 8px;
    margin-top: 16px;
}

/* ── Dash cards (mobile-friendly list items replacing GridView tables) ── */
.dash-card-list { padding: 4px 0; }
.dash-card {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 14px 16px;
    margin-bottom: 10px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}
.dash-card:hover { box-shadow: 0 2px 10px rgba(0,0,0,.07); border-color: #d0dce9; }
.dash-card-icon { font-size: 20px; color: #1c84c6; flex-shrink: 0; margin-top: 2px; }
.dash-card-body { flex: 1; min-width: 0; }
.dash-card-title {
    font-weight: 600;
    font-size: 14px;
    color: #333;
    margin-bottom: 4px;
    word-break: break-word;
}
.dash-card-meta {
    font-size: 12px;
    color: #888;
    margin-top: 2px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 2px;
}
.dash-card-meta .sep { color: #ccc; margin: 0 2px; }
.dash-card-preview {
    font-size: 13px;
    color: #555;
    margin-top: 6px;
    line-height: 1.5;
    word-break: break-word;
}
.dash-card-right {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    text-align: right;
}
.dash-card-date { font-size: 11px; color: #aaa; white-space: nowrap; }

@media (max-width: 767px) {
    .matter-hero { flex-direction: column; }
    .matter-hero-actions { width: 100%; }
    .matter-detail-label { width: 120px; font-size: 11px; }
    .matter-hero-title { font-size: 14px; white-space: normal; }
    .dash-card { flex-direction: column; gap: 8px; }
    .dash-card-right {
        flex-direction: row;
        align-items: center;
        justify-content: flex-end;
        width: 100%;
        text-align: left;
        flex-wrap: wrap;
    }
    .dash-card-date { font-size: 12px; color: #888; }
}
