/* --- DSR Module Styles --- */

.dsr-main {
    width: 100%;
    justify-content: flex-start;
    align-items: stretch;
}

.dsr-main-public {
    width: 100%;
    flex: 1 1 auto;
    min-width: 0;
    padding-left: 24px;
    padding-right: 24px;
    justify-content: center;
    align-items: center;
}

.dsr-layout {
    width: min(1280px, 100%);
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 640px) minmax(340px, 1fr);
    gap: 28px;
    align-items: start;
}

.dsr-card-employee {
    width: 100%;
    max-width: 760px;
    margin: 0 auto;
}

.dsr-admin-shell {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px;
    border-radius: 40px;
    background: var(--panel-bg);
    backdrop-filter: blur(50px) saturate(200%);
    border: 1px solid var(--glass-border);
    box-shadow:
        0 80px 150px rgba(0, 0, 0, 0.8),
        inset 0 0 60px rgba(255, 255, 255, 0.02);
    position: relative;
    z-index: 10;
}

.dsr-admin-shell::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 40px;
    padding: 1px;
    background: linear-gradient(135deg, rgba(255,255,255,0.15), transparent 50%, rgba(195,0,47,0.2));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.dsr-card {
    width: 100%;
    margin: 0;
    padding: 40px;
    background: var(--panel-bg);
    backdrop-filter: blur(60px) saturate(210%);
    border-radius: 50px;
    border: 1px solid var(--panel-border);
    box-shadow: 0 80px 160px rgba(0, 0, 0, 0.6);
    position: relative;
    overflow: hidden;
    animation: cardReveal 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes cardReveal {
    from { opacity: 0; transform: translateY(40px) scale(0.98); filter: blur(10px); }
    to { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}

.dsr-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50px;
    padding: 1px;
    background: linear-gradient(135deg, rgba(255,255,255,0.2), transparent 50%, rgba(195,0,47,0.3));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(40px); }
    to { opacity: 1; transform: translateY(0); }
}

.card-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.titles h1 {
    font-family: 'Playfair Display', serif;
    font-size: 28px;
    font-weight: 800;
    margin: 0;
    letter-spacing: -0.01em;
}

.titles h1 span {
    color: #c3002f;
    text-shadow: 0 0 15px rgba(195, 0, 47, 0.3);
    font-size: 12px;
    vertical-align: super;
    margin-left: 6px;
    letter-spacing: 2px;
}

.titles p {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    opacity: 0.7;
}

.status-chip {
    background: rgba(0, 255, 128, 0.1);
    color: #00ff80;
    padding: 10px 20px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    border: 1px solid rgba(0, 255, 128, 0.2);
    box-shadow: 0 0 20px rgba(0, 255, 128, 0.1);
}

.row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
    align-items: start;
}

.input-wrap {
    margin-bottom: 20px;
}

.input-wrap.full {
    grid-column: span 2;
}

label {
    display: block;
    font-size: 11px;
    font-weight: 800;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 12px;
    opacity: 0.8;
}

input, textarea {
    width: 100%;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 14px;
    padding: 16px 18px;
    color: #fff;
    font-size: 13px;
    font-family: inherit;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
}

input {
    height: 60px;
}

input:focus, textarea:focus {
    border-color: var(--accent);
    background: rgba(0, 0, 0, 0.7);
    box-shadow: 0 0 40px rgba(195, 0, 47, 0.15);
    transform: scale(1.01);
}

textarea {
    height: 90px;
    resize: none;
    line-height: 1.5;
}

/* Custom Select - Neo Glass */
.custom-select {
    position: relative;
}

.trigger {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 14px;
    min-height: 60px;
    padding: 16px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: all 0.4s ease;
    color: #fff;
    box-sizing: border-box;
}

#selected-text {
    line-height: 1.2;
}

.custom-select:hover .trigger {
    border-color: var(--accent);
    background: rgba(0, 0, 0, 0.6);
}

.arrow-icon {
    width: 8px;
    height: 8px;
    border-right: 2px solid var(--muted);
    border-bottom: 2px solid var(--muted);
    transform: rotate(45deg);
    transition: 0.4s;
}

.custom-select.active .arrow-icon {
    transform: rotate(-135deg);
    border-color: var(--accent);
}

.options-list {
    position: absolute;
    top: calc(100% + 12px);
    left: 0;
    right: 0;
    background: rgba(20, 20, 22, 0.95);
    backdrop-filter: blur(30px);
    border: 1px solid var(--panel-border);
    border-radius: 24px;
    padding: 10px;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.8);
}

