/* ================= RESET ================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ================= BODY ================= */
body {
    font-family: 'Segoe UI', sans-serif;
    background: #0f172a;
    color: #e2e8f0;
}

/* ================= LAYOUT ================= */
.wrapper {
    display: flex;
    min-height: 100vh;
}

/* ================= SIDEBAR ================= */
.sidebar {
    width: 240px;
    background: #020617;
    padding: 20px;
    border-right: 1px solid #1e293b;
}

.sidebar h2 {
    color: #22c55e;
    margin-bottom: 30px;
    font-size: 20px;
}

.sidebar a {
    display: block;
    padding: 12px;
    margin-bottom: 10px;
    color: #94a3b8;
    text-decoration: none;
    border-radius: 8px;
    transition: 0.2s;
}

.sidebar a:hover {
    background: #1e293b;
    color: #fff;
}

.sidebar a.active {
    background: #22c55e;
    color: #000;
}

/* ================= MAIN ================= */
.main {
    flex: 1;
    padding: 25px;
}

/* ================= HEADER ================= */
.header {
    margin-bottom: 20px;
}

.header h2 {
    font-size: 24px;
}

/* ================= GRID ================= */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

/* ================= CARD ================= */
.card {
    background: #020617;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #1e293b;
    transition: 0.2s;
    flex:1;
}

.card:hover {
    transform: translateY(-3px);
}

/* ================= CARD TITLE ================= */
.card h3 {
    margin-bottom: 10px;
    color: #94a3b8;
}

.cards{
    display:flex; 
    gap:20px;
}

/* ================= TABLE ================= */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    font-size: 14px;
}

table th, table td {
    padding: 12px;
}

table th {
    background: #1e293b;
    text-align: left;
}

table tr {
    border-bottom: 1px solid #1e293b;
}

table tr:hover {
    background: #020617;
}

/* ================= BUTTON ================= */
.btn {
    padding: 8px 12px;
    background: #22c55e;
    color: #000;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}

.btn:hover {
    opacity: 0.85;
}

/* ================= LINK ================= */
a {
    color: #22c55e;
}

/* ================= SCROLL ================= */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-thumb {
    background: #1e293b;
    border-radius: 3px;
}
#searchInput {
    background: #020617;
    border: 1px solid #1e293b;
    color: #fff;
}
/* ================= TOPBAR ================= */
.topbar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 0px;
}

.topbar-right {
    background: #020617;
    padding: 10px 15px;
    border-radius: 8px;
    border: 1px solid #1e293b;
    font-size: 14px;
}

.topbar-right a {
    color: #22c55e;
    text-decoration: none;
}

.topbar-right a:hover {
    opacity: 0.8;
}
/* BUTTON */
.btn-add {
    background: linear-gradient(45deg, #00c6ff, #0072ff);
    border: none;
    padding: 10px 18px;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    font-weight: bold;
    margin-bottom: 15px;
}

.btn-add:hover {
    opacity: 0.9;
}

/* MODAL */
.modal {
    display: none;
    position: fixed;
    z-index: 999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(5px);
}

/* MODAL BOX */
.modal-content {
    background: #0f172a;
    margin: 8% auto;
    padding: 25px;
    width: 400px;
    border-radius: 12px;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
    color: white;
    animation: fadeIn 0.3s ease;
}

/* HEADER */
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modal-header h3 {
    margin: 0;
}

/* CLOSE BUTTON */
.close {
    font-size: 22px;
    cursor: pointer;
}

/* FORM */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    font-size: 13px;
    margin-bottom: 5px;
    color: #9ca3af;
}

.form-group input {
    width: 100%;
    padding: 10px;
    border: none;
    border-radius: 8px;
    background: #1e293b;
    color: white;
}

/* BUTTON SAVE */
.btn-save {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(45deg, #22c55e, #16a34a);
    color: white;
    font-weight: bold;
    cursor: pointer;
}

.btn-save:hover {
    opacity: 0.9;
}

/* ANIMATION */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.script-row {
    display: none;
    background: #0f172a;
}

.script-box {
    padding: 15px;
}

.script-box textarea {
    width: 100%;
    background: #020617;
    color: #22c55e;
    border: none;
    border-radius: 8px;
    padding: 10px;
    font-family: monospace;
    font-size: 12px;
}

.btn-copy {
    margin-top: 10px;
    padding: 8px 14px;
    background: #22c55e;
    border: none;
    border-radius: 6px;
    color: white;
    cursor: pointer;
}
.paket-box{
    background: rgba(255,255,255,0.05);
    padding: 12px;
    border-radius: 10px;
    font-size: 14px;
    color: #ccc;
}

.form-grid{
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.form-grid textarea{
    grid-column: span 2;
}

.form-grid button{
    grid-column: span 2;
    background: #00c853;
    border: none;
    padding: 12px;
    border-radius: 8px;
    color: white;
    font-weight: bold;
}
.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 15px;
}

.pagination a {
    padding: 6px 10px;
    background: #1f2937;
    color: #ccc;
    border-radius: 6px;
    text-decoration: none;
    font-size: 13px;
}

.pagination a.active {
    background: #22c55e;
    color: #fff;
}

.pagination span {
    padding: 6px 8px;
    color: #888;
}

.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    border: none;
    background: #1e293b;
    color: #fff;
    font-size: 14px;
    outline: none;
}

/* khusus textarea */
.form-group textarea {
    min-height: 80px;
    resize: vertical;
}

