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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #64748b 0%, #94a3b8 100%);
    min-height: 100vh;
    padding: 20px;
}

/* Login Container */
.login-container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    padding: 40px;
    width: 100%;
    max-width: 400px;
    margin: 10vh auto;
    animation: slideUp 0.5s ease;
}

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

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header .icon {
    font-size: 3em;
    margin-bottom: 10px;
}

.login-header h1 {
    font-size: 2em;
    color: #333;
    margin-bottom: 10px;
}

.login-header p {
    color: #666;
}

/* Main Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    overflow: hidden;
}

/* Header */
.header {
    background: linear-gradient(135deg, #64748b 0%, #94a3b8 100%);
    color: white;
    padding: 30px;
}

.header h1 {
    font-size: 2em;
    margin-bottom: 20px;
}

/* Logo */
.logo-img {
    height: 60px;
    width: auto;
    object-fit: contain;
}

.btn-logout {
    background: rgba(255,255,255,0.3);
    border: none;
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-logout:hover {
    background: rgba(255,255,255,0.5);
}

.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.stat-box {
    background: rgba(255,255,255,0.2);
    padding: 20px;
    border-radius: 15px;
    backdrop-filter: blur(10px);
}

.stat-label {
    font-size: 0.9em;
    opacity: 0.9;
    margin-bottom: 5px;
}

.stat-value {
    font-size: 1.8em;
    font-weight: bold;
}

/* Controls */
.controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    border-bottom: 2px solid #eee;
}

.control-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.control-left label {
    font-weight: 600;
}

.control-left input[type="month"] {
    padding: 8px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1em;
}

/* Filter Section */
.filter-section {
    padding: 20px 30px;
    display: flex;
    gap: 15px;
    border-bottom: 2px solid #eee;
}

.filter-section input[type="text"] {
    flex: 1;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1em;
}

.filter-section select {
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1em;
}

/* Pelanggan List */
.pelanggan-list {
    padding: 30px;
    max-height: 600px;
    overflow-y: auto;
}

.pelanggan-item {
    background: #f9f9f9;
    padding: 20px;
    margin-bottom: 15px;
    border-radius: 12px;
    border-left: 5px solid #4facfe;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s;
}

.pelanggan-item:hover {
    background: #f0f0f0;
    transform: translateX(5px);
}

.pelanggan-item.lunas {
    border-left-color: #4CAF50;
}

.pelanggan-item.belum-lunas {
    border-left-color: #f44336;
}

.pelanggan-info {
    flex: 1;
}

.pelanggan-info .nama {
    font-size: 1.3em;
    font-weight: bold;
    margin-bottom: 8px;
    color: #333;
}

.pelanggan-info .paket {
    color: #4facfe;
    font-weight: 600;
    margin-right: 15px;
}

.pelanggan-info .harga {
    font-size: 1.2em;
    font-weight: bold;
    color: #4CAF50;
    margin: 5px 0;
}

.pelanggan-info .detail {
    font-size: 0.9em;
    color: #666;
    margin-top: 5px;
}

.pelanggan-info .badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.85em;
    font-weight: 600;
    margin-right: 8px;
}

.badge.lunas {
    background: #d4edda;
    color: #155724;
}

.badge.belum-lunas {
    background: #f8d7da;
    color: #721c24;
}

.badge.cash {
    background: #d1ecf1;
    color: #0c5460;
}

.badge.transfer {
    background: #fff3cd;
    color: #856404;
}

.pelanggan-actions {
    display: flex;
    gap: 10px;
}

.btn-icon {
    background: none;
    border: none;
    padding: 8px 12px;
    cursor: pointer;
    border-radius: 5px;
    transition: all 0.3s;
    font-size: 1.2em;
}

.btn-icon:hover {
    background: rgba(0,0,0,0.1);
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background: #64748b;
    color: white;
}

.btn-primary:hover {
    background: #475569;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(100, 116, 139, 0.3);
}

.btn-success {
    background: #4CAF50;
    color: white;
}

.btn-success:hover {
    background: #45a049;
}

