/* C-Tilang Public Styling - PN-RED Suite */

.c-tilang-wrapper {
    background: #ffffff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    margin-bottom: 30px;
    border: 1px solid #f1f5f9;
}

.c-tilang-header {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 25px;
    text-align: left;
    padding-bottom: 18px;
    border-bottom: 1px solid #f1f5f9;
}

.c-tilang-header-icon {
    width: 60px;
    height: 60px;
    min-width: 60px;
    background: linear-gradient(135deg, #9a2109 0%, #b50d0d 100%);
    color: #ffffff;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(154, 33, 9, 0.25);
    flex-shrink: 0;
}

.c-tilang-header-icon svg {
    width: 32px;
    height: 32px;
    fill: #ffffff;
}

.c-tilang-header-text {
    flex: 1;
}

.c-tilang-header h2 {
    color: #9a2109;
    font-weight: 800;
    margin: 0 0 5px 0;
    font-size: 22px;
    line-height: 1.25;
}

.c-tilang-header p {
    color: #64748b;
    font-size: 14px;
    margin: 0;
    line-height: 1.45;
}

/* Search Box */
.c-tilang-search-box {
    max-width: 620px;
    margin: 0 auto 30px;
}

.cr-search-group {
    display: flex;
    gap: 10px;
}

.cr-search-group .cr-form-control {
    flex: 1;
    padding: 12px 20px;
    border: 1px solid #cbd5e1;
    border-radius: 50px;
    font-size: 14.5px;
    outline: none;
    transition: all 0.3s;
}

.cr-search-group .cr-form-control:focus {
    border-color: #9a2109;
    box-shadow: 0 0 0 3px rgba(154, 33, 9, 0.15);
}

.cr-search-group .cr-btn-search {
    background: linear-gradient(135deg, #9a2109 0%, #b50d0d 100%);
    color: #ffffff;
    border: none;
    padding: 11px 26px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 14.5px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 10px rgba(154, 33, 9, 0.25);
    white-space: nowrap;
}

.cr-search-group .cr-btn-search:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(154, 33, 9, 0.35);
}

.c-tilang-message {
    margin-top: 15px;
}

.c-tilang-alert {
    padding: 12px 18px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 20px;
    text-align: center;
}

.c-tilang-alert.info {
    background: #e0f2fe;
    color: #0369a1;
    border: 1px solid #bae6fd;
}

.c-tilang-alert.warning {
    background: #fffbeb;
    color: #b45309;
    border: 1px solid #fef3c7;
}

.c-tilang-alert.error {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.c-tilang-loading {
    text-align: center;
    color: #64748b;
    padding: 35px 0;
    font-size: 15px;
}

.c-tilang-loading i {
    margin-right: 8px;
    color: #9a2109;
}

/* Navigation Header (Back Button + Title) */
.c-tilang-nav-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid #f1f5f9;
}

.c-tilang-nav-header h4 {
    margin: 0;
    font-size: 16.5px;
    color: #1e293b;
    font-weight: 700;
}

.c-tilang-nav-header h4 span.c-tilang-total-tag {
    color: #9a2109;
    font-weight: 800;
}

.c-tilang-btn-back {
    background: #f1f5f9;
    color: #334155;
    border: 1px solid #cbd5e1;
    padding: 7px 16px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.c-tilang-btn-back:hover {
    background: #9a2109;
    color: #ffffff;
    border-color: #9a2109;
}

.c-tilang-hint {
    font-size: 13px;
    color: #64748b;
    margin-bottom: 15px;
    background: #f8fafc;
    padding: 8px 12px;
    border-radius: 6px;
    border-left: 3px solid #9a2109;
}

/* 5 Dates Table (Initial View) */
.c-tilang-dates-wrapper {
    margin-top: 10px;
}

.c-tilang-section-title {
    margin-bottom: 14px;
}

.c-tilang-section-title h3 {
    margin: 0 0 4px;
    color: #9a2109;
    font-size: 17px;
    font-weight: 800;
}

.c-tilang-section-title p {
    margin: 0;
    font-size: 13px;
    color: #64748b;
}

.c-tilang-table-responsive {
    overflow-x: auto;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.c-tilang-dates-table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
}

.c-tilang-dates-table th {
    background: #f8fafc;
    padding: 12px 16px;
    font-size: 13px;
    font-weight: 700;
    color: #334155;
    border-bottom: 2px solid #e2e8f0;
    text-align: left;
}

.c-tilang-dates-table td {
    padding: 12px 16px;
    font-size: 13.5px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}

.c-tilang-date-row {
    cursor: pointer;
    transition: background 0.15s;
}

.c-tilang-date-row:hover {
    background: #fff8f8;
}

.c-tilang-date-text {
    font-weight: 700;
    color: #1e293b;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.c-tilang-date-text i {
    color: #9a2109;
}

.c-tilang-count-badge {
    background: #fff1f2;
    color: #9a2109;
    border: 1px solid #ffe4e6;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
}

.c-tilang-btn-view-date {
    background: #9a2109;
    color: #ffffff;
    border: none;
    padding: 7px 15px;
    border-radius: 6px;
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.c-tilang-btn-view-date:hover {
    background: #780b0b;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(154, 33, 9, 0.25);
}

/* Accordion List per Perkara */
.c-tilang-accordion-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.c-tilang-accordion-item {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    background: #ffffff;
    transition: all 0.2s;
}

.c-tilang-accordion-item.is-open {
    border-color: #9a2109;
    box-shadow: 0 4px 12px rgba(154, 33, 9, 0.08);
}

.c-tilang-accordion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 13px 18px;
    background: #f8fafc;
    cursor: pointer;
    transition: background 0.15s;
    user-select: none;
}

.c-tilang-accordion-header:hover {
    background: #f1f5f9;
}

.c-tilang-accordion-item.is-open .c-tilang-accordion-header {
    background: #fff5f5;
    border-bottom: 1px solid #fee2e2;
}

.c-tilang-acc-info {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 1;
}

.c-tilang-acc-idx {
    font-size: 12px;
    font-weight: 800;
    color: #9a2109;
    background: #fff1f2;
    padding: 2px 7px;
    border-radius: 4px;
}

.c-tilang-acc-names {
    display: flex;
    flex-direction: column;
}

.c-tilang-acc-name {
    font-size: 14.5px;
    color: #1e293b;
    font-weight: 700;
}

.c-tilang-acc-sub {
    font-size: 12px;
    color: #64748b;
    margin-top: 2px;
}

.c-tilang-acc-meta {
    display: flex;
    align-items: center;
    gap: 12px;
}

.c-tilang-acc-nopol {
    background: #0f172a;
    color: #ffffff;
    padding: 3px 9px;
    border-radius: 4px;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.c-tilang-acc-toggle {
    font-size: 12px;
    font-weight: 700;
    color: #9a2109;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.c-tilang-accordion-body {
    padding: 16px;
    background: #ffffff;
}

/* Card Search Grid (Max 2 Kolom Desktop, 1 Kolom Responsive) */
.c-tilang-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

@media (max-width: 768px) {
    .c-tilang-header {
        gap: 14px;
        padding-bottom: 14px;
    }
    .c-tilang-header-icon {
        width: 48px;
        height: 48px;
        min-width: 48px;
        border-radius: 10px;
    }
    .c-tilang-header-icon svg {
        width: 24px;
        height: 24px;
    }
    .c-tilang-header h2 {
        font-size: 19px;
    }
    .c-tilang-header p {
        font-size: 13px;
    }
    .c-tilang-grid {
        grid-template-columns: 1fr;
    }
    .cr-search-group {
        flex-direction: column;
    }
    .cr-search-group .cr-btn-search {
        width: 100%;
    }
    .c-tilang-accordion-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    .c-tilang-acc-meta {
        width: 100%;
        justify-content: space-between;
    }
}

.c-tilang-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    display: flex;
    flex-direction: column;
    transition: transform 0.2s, box-shadow 0.2s;
}

.c-tilang-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.c-tilang-card-header {
    background: #9a2109;
    padding: 15px 18px;
    color: #ffffff;
}

.c-tilang-card-header .c-tilang-badge {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff !important;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    display: inline-block;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.c-tilang-card-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.35;
    color: #ffffff !important;
}

.c-tilang-card-body {
    padding: 0;
    flex: 1;
}

.c-tilang-table {
    width: 100%;
    border-collapse: collapse;
}

.c-tilang-table tr:nth-child(even) {
    background-color: #f8fafc;
}

.c-tilang-table td {
    padding: 10px 15px;
    font-size: 13px;
    border-bottom: 1px solid #f1f5f9;
}

.c-tilang-table td:first-child {
    font-weight: 600;
    color: #475569;
    width: 38%;
}

.c-tilang-table td:last-child {
    color: #0f172a;
    font-weight: 500;
}

.c-tilang-card-footer {
    padding: 14px 18px;
    background: #fff5f5;
    border-top: 1px solid #fee2e2;
    border-radius: 0 0 8px 8px;
}

.c-tilang-card-footer strong {
    display: block;
    color: #9a2109;
    font-size: 13px;
    margin-bottom: 5px;
}

.c-tilang-putusan {
    font-size: 13px;
    color: #7f1d1d;
    font-weight: 600;
    line-height: 1.45;
}
