
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    min-height: 100vh;
    padding: 25px 15px;

    background:
        repeating-linear-gradient(
            45deg,
            #1764b0,
            #1764b0 22px,
            #2477c7 22px,
            #2477c7 44px
        );
}

.container {
    width: 100%;
    max-width: 825px;
    margin: auto;
}

.control-panel {
    background: #0c2b50;
    padding: 25px;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    margin-bottom: 20px;
}

.top-controls,
.bottom-controls,
.button-controls {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.bottom-controls,
.button-controls {
    margin-top: 15px;
}

label {
    font-size: 14px;
    color: #38bdf8;
    font-weight: bold;
}

select,
input[type="date"] {
    background: #081b32;
    border: 1px solid #405977;
    color: #ffffff;
    border-radius: 9px;
    padding: 12px;
    min-height: 40px;
    font-weight: bold;
}

select {
    min-width: 145px;
}

input[type="date"] {
    width: 145px;
}

.btn {
    border: none;
    padding: 12px 16px;
    color: white;
    border-radius: 9px;
    cursor: pointer;
    font-weight: bold;
    transition: 0.2s;
}

.btn:hover {
    transform: translateY(-2px);
    filter: brightness(1.1);
}

.blue {
    background: #2563eb;
}

.cyan {
    background: #0891b2;
}

.orange {
    background: #f59e0b;
}

.green {
    background: #059669;
}

.purple {
    background: #9333ea;
}

.red {
    background: #dc2626;
}

.title-panel {
    background: #0c2b50;
    padding: 18px;
    border-radius: 15px;
    text-align: center;
    color: #fde047;
    font-size: 17px;
    font-weight: bold;
    margin-bottom: 20px;
    box-shadow: 0 8px 18px rgba(0,0,0,0.15);
}

.content-panel {
    background: #ffffff;
    padding: 25px;
    border-radius: 16px;
    color: #334155;
    text-align: center;
    line-height: 1.8;
    box-shadow: 0 8px 18px rgba(0,0,0,0.15);
    overflow-wrap: anywhere;
}

.content-panel p {
    margin-bottom: 10px;
}

.toast {
    position: fixed;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    background: #059669;
    color: white;
    padding: 12px 20px;
    border-radius: 10px;
    opacity: 0;
    pointer-events: none;
    transition: 0.3s;
    z-index: 100;
}

.toast.show {
    opacity: 1;
}

@media (max-width: 600px) {
    body {
        padding: 15px 10px;
    }

    .control-panel {
        padding: 18px 12px;
    }

    .top-controls,
    .bottom-controls,
    .button-controls {
        flex-direction: column;
        width: 100%;
    }

    select,
    input[type="date"],
    .btn {
        width: 100%;
    }

    label {
        align-self: flex-start;
    }

    .title-panel {
        font-size: 15px;
    }
}

/* ===== EDITOR TEMPLATE - PERBAIKAN ===== */

.template-panel {
    display: block;
    width: 100%;
    background: #0c2b50;
    padding: 25px;
    border-radius: 16px;
    margin-bottom: 20px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    color: white;
}

.template-panel h3 {
    color: #38bdf8;
    font-size: 18px;
    text-align: center;
    margin-bottom: 10px;
}

.template-help {
    color: #cbd5e1;
    font-size: 13px;
    text-align: center;
    margin-bottom: 15px;
}

#templateEditor {
    display: block;
    width: 100%;
    min-height: 220px;
    resize: vertical;
    padding: 15px;
    background: #071b33;
    border: 1px solid #405977;
    border-radius: 10px;
    color: #ffffff;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px;
    line-height: 1.8;
    outline: none;
}

#templateEditor:focus {
    border-color: #38bdf8;
    box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.15);
}

.template-buttons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

@media (max-width: 600px) {
    .template-panel {
        padding: 15px;
    }

    .template-buttons {
        flex-direction: column;
    }

    .template-buttons .btn {
        width: 100%;
    }
}
/* ===== ADMIN PANEL ===== */

.admin-panel {
    margin-bottom: 20px;
}

.admin-toggle {
    display: block;
    width: 100%;
    margin-bottom: 15px;
    background: #0c2b50;
    border: 1px solid #38bdf8;
    color: #38bdf8;
}

.admin-content {
    background: #0c2b50;
    padding: 25px;
    border-radius: 16px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
    color: white;
}

.admin-content.hidden {
    display: none;
}

.admin-content h2 {
    text-align: center;
    color: #fde047;
    margin-bottom: 20px;
}

.admin-box {
    background: #071b33;
    border: 1px solid #334e68;
    border-radius: 12px;
    padding: 18px;
    margin-bottom: 18px;
}

.admin-box:last-child {
    margin-bottom: 0;
}

.admin-box h3 {
    color: #38bdf8;
    margin-bottom: 15px;
    text-align: center;
}

.admin-input {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
}

.admin-input input {
    flex: 1;
    min-width: 150px;
    background: #102b49;
    border: 1px solid #405977;
    border-radius: 9px;
    padding: 12px;
    color: white;
    outline: none;
}

.admin-input input:focus {
    border-color: #38bdf8;
}

.item-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.admin-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 12px;
    background: #0c2b50;
    border-radius: 9px;
    color: white;
    overflow-wrap: anywhere;
}

.admin-item span {
    flex: 1;
}

.delete-item {
    background: #dc2626;
    border: none;
    color: white;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
}

.delete-item:hover {
    background: #b91c1c;
}

@media (max-width: 600px) {
    .admin-content {
        padding: 15px;
    }

    .admin-input {
        flex-direction: column;
    }

    .admin-input input,
    .admin-input button {
        width: 100%;
    }
}