/* Toggle Stats Button */
.toggle-stats-container {
    text-align: center;
    padding: 15px 0;
}

.btn-toggle-stats {
    background: rgba(255,255,255,0.3);
    border: 2px solid rgba(255,255,255,0.5);
    color: white;
    padding: 10px 24px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95em;
    transition: all 0.3s;
    backdrop-filter: blur(10px);
}

.btn-toggle-stats:hover {
    background: rgba(255,255,255,0.4);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* Stats Hidden State */
.stat-value.hidden {
    filter: blur(8px);
    user-select: none;
    transition: filter 0.3s;
}

.stat-value.hidden::before {
    content: '••••••';
    color: rgba(255,255,255,0.9);
    font-size: 1.5em;
    letter-spacing: 3px;
}

/* Form */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #555;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1em;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #4facfe;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
}

.modal.show {
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 15px;
    width: 90%;
    max-width: 500px;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

.close {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 2em;
    cursor: pointer;
    color: #999;
}

.close:hover {
    color: #333;
}

/* Error Message */
.error-message {
    background: #fee;
    color: #c33;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: none;
    text-align: center;
}

.error-message.show {
    display: block;
    animation: shake 0.5s;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

/* Empty State */
.empty-state {
    text-align: center;
    color: #999;
    padding: 40px;
    font-style: italic;
}

/* Responsive */
@media (max-width: 768px) {
    .stats-container {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .controls {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .filter-section {
        flex-direction: column;
    }
    
    .pelanggan-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .pelanggan-actions {
        margin-top: 15px;
        width: 100%;
        justify-content: flex-end;
    }
}

.btn-login {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #64748b 0%, #94a3b8 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(100, 116, 139, 0.4);
}

/* Success button */
.btn-success {
    background: #10b981;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-success:hover {
    background: #059669;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

/* Tabs */
.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    border-bottom: 2px solid #e5e7eb;
}

.tab {
    padding: 15px 30px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    font-size: 1em;
    font-weight: 600;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.3s;
}

.tab:hover {
    color: #64748b;
    background: rgba(100, 116, 139, 0.05);
}

.tab.active {
    color: #64748b;
    border-bottom-color: #64748b;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

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

/* Laporan Tab Styles */
.laporan-header {
    margin-bottom: 24px;
}

.laporan-header h3 {
    margin: 0 0 16px 0;
    color: #333;
}

.laporan-controls {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.laporan-controls input {
    flex: 1;
    min-width: 250px;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1em;
}

.laporan-controls select {
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1em;
}

.laporan-list {
    display: grid;
    gap: 16px;
}

.laporan-item {
    background: #f8f9fa;
    border-left: 4px solid #667eea;
    border-radius: 8px;
    padding: 16px;
    transition: all 0.3s;
}

.laporan-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateX(4px);
}

.laporan-item.status-lunas {
    border-left-color: #4CAF50;
}

.laporan-item.status-belum {
    border-left-color: #f44336;
}

.laporan-item-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 12px;
}

.laporan-client-info h4 {
    font-size: 18px;
    margin: 0 0 4px 0;
    color: #333;
}

.laporan-client-info p {
    font-size: 14px;
    color: #666;
    margin: 0;
}

.laporan-status-badge {
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
}

.laporan-status-badge.lunas {
    background: #d4edda;
    color: #155724;
}

.laporan-status-badge.belum {
    background: #f8d7da;
    color: #721c24;
}

.laporan-content {
    background: white;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 12px;
    white-space: pre-wrap;
    word-wrap: break-word;
    font-size: 14px;
    line-height: 1.6;
    color: #444;
}

.laporan-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #999;
}

.no-data-message {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.no-data-message p {
    font-size: 16px;
}

@media (max-width: 768px) {
    .laporan-controls {
        flex-direction: column;
    }
    
    .laporan-controls input {
        min-width: 100%;
    }
    
    .laporan-item-header {
        flex-direction: column;
        gap: 10px;
    }
}

/* ========== NOTES TAB STYLES ========== */
/* TAMBAHKAN DI AKHIR style.css */

.notes-container {
    background: white;
    border-radius: 12px;
    padding: 24px;
}

.notes-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.notes-header h3 {
    margin: 0;
    color: #333;
    font-size: 24px;
    font-weight: 600;
}

/* Professional Add Button */
.btn-add-note {
    padding: 10px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.btn-add-note:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* Professional Modal Buttons */
.btn-cancel {
    background: #6b7280;
    color: white;
    padding: 10px 24px;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-cancel:hover {
    background: #4b5563;
}

.btn-save {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 10px 24px;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.btn-save:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.notes-table-container {
    overflow-x: auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.notes-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 800px;
}

.notes-table thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.notes-table th {
    padding: 16px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
    border-bottom: 2px solid #e9ecef;
}

.notes-table tbody tr {
    border-bottom: 1px solid #e9ecef;
    transition: background 0.2s;
}

.notes-table tbody tr:hover {
    background: #f8f9fa;
}

.notes-table tbody tr.status-tidak-aktif {
    background: #fee;
    opacity: 0.7;
}

.notes-table tbody tr.status-selesai {
    background: #efe;
}

.notes-table td {
    padding: 16px;
    font-size: 14px;
}

.notes-table td:first-child {
    font-weight: 600;
    color: #666;
}

.note-tanggal {
    color: #666;
    font-size: 13px;
}

.note-client {
    font-weight: 600;
    color: #333;
}

.note-deskripsi {
    color: #444;
    line-height: 1.5;
    max-width: 400px;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.note-status {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.note-status.progress {
    background: #fff3cd;
    color: #856404;
}

.note-status.selesai {
    background: #d4edda;
    color: #155724;
}

.note-status.tidak-aktif {
    background: #f8d7da;
    color: #721c24;
}

.note-actions {
    display: flex;
    gap: 8px;
}

.btn-note-action {
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s;
}

.btn-edit-status {
    background: #4facfe;
    color: white;
}

.btn-edit-status:hover {
    background: #3b9ae6;
    transform: translateY(-1px);
}

.btn-edit-note {
    background: #f093fb;
    color: white;
}

.btn-edit-note:hover {
    background: #e07def;
    transform: translateY(-1px);
}

.btn-delete-note {
    background: #ff6b6b;
    color: white;
}

.btn-delete-note:hover {
    background: #ee5555;
    transform: translateY(-1px);
}

/* Modal specific for notes */
#noteModal textarea,
#noteModal input[type="text"],
#noteModal select {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
}

#noteModal textarea {
    resize: vertical;
    min-height: 100px;
}

/* Responsive */
@media (max-width: 768px) {
    .notes-header {
        flex-direction: column;
        gap: 16px;
        align-items: stretch;
    }
    
    .notes-header button {
        width: 100%;
    }
    
    .notes-table-container {
        overflow-x: scroll;
    }
    
    .note-actions {
        flex-direction: column;
    }
}

/* ========== SORTABLE COLUMNS ========== */
.sortable {
    cursor: pointer;
    user-select: none;
    transition: background 0.2s;
}

.sortable:hover {
    background: rgba(0,0,0,0.05);
}

.sortable span {
    margin-left: 5px;
    font-size: 0.9em;
}

/* ========== STICKY SELECTION SUMMARY ========== */
.selection-summary {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 30px;
    border-radius: 50px;
    box-shadow: 0 8px 32px rgba(102, 126, 234, 0.4);
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 20px;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.summary-content {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 15px;
}

.summary-count strong,
.summary-total strong {
    font-size: 18px;
    font-weight: 700;
}

.summary-divider {
    opacity: 0.5;
    font-size: 18px;
}

.btn-clear-selection {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s;
}

.btn-clear-selection:hover {
    background: rgba(255,255,255,0.3);
    transform: scale(1.05);
}

/* Responsive */
@media (max-width: 768px) {
    .selection-summary {
        bottom: 10px;
        padding: 12px 20px;
        flex-direction: column;
        gap: 10px;
    }
    
    .summary-content {
        flex-direction: column;
        gap: 5px;
        text-align: center;
    }
}