.form-group select {
    appearance: none;
    cursor: pointer;
}

/* optional: custom arrow */
.form-group select {
    background-image: url("data:image/svg+xml;utf8,<svg fill='white' height='20' viewBox='0 0 20 20' width='20' xmlns='http://www.w3.org/2000/svg'><polygon points='5,7 10,12 15,7'/></svg>");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 14px;
}
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    color: #94a3b8;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    box-shadow: 0 0 0 2px #22c55e;
}

td button {
    background: #3b82f6;
    border: none;
    padding: 6px 10px;
    border-radius: 6px;
    color: white;
    cursor: pointer;
}

td a {
    background: #ef4444;
    padding: 6px 10px;
    border-radius: 6px;
    color: white;
    text-decoration: none;
    margin-left: 5px;
}
/* ================= FILTER BOX ================= */
.filter-box {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    background: #0f172a;
    padding: 12px;
    border-radius: 10px;
    margin-bottom: 15px;
    box-shadow: 0 0 10px rgba(0,255,150,0.05);
}

/* INPUT & SELECT */
.filter-box select,
.filter-box input[type="date"] {
    background: #1e293b;
    border: 1px solid #334155;
    color: #e2e8f0;
    padding: 8px 10px;
    border-radius: 6px;
    font-size: 13px;
    outline: none;
    transition: 0.2s;
}

/* HOVER */
.filter-box select:hover,
.filter-box input:hover {
    border-color: #22c55e;
}

/* FOCUS */
.filter-box select:focus,
.filter-box input:focus {
    border-color: #22c55e;
    box-shadow: 0 0 5px rgba(34,197,94,0.4);
}

/* BUTTON */
.filter-box button {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    border: none;
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: 0.2s;
}

/* BUTTON HOVER */
.filter-box button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(34,197,94,0.4);
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .filter-box {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-box select,
    .filter-box input,
    .filter-box button {
        width: 100%;
    }
}

.filter-wrapper {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 0px;
}

.filter-wrapper select,
.filter-wrapper input {
    padding: 8px 12px;
    border-radius: 8px;
    border: none;
    background: #1e2a38;
    color: #fff;
}

.btn-filter {
    background: #22c55e;
    color: white;
    padding: 8px 14px;
    border-radius: 8px;
    border: none;
}

.btn-generate {
    background: #3b82f6;
    color: white;
    padding: 8px 14px;
    border-radius: 8px;
    border: none;
}
.form-box {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.form-box input,
.form-box textarea {
    padding: 10px;
    border-radius: 8px;
    border: none;
    background: #1e2a38;
    color: white;
}

.btn-save {
    background: #22c55e;
    padding: 10px;
    border-radius: 8px;
    border: none;
    color: white;
    cursor: pointer;
}
.invoice-actions {
    display:flex;
    gap:10px;
    margin-top:15px;
}

.btn {
    padding:8px 14px;
    border-radius:6px;
    background:#1e293b;
    color:#fff;
    text-decoration:none;
}

.btn-success {
    background:#16a34a;
}

.btn-primary {
    background:#2563eb;
}

.badge {
    padding:6px 10px;
    border-radius:6px;
    font-size:12px;
}

.badge.success {
    background:#16a34a;
}

.badge.warning {
    background:#f59e0b;
}
.invoice-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 15px;
}
.form-section {
    margin-bottom: 20px;
}

.form-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.form-grid-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
}

.form-full {
    grid-column: span 2;
}

textarea {
    min-height: 70px;
    resize: vertical;
}
.badgestatus.success { background:transparent; }
.badgestatus.warning { background:transparent; }
.badgestatus.danger  { background:transparent; }
.status.pending { color: orange; }
.status.active { color: green; }
.status.reject { color: red; }

.alert-box {
    background: transparent;
    border: 1px solid #ffeeba;
    padding: 12px 15px;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.alert-box .actions button {
    background: #28a745;
    color: white;
    border: none;
    padding: 6px 10px;
    border-radius: 5px;
    cursor: pointer;
}

.alert-box .actions button:disabled {
    background: #ccc;
    cursor: not-allowed;
}
.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #333;
    color: #fff;
    padding: 10px 15px;
    border-radius: 6px;
    opacity: 0;
    transition: 0.3s;
}

.toast.show {
    opacity: 1;
}
.button:disabled {
    opacity: 0.6;
}
.disabled-link {
    opacity: 0.5;
    pointer-events: none;
    cursor: not-allowed;
}
.alert {
    padding:10px;
    margin-bottom:10px;
    border-radius:5px;
    font-size:14px;
}

.alert.success {
    background:#d4edda;
    color:#155724;
}

.alert.error {
    background:#f8d7da;
    color:#721c24;
}
.doc-actions {
    display:flex;
    gap:10px;
    margin-top:10px;
    flex-wrap:wrap;
}

.btn-doc {
    background:#ffc107;
    padding:8px 12px;
    border-radius:6px;
    text-decoration:none;
    color:#000;
    font-weight:bold;
}

.btn-doc:hover {
    background:#e0a800;
}
#uploadModal {
    display:none;
    position:fixed;
    top:0;
    left:0;
    width:100%;
    height:100%;
    background:rgba(0,0,0,0.5);
}

#uploadModal .box {
    background:#fff;
    padding:20px;
    width:300px;
    margin:100px auto;
    border-radius:10px;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { transform: scale(0.8); opacity:0; }
    to   { transform: scale(1); opacity:1; }
}