* {
    box-sizing: border-box;
    font-family: "Segoe UI", sans-serif;
}

body {
    margin: 0;
    background: linear-gradient(135deg, #2563eb, #1e40af);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.container {
    width: 100%;
    max-width: 420px;
    padding: 20px;
}

.header {
    text-align: center;
    color: #fff;
    margin-bottom: 20px;
}

.card {
    background: #fff;
    border-radius: 14px;
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.center {
    text-align: center;
}

.btn-primary {
    background: #2563eb;
    color: #fff;
    border: none;
    padding: 14px 20px;
    font-size: 16px;
    border-radius: 10px;
    cursor: pointer;
    width: 100%;
    transition: 0.2s;
}

.btn-primary:hover {
    background: #1e40af;
}

.ticket-box {
    margin-top: 10px;
    border: 1px dashed #c7d2fe;
    border-radius: 10px;
    padding: 15px;
}

.ticket-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.ticket-row span {
    color: #6b7280;
    font-size: 14px;
}

.ticket-row b {
    color: #111827;
}

.empty {
    text-align: center;
    color: #6b7280;
}

.footer {
    text-align: center;
    margin-top: 10px;
}

.logout {
    text-decoration: none;
    color: #fff;
    font-weight: bold;
}
/* ===== LOGIN FORM ===== */

.login-header {
    text-align: center;
    margin-bottom: 20px;
}

.login-header h2 {
    margin: 0;
    color: #1e40af;
}

.login-header p {
    color: #6b7280;
    font-size: 14px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    font-size: 14px;
    margin-bottom: 5px;
    color: #374151;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border-radius: 10px;
    border: 1px solid #d1d5db;
    font-size: 14px;
}

.form-group input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 2px rgba(37,99,235,0.2);
}

.login-footer {
    text-align: center;
    margin-top: 15px;
    color: #9ca3af;
    font-size: 12px;
}
/* ===== LOGO ===== */
.logo {
    text-align: center;
    margin-bottom: 10px;
}

.logo img {
    width: 80px;
}

/* ===== ALERT ===== */
.alert {
    background: #fee2e2;
    color: #991b1b;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 15px;
    font-size: 14px;
    text-align: center;
}

/* ===== SHAKE ANIMATION ===== */
@keyframes shake {
    0% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    50% { transform: translateX(5px); }
    75% { transform: translateX(-5px); }
    100% { transform: translateX(0); }
}

.shake {
    animation: shake 0.3s;
}

/* ===== PASSWORD TOGGLE ===== */
.password-group {
    position: relative;
}

.password-group .toggle {
    position: absolute;
    right: 12px;
    top: 38px;
    cursor: pointer;
    font-size: 14px;
}
.alert {
    padding: 12px;
    border-radius: 10px;
    margin-bottom: 15px;
    font-size: 14px;
    text-align: center;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
}

.alert-success {
    background: #dcfce7;
    color: #166534;
}
/* FILTER BAR */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-end;
    margin-bottom: 20px;
}

.filter-group {
    display: flex;
    flex-direction: column;
    min-width: 160px;
}

.filter-group label {
    font-size: 12px;
    color: #666;
    margin-bottom: 4px;
}

.filter-group input,
.filter-group select {
    padding: 8px 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 14px;
}

.filter-group.actions {
    flex-direction: row;
    gap: 8px;
}

/* BUTTON */
.btn-primary {
    background: #2563eb;
    color: #fff;
    border: none;
    padding: 9px 14px;
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
    font-size: 14px;
}

.btn-secondary {
    background: #16a34a;
    color: #fff;
    padding: 9px 14px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
}

/* RESPONSIVE */
@media (max-width: 600px) {
    .filter-group {
        min-width: 100%;
    }
    .filter-group.actions {
        justify-content: space-between;
    }
}
/* TABEL */
table {
    border-collapse: collapse;
    width: 100%;
}

th {
    background: #f1f5f9;
    text-align: left;
    font-size: 14px;
}

td, th {
    padding: 10px;
    border-bottom: 1px solid #e5e7eb;
}

/* BUTTON UMUM */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    font-size: 13px;
    border-radius: 6px;
    text-decoration: none;
    color: #fff;
    white-space: nowrap;
}

/* VARIAN */
.btn-edit {
    background: #2563eb;
}

.btn-delete {
    background: #dc2626;
}

.btn-edit:hover {
    background: #1d4ed8;
}

.btn-delete:hover {
    background: #b91c1c;
}

/* CONTAINER AKSI */
.action-buttons {
    display: flex;
    gap: 8px;
}
@media (max-width: 600px) {
    .action-buttons {
        flex-direction: column;
    }
}
/* TABLE */
.table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed; /* 🔑 penting */
}

