/* ========================================================================== 
   PUSAT SISTEM TEMPOTOTO V1
   Maintenance realtime + Storage Guard
   Tempel di bagian PALING BAWAH style.css.
   ========================================================================== */

.btn-admin-system {
    border-color: rgba(237, 171, 50, 0.58) !important;
    background: linear-gradient(135deg, #d98924, #8f4e0d) !important;
    color: #ffffff !important;
    box-shadow: 0 8px 18px rgba(217, 137, 36, 0.16) !important;
}

.btn-admin-system:hover {
    filter: brightness(1.08);
    transform: translateY(-1px);
}

.btn-admin-system.maintenance-active {
    border-color: rgba(255, 92, 74, 0.82) !important;
    background: linear-gradient(135deg, #e74c3c, #9f251b) !important;
    box-shadow:
        0 0 0 1px rgba(255, 120, 95, 0.12),
        0 0 20px rgba(231, 76, 60, 0.26) !important;
    animation: ttSystemMaintenancePulse 1.8s ease-in-out infinite;
}

@keyframes ttSystemMaintenancePulse {
    0%, 100% {
        box-shadow:
            0 0 0 1px rgba(255, 120, 95, 0.12),
            0 0 13px rgba(231, 76, 60, 0.18);
    }

    50% {
        box-shadow:
            0 0 0 1px rgba(255, 120, 95, 0.22),
            0 0 25px rgba(231, 76, 60, 0.34);
    }
}


/* --------------------------------------------------------------------------
   OVERLAY MAINTENANCE USER
   -------------------------------------------------------------------------- */

body.tt-maintenance-lock {
    overflow: hidden !important;
}

.tt-maintenance-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000100;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 24px;

    background:
        radial-gradient(circle at 50% 25%, rgba(255, 190, 55, 0.10), transparent 34%),
        rgba(2, 5, 9, 0.94);

    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    transition:
        opacity 220ms ease,
        visibility 0s linear 240ms;
}

.tt-maintenance-overlay.show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;

    transition:
        opacity 220ms ease,
        visibility 0s linear 0s;
}