.custom-select.active .options-list {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.item {
    padding: 14px 20px;
    border-radius: 14px;
    font-size: 14px;
    color: var(--muted);
    transition: all 0.3s ease;
    font-weight: 600;
}

.item:hover {
    background: linear-gradient(135deg, var(--accent), #7a001f);
    color: #fff;
    padding-left: 24px;
    box-shadow: 0 10px 20px rgba(195, 0, 47, 0.2);
}

.prime-btn {
    width: 100%;
    height: 58px;
    background: linear-gradient(135deg, #c3002f, #7a001f);
    color: #fff;
    border: none;
    border-radius: 16px;
    font-weight: 800;
    letter-spacing: 2px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    text-transform: uppercase;
    box-shadow: 0 15px 30px rgba(195, 0, 47, 0.3);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.prime-btn:hover {
    transform: translateY(-4px);
    box-shadow: 0 25px 50px rgba(195, 0, 47, 0.5);
    filter: brightness(1.1);
}

.prime-btn::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transition: 0.6s;
}

.prime-btn:hover::before {
    left: 100%;
}

.prime-btn:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: 0 30px 60px rgba(195, 0, 47, 0.5);
    filter: brightness(1.1);
}

.employee-action-row {
    display: grid;
    gap: 14px;
}

.secondary-pendency-btn {
    width: 100%;
    min-height: 54px;
    border-radius: 16px;
    border: 1px solid rgba(255, 184, 0, 0.24);
    background: rgba(255, 184, 0, 0.08);
    color: #ffca55;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
}

.secondary-pendency-btn:hover {
    transform: translateY(-2px);
    background: rgba(255, 184, 0, 0.14);
    box-shadow: 0 18px 36px rgba(255, 184, 0, 0.12);
}

.pending-wrap {
    margin: 6px 0 22px;
    display: flex;
    justify-content: flex-start;
}

.pending-label {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 15px;
    font-weight: 600;
    color: var(--muted);
    cursor: pointer;
    transition: color 0.3s ease;
    text-transform: none;
    letter-spacing: 0.02em;
    margin-bottom: 0;
}

.pending-label:hover {
    color: #fff;
}

.pending-label input {
    width: 20px;
    height: 20px;
    margin: 0;
    flex: 0 0 auto;
    accent-color: #00ff80;
    border-radius: 6px;
}

.check-text {
    display: inline-flex;
    align-items: center;
    line-height: 1.4;
}

#msg {
    margin-top: 30px;
    padding: 16px;
    border-radius: 18px;
    font-weight: 700;
    min-height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}

#msg:empty {
    display: none;
}

.admin-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 18px;
}

.admin-head h1 {
    margin: 0 0 6px;
    font-family: 'Playfair Display', serif;
    font-size: 36px;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #fff;
}

.admin-head h1 span {
    color: var(--primary);
}

.admin-head p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    letter-spacing: 0.5px;
}

.date-filter {
    display: flex;
    gap: 14px;
    align-items: center;
    flex-wrap: nowrap;
}

.date-filter input {
    height: auto;
    min-width: 190px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 10px 16px;
    color: #fff;
    outline: none;
}