.table th,
.table td {
    padding: 10px;
    border-bottom: 1px solid #e5e7eb;
    vertical-align: middle;
}

/* KOLOM AKSI */
.col-aksi {
    width: 110px;
    text-align: center;
}

/* CONTAINER BUTTON */
.action-buttons {
    display: flex;
    justify-content: center;
    gap: 8px;
}

/* BUTTON ICON */
.btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    text-decoration: none;
    color: #fff;
    font-size: 16px;
}

/* WARNA */
.btn-edit {
    background: #2563eb;
}

.btn-delete {
    background: #dc2626;
}

.btn-edit:hover {
    background: #1d4ed8;
}

.btn-delete:hover {
    background: #b91c1c;
}
/* KOLOM NIP */
.col-nip {
    width: 160px;
    white-space: nowrap;      /* ❌ jangan pecah baris */
    overflow: hidden;         /* ❌ jangan melebar */
    text-overflow: ellipsis;  /* … jika kepanjangan */
}

/* KOLOM NAMA */
.col-nama {
    word-break: break-word;
}

/* RESPONSIVE */
@media (max-width: 600px) {
    .col-nip {
        width: 130px;
        font-size: 13px;
    }
}
/* HEADER */
.header-card h2 {
    margin-bottom: 4px;
}
.header-card p {
    color: #666;
    font-size: 14px;
}

/* GRID MENU */
.button-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

/* STATISTIK */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.stat-box {
    padding: 16px;
    border-radius: 10px;
    text-align: center;
    font-size: 14px;
}

.stat-box b {
    display: block;
    font-size: 22px;
    margin-top: 6px;
}

.stat-box.ready {
    background: #dcfce7;
    color: #166534;
}

.stat-box.used {
    background: #fee2e2;
    color: #991b1b;
}

/* BUTTON FULL */
.btn-full {
    width: 100%;
    text-align: center;
}

/* RESPONSIVE HP */
@media (max-width: 600px) {
    .button-grid {
        grid-template-columns: 1fr;
    }
    .stat-grid {
        grid-template-columns: 1fr;
    }
}
.select-search {
    width: 100%;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #ccc;
    font-size: 14px;
}

#actionArea {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
/* AREA AKSI */
.action-area {
    display: none;
    margin-top: 16px;
    gap: 10px;
}

/* AKTIF */
.action-area.show {
    display: flex;
    align-items: center;
}

/* TOMBOL */
.action-area .btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;

    min-width: 140px;
    height: 40px;

    font-size: 14px;
    font-weight: 500;
    border-radius: 8px;
    text-decoration: none;
    color: #fff;
}

/* WARNA */
.btn-edit {
    background: #2563eb;
}

.btn-delete {
    background: #dc2626;
}

.btn-edit:hover {
    background: #1d4ed8;
}

.btn-delete:hover {
    background: #b91c1c;
}

/* RESPONSIVE HP */
@media (max-width: 600px) {
    .action-area {
        flex-direction: column;
    }

    .action-area .btn {
        width: 100%;
    }
}
/* FORM */
.form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-weight: 500;
    font-size: 14px;
}

.form-group input {
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid #d1d5db;
    font-size: 14px;
    width: 100%;
}

/* ACTION BUTTON */
.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

/* RESPONSIVE HP */
@media (max-width: 600px) {
    .form-actions {
        flex-direction: column;
    }

    .form-actions a,
    .form-actions button {
        width: 100%;
        text-align: center;
    }
}
.btn-disabled {
    background: #d1d5db;
    color: #555;
    padding: 12px;
    border-radius: 8px;
    border: none;
    width: 100%;
    font-size: 14px;
    cursor: not-allowed;
}
textarea {
    width: 100%;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #d1d5db;
    font-size: 14px;
    resize: vertical;
}
.action-top {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.select-search {
    width: 100%;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #ddd;
}

.action-area {
    display: none;
    margin-top: 15px;
    gap: 10px;
}

.action-area.show {
    display: flex;
    flex-wrap: wrap;
}
.alert {
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 15px;
    font-weight: 500;
}

.alert-success {
    background: #e6f9ee;
    color: #0a7a3d;
    border: 1px solid #a6e3c1;
}
.form-group {
    margin-bottom: 14px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
}

.form-group input {
    width: 100%;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #ccc;
    box-sizing: border-box;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.form-actions button,
.form-actions a {
    flex: 1;
    text-align: center;
}

.hint {
    font-size: 12px;
    color: #666;
}