.tt-maintenance-card {
    position: relative;

    display: grid;
    grid-template-columns: 120px minmax(0, 1fr);
    gap: 28px;

    width: min(760px, 100%);
    padding: 34px;

    border: 1px solid rgba(255, 194, 62, 0.34);
    border-radius: 24px;

    background:
        radial-gradient(circle at top right, rgba(255, 190, 55, 0.10), transparent 36%),
        linear-gradient(145deg, #121925, #070b12);

    box-shadow:
        0 35px 100px rgba(0, 0, 0, 0.76),
        inset 0 0 0 1px rgba(255, 255, 255, 0.025);

    color: #ffffff;

    opacity: 0;
    transform: translateY(12px) scale(0.985);

    transition:
        opacity 240ms ease,
        transform 260ms cubic-bezier(0.22, 1, 0.36, 1);
}

.tt-maintenance-overlay.show .tt-maintenance-card {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.tt-maintenance-visual {
    position: relative;

    width: 112px;
    height: 112px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 1px solid rgba(255, 194, 62, 0.24);
    border-radius: 28px;

    background: rgba(255, 194, 62, 0.07);
}

.tt-maintenance-gear {
    position: relative;
    z-index: 2;

    font-size: 50px;

    animation: ttMaintenanceGear 6s linear infinite;
}

.tt-maintenance-pulse {
    position: absolute;
    inset: 18px;

    border: 1px solid rgba(255, 194, 62, 0.30);
    border-radius: 50%;

    animation: ttMaintenanceRing 1.8s ease-out infinite;
}

@keyframes ttMaintenanceGear {
    to {
        transform: rotate(360deg);
    }
}

@keyframes ttMaintenanceRing {
    0% {
        opacity: 0.9;
        transform: scale(0.7);
    }

    100% {
        opacity: 0;
        transform: scale(1.35);
    }
}

.tt-maintenance-copy {
    min-width: 0;
}

.tt-maintenance-badge {
    display: inline-flex;

    padding: 7px 11px;

    border: 1px solid rgba(255, 194, 62, 0.24);
    border-radius: 999px;

    background: rgba(255, 194, 62, 0.08);
    color: #ffd45a;

    font-size: 10px;
    font-weight: 900;
    letter-spacing: 1.3px;
}

.tt-maintenance-card h1 {
    margin: 13px 0 10px;

    color: #ffffff;

    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.12;

    overflow-wrap: anywhere;
}

.tt-maintenance-card p {
    margin: 0;

    color: #b9c0cc;

    font-size: 14px;
    line-height: 1.72;

    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.tt-maintenance-time-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;

    margin-top: 20px;
}

.tt-maintenance-time-grid > div,
.tt-maintenance-countdown {
    padding: 13px 14px;

    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 13px;

    background: rgba(255, 255, 255, 0.035);
}

.tt-maintenance-time-grid span,
.tt-maintenance-countdown span {
    display: block;

    margin-bottom: 5px;

    color: #7d8695;

    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.7px;
}

.tt-maintenance-time-grid strong,
.tt-maintenance-countdown strong {
    display: block;

    color: #f5f7fa;

    font-size: 12px;
    line-height: 1.4;
}

.tt-maintenance-countdown {
    margin-top: 10px;

    border-color: rgba(255, 194, 62, 0.18);
    background: rgba(255, 194, 62, 0.045);
}

.tt-maintenance-countdown strong {
    color: #ffd45a;
    font-size: 21px;
    letter-spacing: 1.5px;
}

#tt-maintenance-check {
    width: auto;
    min-width: 190px;
    height: 44px;

    margin-top: 18px;
    padding: 0 17px;

    border: 1px solid rgba(255, 194, 62, 0.36);
    border-radius: 11px;

    background: linear-gradient(135deg, #f2c441, #c98917);
    color: #101318;

    font-family: inherit;
    font-size: 11px;
    font-weight: 900;

    cursor: pointer;
}

#tt-maintenance-check:disabled {
    opacity: 0.55;
    cursor: wait;
}

.tt-maintenance-copy small {
    display: block;

    margin-top: 13px;

    color: #697281;

    font-size: 10px;
    line-height: 1.5;
}


/* --------------------------------------------------------------------------
   PANEL ADMIN PUSAT SISTEM
   -------------------------------------------------------------------------- */

.swal2-popup.tt-system-admin-popup {
    width: min(920px, calc(100vw - 28px)) !important;
    max-width: min(920px, calc(100vw - 28px)) !important;
    max-height: calc(100dvh - 28px) !important;

    padding: 25px !important;

    overflow: hidden !important;

    border: 1px solid rgba(255, 190, 55, 0.25) !important;
    border-radius: 23px !important;

    background:
        radial-gradient(circle at top right, rgba(255, 190, 55, 0.07), transparent 34%),
        linear-gradient(145deg, #101722, #070b12) !important;

    box-shadow:
        0 32px 95px rgba(0, 0, 0, 0.74),
        0 0 30px rgba(255, 190, 55, 0.05) !important;
}

.tt-system-admin-popup .swal2-title {
    margin: 0 0 15px !important;

    color: #ffd45a !important;

    font-size: 25px !important;
    letter-spacing: 1.1px !important;
}

.tt-system-admin-popup .swal2-html-container {
    max-height: calc(100dvh - 130px) !important;

    margin: 0 !important;
    padding: 0 5px 4px 0 !important;

    overflow-x: hidden !important;
    overflow-y: auto !important;

    scrollbar-width: thin;
    scrollbar-color: #d79b22 rgba(255, 255, 255, 0.04);
}

.tt-system-admin-popup .swal2-html-container::-webkit-scrollbar {
    width: 7px;
}

.tt-system-admin-popup .swal2-html-container::-webkit-scrollbar-track {
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
}

.tt-system-admin-popup .swal2-html-container::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: linear-gradient(180deg, #ffd45a, #9c650e);
}

.tt-system-admin-shell {
    display: flex;
    flex-direction: column;
    gap: 15px;

    text-align: left;
}

.tt-system-section {
    padding: 19px;

    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 17px;

    background: rgba(255, 255, 255, 0.025);
}

.tt-system-maintenance-section {
    border-color: rgba(238, 151, 47, 0.23);
}

.tt-system-cleanup-section {
    border-color: rgba(71, 189, 239, 0.21);
}

.tt-system-section-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;

    margin-bottom: 16px;
}

.tt-system-section-head > div {
    min-width: 0;
}

.tt-system-section-head > div > span {
    color: #f0ad3d;

    font-size: 9px;
    font-weight: 900;
    letter-spacing: 1.6px;
}

.tt-system-cleanup-section .tt-system-section-head > div > span {
    color: #58c7f4;
}

.tt-system-section-head h3 {
    margin: 5px 0 4px;

    color: #ffffff;

    font-size: 19px;
    line-height: 1.2;
}

.tt-system-section-head p {
    margin: 0;

    color: #87909f;

    font-size: 11px;
    line-height: 1.5;
}

.tt-system-switch {
    display: inline-flex;
    align-items: center;
    gap: 8px;

    flex: 0 0 auto;

    cursor: pointer;
}

.tt-system-switch input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.tt-system-switch > span {
    position: relative;

    width: 42px;
    height: 23px;

    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 999px;

    background: #242b37;

    transition: 0.18s ease;
}

.tt-system-switch > span::after {
    content: "";

    position: absolute;
    top: 3px;
    left: 3px;

    width: 15px;
    height: 15px;

    border-radius: 50%;

    background: #7e8795;

    transition: 0.18s ease;
}

.tt-system-switch input:checked + span {
    border-color: rgba(46, 204, 113, 0.40);
    background: rgba(46, 204, 113, 0.17);
}

.tt-system-switch input:checked + span::after {
    left: 22px;
    background: #51dc91;
    box-shadow: 0 0 12px rgba(46, 204, 113, 0.45);
}

.tt-system-switch b {
    color: #b7bfca;
    font-size: 10px;
}

.tt-system-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 11px;
}