.date-filter button,
.export-btn {
    min-width: 116px;
    min-height: 44px;
    padding: 10px 22px;
    border-radius: 12px;
    background: var(--accent-gradient);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    font-size: 13px;
    line-height: 1;
    white-space: nowrap;
    transition: all 0.3s ease;
    box-shadow: 0 10px 20px rgba(195, 0, 47, 0.2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.date-filter button:hover,
.export-btn:hover {
    box-shadow: 0 15px 30px rgba(195, 0, 47, 0.4);
    transform: translateY(-2px);
    filter: brightness(1.2);
}

.report-toolbar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 18px;
}

.admin-search-box {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 260px;
    padding: 0 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.admin-search-box i {
    color: var(--muted);
}

.admin-search-box input {
    margin: 0;
    height: 46px;
    padding: 0;
    background: transparent;
    border: none;
    color: #fff;
    box-shadow: none;
    caret-color: #fff;
}

.admin-search-box input::placeholder {
    color: rgba(255, 255, 255, 0.55);
}

.admin-search-box input:focus {
    transform: none;
    box-shadow: none;
}

.dsr-log-card {
    padding: 30px 28px;
    background: rgba(10, 10, 12, 0.72);
    backdrop-filter: blur(40px) saturate(180%);
    border-radius: 34px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 45px 90px rgba(0, 0, 0, 0.5);
}

.log-head {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: flex-start;
    margin-bottom: 20px;
}

.log-head h2 {
    margin: 0 0 8px;
    font-size: 24px;
    font-family: 'Playfair Display', serif;
}

.log-head p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.6;
}

.log-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

.log-stat {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    color: #f2f3f7;
    border: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.log-stat.warning {
    color: #ffd66b;
    border-color: rgba(255, 214, 107, 0.2);
    background: rgba(255, 214, 107, 0.08);
}

.dsr-summary-row {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: flex-end;
    margin-bottom: 18px;
}

.report-table-wrap {
    margin-top: 24px;
    overflow-x: auto;
    border-radius: 30px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.report-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.report-table th,
.report-table td {
    padding: 18px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.report-table th {
    background: rgba(255, 255, 255, 0.02);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-muted);
}

.report-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

.dsr-report-table td {
    vertical-align: top;
}

.emp-primary {
    font-size: 17px;
    font-weight: 700;
    color: #fff;
}

.emp-secondary {
    margin-top: 6px;
    color: var(--muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.dsr-copy-cell {
    min-width: 260px;
    color: var(--muted);
    line-height: 1.7;
}

.status-pill-v2 {
    font-size: 11px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 99px;
    text-transform: uppercase;
    background: rgba(255, 255, 255, 0.05);
    color: var(--muted);
}

.status-pill-v2.status-submitted {
    background: rgba(0, 255, 128, 0.2);
    color: #00ff80;
}

.status-pill-v2.status-pending {
    background: rgba(255, 184, 0, 0.12);
    color: #ffb800;
}

.info-circle-btn {
    background: rgba(255, 255, 255, 0.05);
    border: none;
    color: var(--muted);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
}

.info-circle-btn:hover {
    background: var(--primary-red);
    color: #fff;
    transform: translateX(4px);
}

.admin-note {
    margin-top: 30px;
    font-size: 13px;
    color: var(--text-muted);
    font-style: italic;
}

.dsr-log-list {
    display: grid;
    gap: 16px;
    max-height: 760px;
    overflow-y: auto;
    padding-right: 4px;
}

.dsr-log-item {
    padding: 20px;
    border-radius: 24px;
    background: rgba(0, 0, 0, 0.32);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.dsr-log-top {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 16px;
}

.dsr-log-top h3 {
    margin: 0 0 8px;
    font-size: 18px;
    color: #fff;
}

.dsr-log-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    color: var(--muted);
    font-size: 12px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.dsr-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 96px;
    min-height: 34px;
    padding: 0 14px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.dsr-badge-submitted {
    background: rgba(0, 255, 128, 0.12);
    color: #00ff80;
    border: 1px solid rgba(0, 255, 128, 0.24);
}

.dsr-badge-pending {
    background: rgba(255, 179, 71, 0.14);
    color: #ffbf59;
    border: 1px solid rgba(255, 179, 71, 0.26);
}

.dsr-log-block + .dsr-log-block {
    margin-top: 14px;
}

.dsr-log-label {
    display: block;
    margin-bottom: 6px;
    color: #f2f2f4;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.dsr-log-block p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.7;
    white-space: normal;
    word-break: break-word;
}

.dsr-empty-state {
    padding: 24px 20px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px dashed rgba(255, 255, 255, 0.1);
    color: var(--muted);
    text-align: center;
    line-height: 1.7;
}

.detail-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.detail-modal.active {
    opacity: 1;
    pointer-events: all;
}

.modal-glass {
    width: 100%;
    max-width: 560px;
    background: rgba(15, 15, 18, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 32px;
    padding: 30px;
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.8);
    transform: scale(0.9) translateY(20px);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.detail-modal.active .modal-glass {
    transform: scale(1) translateY(0);
}

.modal-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 25px;
}

.head-info h3 {
    font-family: 'Playfair Display', serif;
    font-size: 24px;
    color: #fff;
    margin: 0 0 4px;
}

#modalDepartmentDate {
    font-size: 11px;
    color: var(--primary-red);
    font-weight: 800;
    letter-spacing: 2px;
}

.close-modal {
    background: rgba(255, 255, 255, 0.05);
    border: none;
    color: #fff;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
}

.close-modal:hover {
    background: rgba(195, 0, 47, 0.2);
    color: var(--primary-red);
}

.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 25px;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.detail-item .label,
.remarks-box .label {
    font-size: 10px;
    font-weight: 800;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.detail-item .val {
    font-size: 14px;
    color: #fff;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

.remarks-box {
    background: rgba(255, 255, 255, 0.03);
    padding: 15px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.remarks-box p {
    margin-top: 8px;
    font-size: 13px;
    color: #cfd3da;
    line-height: 1.6;
    white-space: pre-wrap;
}

.modal-stack-gap {
    margin-top: 16px;
}

.modal-pendency-summary {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.dsr-log-list-modal {
    max-height: 420px;
    padding-right: 6px;
}

@media (max-width: 640px) {
    .dsr-card { padding: 40px 24px; border-radius: 32px; }
    .row { grid-template-columns: 1fr; gap: 0; }
    .titles h1 { font-size: 32px; }
    .prime-btn { padding: 20px; font-size: 14px; }
    .pending-wrap { justify-content: flex-start; }
    .detail-grid { grid-template-columns: 1fr; }
    .dsr-main-public { padding-left: 16px; padding-right: 16px; }
}

@media (max-width: 1180px) {
    .dsr-layout {
        grid-template-columns: 1fr;
    }

    .dsr-card,
    .dsr-log-card {
        max-width: 900px;
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    .dsr-log-card {
        padding: 24px 20px;
        border-radius: 28px;
    }

    .log-head,
    .dsr-log-top {
        flex-direction: column;
    }

    .log-stats {
        justify-content: flex-start;
    }

    .dsr-log-list {
        max-height: none;
    }

    .admin-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .date-filter {
        flex-wrap: wrap;
    }

    .dsr-summary-row {
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .report-toolbar {
        justify-content: stretch;
    }

    .admin-search-box {
        width: 100%;
        min-width: 0;
    }
}
