/* Reset & Base Variables */
:root {
    --bg-color: #0f172a;
    --text-color: #f8fafc;
    --primary: #3b82f6;
    --primary-hover: #2563eb;
    --danger: #ef4444;
    --glass-bg: rgba(30, 41, 59, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
    --input-bg: rgba(15, 23, 42, 0.6);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    background-image: 
        radial-gradient(at 0% 0%, rgba(59,130,246,0.15) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(139,92,246,0.15) 0px, transparent 50%);
    background-attachment: fixed;
    min-height: 100vh;
}

/* Glassmorphism Classes */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* Typography & Titles */
h2, h3 { font-weight: 600; letter-spacing: -0.025em; }

/* Buttons */
.btn-primary {
    background: var(--primary);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-family: 'Outfit', sans-serif;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.btn-primary:hover { background: var(--primary-hover); transform: translateY(-1px); }
.btn-small { padding: 6px 12px; font-size: 0.875rem; border-radius: 6px; }

.btn-danger  { background: var(--danger);  color: white; border: none; cursor: pointer; transition: 0.3s; display: inline-flex; align-items: center; gap: 6px; }
.btn-danger:hover  { background: #dc2626; }

.btn-secondary { background: rgba(100,116,139,0.3); color: #cbd5e1; border: 1px solid rgba(255,255,255,0.1); cursor: pointer; transition: 0.3s; font-family: 'Outfit', sans-serif; display: inline-flex; align-items: center; gap: 6px; }
.btn-secondary:hover { background: rgba(100,116,139,0.5); color: white; }

.btn-warning  { background: rgba(245,158,11,0.2); color: #fbbf24; border: 1px solid rgba(245,158,11,0.3); cursor: pointer; transition: 0.3s; font-family: 'Outfit', sans-serif; display: inline-flex; align-items: center; gap: 6px; }
.btn-warning:hover  { background: rgba(245,158,11,0.35); }

.btn-success  { background: rgba(34,197,94,0.15); color: #4ade80; border: 1px solid rgba(34,197,94,0.3); cursor: pointer; transition: 0.3s; font-family: 'Outfit', sans-serif; display: inline-flex; align-items: center; gap: 6px; }
.btn-success:hover  { background: rgba(34,197,94,0.3); }

.text-danger { color: var(--danger); }

/* File input */
input[type="file"] {
    width: 100%;
    padding: 10px;
    background: var(--input-bg);
    border: 1px dashed var(--glass-border);
    border-radius: 8px;
    color: #94a3b8;
    font-family: inherit;
    cursor: pointer;
}
input[type="file"]::-webkit-file-upload-button {
    background: var(--primary);
    color: white;
    border: none;
    padding: 6px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-family: 'Outfit', sans-serif;
    margin-right: 10px;
}


/* Form Elements */
.input-group { margin-bottom: 20px; }
.input-group label { display: block; margin-bottom: 8px; font-size: 0.9rem; color: #cbd5e1; }
.input-group input, .input-group textarea, .input-group select {
    width: 100%;
    padding: 12px;
    background: var(--input-bg);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: white;
    font-family: inherit;
    transition: all 0.3s ease;
}
.input-group input:focus, .input-group textarea:focus, .input-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}
.input-group textarea { resize: vertical; min-height: 80px; }

/* Login Pages */
.login-body { display: flex; justify-content: center; align-items: center; }
.login-box { width: 100%; max-width: 400px; padding: 40px; text-align: center; }
.login-header { margin-bottom: 30px; }
.login-header .lock-icon { width: 48px; height: 48px; color: var(--primary); margin-bottom: 15px; }
.login-header h2 { font-size: 1.8rem; margin-bottom: 5px; }
.login-header p { color: #94a3b8; font-size: 0.9rem; }
.login-box .btn-primary { width: 100%; margin-top: 10px; padding: 14px; font-size: 1rem; }
.error-msg { color: #ef4444; font-size: 0.875rem; margin-bottom: 15px; min-height: 20px; }

/* Dashboard Layout */
.dashboard-body { display: flex; height: 100vh; overflow: hidden; }

/* Sidebar */
.sidebar { width: 260px; height: 100vh; padding: 20px; border-radius: 0; display: flex; flex-direction: column; border-top: none; border-left: none; border-bottom: none; z-index: 10;}
.logo-area { text-align: center; margin-bottom: 40px; padding-bottom: 20px; border-bottom: 1px solid var(--glass-border); }
.isp-logo img { max-width: 100px; max-height: 100px; border-radius: 12px; }
.logo-placeholder { width: 80px; height: 80px; background: var(--primary); color: white; display: flex; justify-content: center; align-items: center; border-radius: 20px; font-size: 2rem; font-weight: bold; margin: 0 auto 15px; }
.nav-links { list-style: none; }
.nav-btn {
    width: 100%; text-align: left; background: transparent; border: none; color: #cbd5e1; padding: 12px 15px; margin-bottom: 5px; border-radius: 8px; font-size: 1rem; cursor: pointer; transition: 0.3s; font-family: inherit;
}
.nav-btn:hover { background: rgba(255,255,255,0.05); color: white; }
.nav-btn.active { background: rgba(59, 130, 246, 0.1); color: var(--primary); font-weight: 600; }

/* Main Content */
.main-content { flex: 1; padding: 20px 40px; overflow-y: auto; }
.topbar { padding: 20px 30px; display: flex; justify-content: space-between; align-items: center; margin-bottom: 30px; }
.user-info { display: flex; align-items: center; gap: 15px; font-weight: 500; }

.tab-content { display: none; animation: fadeIn 0.4s ease forwards; }
.tab-content.active { display: block; }

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

/* Table */
.action-bar { padding: 15px 25px; margin-bottom: 20px; display: flex; justify-content: space-between; align-items: center; }
.table-container { padding: 20px; overflow-x: auto; }
.styled-table { width: 100%; border-collapse: collapse; text-align: left; }
.styled-table th { background: rgba(255,255,255,0.05); padding: 15px; color: #94a3b8; font-weight: 500; font-size: 0.875rem; text-transform: uppercase; letter-spacing: 0.05em; border-bottom: 1px solid var(--glass-border); }
.styled-table td { padding: 15px; border-bottom: 1px solid var(--glass-border); color: #e2e8f0; }
.styled-table tr:hover td { background: rgba(255,255,255,0.02); }
.customer-table th:first-child,
.customer-table td:first-child {
    text-align: center;
}

.table-check {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: var(--primary);
}

.customer-name-cell {
    font-weight: 600;
    color: white;
}

.package-chip {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(59,130,246,0.18);
    color: #93c5fd;
    font-size: 0.78rem;
    font-weight: 600;
}

.qris-status-cell {
    text-align: center;
}

.qris-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 58px;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
}

.qris-badge.ok {
    color: #4ade80;
    background: rgba(34,197,94,0.14);
}

.qris-badge.empty {
    color: #94a3b8;
    background: rgba(148,163,184,0.12);
}

.action-icons {
    display: flex;
    align-items: center;
    gap: 8px;
}

.icon-btn {
    width: 34px;
    height: 34px;
    border: none;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
    color: white;
    font-size: 0.95rem;
}

.icon-btn:hover {
    transform: translateY(-1px);
}

.icon-btn-view {
    background: rgba(59,130,246,0.18);
    color: #93c5fd;
}

.icon-btn-edit {
    background: rgba(245,158,11,0.18);
    color: #fcd34d;
}

.icon-btn-delete {
    background: rgba(239,68,68,0.18);
    color: #fca5a5;
}

/* Forms Panel */
.form-panel { padding: 30px; max-width: 600px; margin: 0 auto; }
.form-panel h3 { margin-bottom: 25px; color: white; }

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 100;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    padding: 24px 16px;
    background-color: rgba(0,0,0,0.6);
    backdrop-filter: blur(5px);
    justify-content: center;
    align-items: flex-start;
    overflow-y: auto;
}
.modal-content {
    padding: 30px;
    width: 100%;
    max-width: 500px;
    max-height: calc(100vh - 48px);
    margin: auto;
    position: relative;
    overflow-y: auto;
    animation: modalIn 0.3s ease;
}
@keyframes modalIn { from { transform: scale(0.95); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.close { position: absolute; right: 20px; top: 20px; color: #94a3b8; font-size: 28px; font-weight: bold; cursor: pointer; transition: 0.3s; }
.close:hover { color: white; }
.modal h2 { margin-bottom: 25px; }

@media (max-width: 640px) {
    .main-content {
        padding: 16px;
    }

    .modal {
        padding: 12px;
    }

    .modal-content {
        padding: 22px 18px;
        max-height: calc(100vh - 24px);
        border-radius: 14px;
    }
}