.tt-system-field {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.tt-system-field-full {
    grid-column: 1 / -1;
}

.tt-system-field > span {
    color: #bfc6d1;

    font-size: 10px;
    font-weight: 850;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

.tt-system-field input,
.tt-system-field textarea {
    width: 100% !important;

    margin: 0 !important;
    padding: 11px 13px !important;

    border: 1px solid rgba(255, 194, 62, 0.18) !important;
    border-radius: 11px !important;

    background: #090e16 !important;
    color: #f4f6f9 !important;

    font-family: inherit !important;
    font-size: 12px !important;

    outline: none !important;
    box-sizing: border-box !important;
}

.tt-system-field input {
    height: 44px !important;
}

.tt-system-field textarea {
    min-height: 104px !important;
    max-height: 210px !important;

    resize: vertical !important;
    line-height: 1.55 !important;
}

.tt-system-field input:focus,
.tt-system-field textarea:focus {
    border-color: rgba(255, 205, 77, 0.74) !important;
    box-shadow: 0 0 0 3px rgba(255, 194, 62, 0.07) !important;
}

.tt-system-stat-grid {
    display: grid;
    grid-template-columns: 0.7fr 1.5fr 0.8fr;
    gap: 10px;

    margin-bottom: 12px;
}

.tt-system-stat-grid > div {
    padding: 12px 13px;

    border: 1px solid rgba(72, 188, 239, 0.13);
    border-radius: 12px;

    background: rgba(72, 188, 239, 0.045);
}

.tt-system-stat-grid span {
    display: block;

    margin-bottom: 5px;

    color: #7c8797;

    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tt-system-stat-grid strong {
    display: block;

    color: #62caf5;

    font-size: 13px;
    line-height: 1.35;
}

.tt-system-action-row {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;

    margin-top: 14px;
}

.tt-system-btn {
    min-width: 145px;
    min-height: 41px;

    padding: 9px 14px;

    border-radius: 10px;

    font-family: inherit;
    font-size: 10px;
    font-weight: 900;

    cursor: pointer;
}

.tt-system-btn.primary {
    border: 1px solid rgba(255, 194, 62, 0.42);
    background: linear-gradient(135deg, #f1c341, #bd7c13);
    color: #11151a;
}

.tt-system-btn.warning {
    border: 1px solid rgba(230, 126, 34, 0.38);
    background: rgba(230, 126, 34, 0.11);
    color: #ffb76e;
}

.tt-system-btn.danger {
    border: 1px solid rgba(231, 76, 60, 0.36);
    background: rgba(231, 76, 60, 0.10);
    color: #ff8175;
}

.tt-system-btn.secondary {
    border: 1px solid rgba(72, 188, 239, 0.38);
    background: rgba(72, 188, 239, 0.10);
    color: #68cdf7;
}

.tt-system-btn:disabled {
    opacity: 0.50;
    cursor: wait;
}

.tt-system-status {
    margin-top: 12px;
    padding: 10px 12px;

    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 10px;

    background: rgba(0, 0, 0, 0.18);
    color: #8e98a7;

    font-size: 10px;
    line-height: 1.5;
}

.tt-system-status.success {
    border-color: rgba(46, 204, 113, 0.24);
    color: #6bdd9e;
}

.tt-system-status.error {
    border-color: rgba(231, 76, 60, 0.28);
    color: #ff8b80;
}


@media (max-width: 700px) {
    .tt-maintenance-card {
        grid-template-columns: 1fr;
        gap: 18px;

        padding: 23px 20px;
    }

    .tt-maintenance-visual {
        width: 72px;
        height: 72px;

        border-radius: 19px;
    }

    .tt-maintenance-gear {
        font-size: 34px;
    }

    .tt-maintenance-time-grid,
    .tt-system-grid,
    .tt-system-stat-grid {
        grid-template-columns: 1fr;
    }

    .tt-system-field-full {
        grid-column: auto;
    }

    .tt-system-section-head {
        flex-direction: column;
    }

    .tt-system-action-row {
        display: grid;
        grid-template-columns: 1fr;
    }

    .tt-system-btn,
    #tt-maintenance-check {
        width: 100%;
        min-width: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .tt-maintenance-overlay,
    .tt-maintenance-card,
    .tt-maintenance-gear,
    .tt-maintenance-pulse,
    .btn-admin-system.maintenance-active {
        animation: none !important;
        transition: none !important;
    }
}

/* ==========================================================================
   SYSTEM CENTER V2
   Health Check, Backup Center, dan Change Log
   ========================================================================== */

.tt-system-health-section {
    border-color:
        rgba(46, 204, 113, 0.23);
}

.tt-system-health-section
.tt-system-section-head
> div
> span {
    color:
        #57dc91;
}


.tt-system-backup-section {
    border-color:
        rgba(155, 112, 255, 0.24);
}

.tt-system-backup-section
.tt-system-section-head
> div
> span {
    color:
        #b394ff;
}


.tt-system-changelog-section {
    border-color:
        rgba(255, 212, 59, 0.22);
}

.tt-system-changelog-section
.tt-system-section-head
> div
> span {
    color:
        #ffd45a;
}


/* HEALTH CHECK */

.tt-system-health-grid {
    display:
        grid;

    grid-template-columns:
        repeat(
            2,
            minmax(0, 1fr)
        );

    gap:
        10px;
}


.tt-system-health-card {
    display:
        grid;

    grid-template-columns:
        38px minmax(0, 1fr);

    gap:
        11px;

    align-items:
        flex-start;

    min-width:
        0;

    padding:
        13px;

    border:
        1px solid
        rgba(255, 255, 255, 0.08);

    border-radius:
        13px;

    background:
        rgba(255, 255, 255, 0.025);
}


.tt-system-health-card.is-ok {
    border-color:
        rgba(46, 204, 113, 0.25);

    background:
        rgba(46, 204, 113, 0.055);
}


.tt-system-health-card.is-error {
    border-color:
        rgba(231, 76, 60, 0.28);

    background:
        rgba(231, 76, 60, 0.055);
}


.tt-system-health-card.is-loading {
    border-color:
        rgba(72, 188, 239, 0.23);
}


.tt-system-health-icon {
    display:
        flex;

    align-items:
        center;

    justify-content:
        center;

    width:
        36px;

    height:
        36px;

    border-radius:
        11px;

    background:
        rgba(255, 255, 255, 0.06);

    color:
        #aeb6c3;

    font-size:
        18px;

    font-weight:
        900;
}


.tt-system-health-card.is-ok
.tt-system-health-icon {
    background:
        rgba(46, 204, 113, 0.13);

    color:
        #5ce09a;
}


.tt-system-health-card.is-error
.tt-system-health-icon {
    background:
        rgba(231, 76, 60, 0.13);

    color:
        #ff8175;
}


.tt-system-health-card
> div:last-child {
    min-width:
        0;
}


.tt-system-health-card strong {
    display:
        block;

    color:
        #f5f7fa;

    font-size:
        12px;
}


.tt-system-health-card span {
    display:
        block;

    margin-top:
        4px;

    color:
        #8d96a5;

    font-size:
        10px;

    line-height:
        1.45;

    overflow-wrap:
        anywhere;
}


.tt-system-health-card small {
    display:
        block;

    margin-top:
        7px;

    color:
        #626c7b;

    font-size:
        9px;
}


/* BACKUP */

.tt-system-backup-actions {
    display:
        flex;

    align-items:
        center;

    flex-wrap:
        wrap;

    gap:
        10px;
}


/* FIELD SELECT */

.tt-system-field select {
    width:
        100%
        !important;

    height:
        44px
        !important;

    margin:
        0
        !important;

    padding:
        0 13px
        !important;

    border:
        1px solid
        rgba(255, 194, 62, 0.18)
        !important;

    border-radius:
        11px
        !important;

    background:
        #090e16
        !important;

    color:
        #f4f6f9
        !important;

    font-family:
        inherit
        !important;

    font-size:
        12px
        !important;

    outline:
        none
        !important;

    box-sizing:
        border-box
        !important;
}


.tt-system-field select:focus {
    border-color:
        rgba(255, 212, 90, 0.52)
        !important;

    box-shadow:
        0 0 0 3px
        rgba(255, 212, 90, 0.07)
        !important;
}


/* CHANGE LOG */

.tt-system-changelog-form {
    margin-top:
        2px;
}


.tt-system-changelog-list {
    display:
        flex;

    flex-direction:
        column;

    gap:
        9px;

    max-height:
        350px;

    margin-top:
        14px;

    padding-right:
        3px;

    overflow-y:
        auto;
}


.tt-system-changelog-list::-webkit-scrollbar {
    width:
        5px;
}


.tt-system-changelog-list::-webkit-scrollbar-thumb {
    border-radius:
        999px;

    background:
        rgba(255, 212, 90, 0.37);
}


.tt-system-changelog-item {
    padding:
        13px 14px;

    border:
        1px solid
        rgba(255, 255, 255, 0.075);

    border-radius:
        13px;

    background:
        rgba(0, 0, 0, 0.16);
}


.tt-system-changelog-top {
    display:
        flex;

    align-items:
        flex-start;

    justify-content:
        space-between;

    gap:
        12px;
}


.tt-system-changelog-top
> div {
    display:
        flex;

    align-items:
        center;

    flex-wrap:
        wrap;

    gap:
        8px;

    min-width:
        0;
}


.tt-system-changelog-top strong {
    color:
        #f4f6f9;

    font-size:
        12px;

    line-height:
        1.4;

    overflow-wrap:
        anywhere;
}


.tt-system-changelog-type {
    display:
        inline-flex;

    align-items:
        center;

    min-height:
        23px;

    padding:
        0 8px;

    border:
        1px solid
        rgba(255, 212, 59, 0.24);

    border-radius:
        999px;

    background:
        rgba(255, 212, 59, 0.07);

    color:
        #ffd45a;

    font-size:
        8px;

    font-weight:
        900;

    letter-spacing:
        0.6px;
}


.tt-system-changelog-type.type-fix {
    border-color:
        rgba(72, 188, 239, 0.25);

    background:
        rgba(72, 188, 239, 0.07);

    color:
        #68cdf7;
}


.tt-system-changelog-type.type-security {
    border-color:
        rgba(231, 76, 60, 0.26);

    background:
        rgba(231, 76, 60, 0.07);

    color:
        #ff8175;
}


.tt-system-changelog-type.type-maintenance {
    border-color:
        rgba(230, 126, 34, 0.27);

    background:
        rgba(230, 126, 34, 0.07);

    color:
        #ffb15a;
}


.tt-system-changelog-item p {
    margin:
        9px 0 7px;

    color:
        #9aa3b0;

    font-size:
        10px;

    line-height:
        1.55;

    white-space:
        pre-wrap;

    overflow-wrap:
        anywhere;
}


.tt-system-changelog-item small {
    color:
        #626c7b;

    font-size:
        9px;
}


.tt-system-changelog-delete {
    flex:
        0 0 29px;

    width:
        29px;

    height:
        29px;

    padding:
        0;

    border:
        1px solid
        rgba(231, 76, 60, 0.22);

    border-radius:
        9px;

    background:
        rgba(231, 76, 60, 0.07);

    color:
        #ff8175;

    font-size:
        17px;

    cursor:
        pointer;
}


.tt-system-changelog-delete:hover {
    background:
        rgba(231, 76, 60, 0.16);
}


.tt-system-changelog-delete:disabled {
    opacity:
        0.45;

    cursor:
        wait;
}


.tt-system-changelog-empty {
    padding:
        18px;

    border:
        1px dashed
        rgba(255, 255, 255, 0.10);

    border-radius:
        12px;

    color:
        #6f7887;

    font-size:
        10px;

    text-align:
        center;
}


@media (max-width: 700px) {
    .tt-system-health-grid {
        grid-template-columns:
            1fr;
    }

    .tt-system-health-section
    .tt-system-section-head
    .tt-system-btn {
        width:
            100%;
    }

    .tt-system-changelog-list {
        max-height:
            420px;
    }
}