/* =========================================================
   REPAINT PRO - CSS FRAMEWORK & MATERIAL DESIGN TEMPLATE
   ========================================================= */

/* --- 1. VARIABEL GLOBAL (Warna Google Material) --- */
:root {
    /* Primary Colors */
    --google-blue: #1A73E8;
    --google-blue-hover: #1765CC;
    --google-blue-bg: #E8F0FE;
    
    /* Semantic Colors (Status) */
    --danger: #D93025;
    --danger-bg: #FCE8E6;
    --success: #1E8E3E;
    --success-bg: #E6F4EA;
    --warning: #F9AB00;
    --warning-bg: #FEF7E0;
    
    /* Grayscale & Text */
    --text-dark: #202124;
    --text-muted: #5F6368;
    --bg-light: #F8F9FA;
    --white: #FFFFFF;
    --border-color: #DADCE0;
    
    /* Effects & Sizes */
    --shadow-sm: 0 1px 2px 0 rgba(60,64,67,0.3), 0 1px 3px 1px rgba(60,64,67,0.15);
    --shadow-md: 0 4px 6px -1px rgba(60,64,67,0.1), 0 2px 4px -1px rgba(60,64,67,0.06);
    --radius: 8px;
    --radius-lg: 12px;
}

/* --- 2. RESET & BASE --- */
* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Inter', sans-serif; }
body { background-color: var(--bg-light); color: var(--text-dark); line-height: 1.5; font-size: 14px; }
a { text-decoration: none; color: var(--google-blue); transition: 0.2s; }
a:hover { text-decoration: underline; }

/* --- 3. CLASS UTILITAS (Template Lego untuk Layout Cepat) --- */
/* Teks */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-primary { color: var(--google-blue); }
.text-danger { color: var(--danger); }
.text-success { color: var(--success); }
.text-muted { color: var(--text-muted); }
.font-bold { font-weight: 600; }
.font-medium { font-weight: 500; }
.text-xl { font-size: 20px; }
.text-lg { font-size: 16px; }
.text-sm { font-size: 12px; }

/* Flexbox & Grid */
.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }
.justify-center { justify-content: center; }
.gap-2 { gap: 8px; }
.gap-4 { gap: 16px; }

.grid { display: grid; }
.grid-2 { grid-template-columns: repeat(2, 1fr); gap: 24px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); gap: 24px; }
@media (max-width: 768px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

/* Spacing (Margin & Padding) */
.m-0 { margin: 0; }
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.mb-2 { margin-bottom: 8px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.p-0 { padding: 0; }
.p-4 { padding: 16px; }
.p-6 { padding: 24px; }

/* --- 4. LAYOUT UTAMA (Admin Panel) --- */
.app-container { display: flex; height: 100vh; overflow: hidden; }
.main-content { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.page-content { padding: 24px; overflow-y: auto; flex: 1; }
.page-header { margin-bottom: 24px; }

/* Sidebar */
.sidebar { width: 260px; background-color: var(--white); border-right: 1px solid var(--border-color); display: flex; flex-direction: column; overflow-y: auto; }
.sidebar-logo { height: 64px; display: flex; align-items: center; padding: 0 24px; gap: 12px; border-bottom: 1px solid var(--border-color); }
.sidebar-nav { padding: 16px 12px; display: flex; flex-direction: column; gap: 4px; }
.nav-item { display: flex; align-items: center; gap: 16px; padding: 12px 16px; text-decoration: none; color: var(--text-dark); font-size: 14px; font-weight: 500; border-radius: 0 24px 24px 0; transition: background 0.2s; }
.nav-item:hover { background-color: #f1f3f4; text-decoration: none; }
.nav-item .material-symbols-outlined { color: var(--text-muted); }
.nav-item.active { background-color: var(--google-blue-bg); color: var(--google-blue); }
.nav-item.active .material-symbols-outlined { color: var(--google-blue); }

/* Topbar */
.topbar { height: 64px; background-color: var(--white); border-bottom: 1px solid var(--border-color); display: flex; align-items: center; justify-content: space-between; padding: 0 24px; }
.topbar-left, .topbar-right { display: flex; align-items: center; gap: 16px; }
.search-box { display: flex; align-items: center; background-color: #f1f3f4; border-radius: 8px; padding: 8px 16px; width: 400px; gap: 8px; transition: 0.2s; }
.search-box:focus-within { background-color: var(--white); box-shadow: var(--shadow-sm); border: 1px solid var(--border-color); }

/* --- 5. KOMPONEN UI (Cards, Buttons, Alerts) --- */
/* Cards */
.card, .form-card, .detail-card {
    background-color: var(--white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 24px;
}

/* Dashboard Summary Cards */
.dashboard-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; margin-bottom: 32px; }
.summary-card { background-color: var(--white); border: 1px solid var(--border-color); border-radius: var(--radius-lg); padding: 20px; display: flex; align-items: center; gap: 16px; box-shadow: var(--shadow-sm); transition: transform 0.2s, box-shadow 0.2s; }
.summary-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.card-icon { width: 56px; height: 56px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.card-icon .material-symbols-outlined { font-size: 28px; }
.icon-blue { background-color: var(--google-blue-bg); color: var(--google-blue); }
.icon-orange { background-color: var(--warning-bg); color: var(--warning); }
.icon-green { background-color: var(--success-bg); color: var(--success); }
.icon-red { background-color: var(--danger-bg); color: var(--danger); }

/* Buttons */
.btn-primary { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 24px; background-color: var(--google-blue); color: var(--white); border: none; border-radius: var(--radius); font-size: 14px; font-weight: 500; cursor: pointer; transition: 0.2s; text-decoration: none; }
.btn-primary:hover { background-color: var(--google-blue-hover); text-decoration: none; }
.btn-primary:disabled { background-color: var(--border-color); cursor: not-allowed; }

.btn-icon { display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; background-color: transparent; color: var(--text-muted); text-decoration: none; transition: 0.2s; }
.btn-icon:hover { background-color: #f1f3f4; color: var(--google-blue); }
.btn-icon.edit:hover { color: var(--warning); }

/* Badges */
.status-badge { padding: 6px 12px; border-radius: 16px; font-size: 12px; font-weight: 600; display: inline-block; text-align: center;}
.badge-orange { background-color: var(--warning-bg); color: var(--warning); }
.badge-blue { background-color: var(--google-blue-bg); color: var(--google-blue); }
.badge-green { background-color: var(--success-bg); color: var(--success); }

/* Alerts */
.alert-error { display: flex; align-items: center; gap: 8px; background-color: var(--danger-bg); color: var(--danger); padding: 12px 16px; border-radius: var(--radius); font-size: 13px; font-weight: 500; margin-bottom: 24px; }
.alert-success { display: flex; align-items: center; gap: 8px; background-color: var(--success-bg); color: var(--success); padding: 12px 16px; border-radius: var(--radius); font-size: 13px; font-weight: 500; margin-bottom: 24px; }

/* --- 6. FORMS (Input, Select, Textarea) --- */
.form-group { margin-bottom: 20px; text-align: left; }
.form-group label { display: block; font-size: 13px; font-weight: 500; color: var(--text-dark); margin-bottom: 8px; }
.form-control { width: 100%; padding: 12px 16px; font-size: 14px; border: 1px solid var(--border-color); border-radius: var(--radius); outline: none; transition: 0.2s; background-color: var(--white); }
.form-control:focus { border-color: var(--google-blue); box-shadow: inset 0 0 0 1px var(--google-blue); }
select.form-control { appearance: none; background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235F6368' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e"); background-repeat: no-repeat; background-position: right 16px center; background-size: 16px; padding-right: 40px; cursor: pointer; }

/* --- 7. TABEL (Google Table Design) --- */
.table-card {
    background-color: var(--white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 0;
    overflow: hidden; 
    margin-bottom: 24px;
    display: block;
}

.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
}

.table-header h2 { font-size: 18px; font-weight: 500; margin: 0; }
.table-responsive { overflow-x: auto; display: block; width: 100%; }
.google-table { width: 100%; border-collapse: collapse; }

.google-table th {
    background-color: var(--bg-light);
    color: var(--text-muted);
    font-weight: 500;
    font-size: 13px;
    text-align: left;
    padding: 12px 24px;
    border-bottom: 1px solid var(--border-color);
}

.google-table td {
    padding: 16px 24px;
    font-size: 14px;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

.google-table tr:last-child td { border-bottom: none; }
.google-table tbody tr:hover { background-color: #f1f3f4; }
.action-buttons { display: flex; justify-content: flex-end; gap: 4px; }

/* --- 8. FITUR KHUSUS (Detail Pesanan, Galeri, Stepper) --- */
/* Detail Info Rows */
.detail-card h3 { font-size: 16px; font-weight: 500; color: var(--google-blue); border-bottom: 1px solid var(--border-color); padding-bottom: 12px; margin-bottom: 16px; display: flex; align-items: center; gap: 8px; }
.info-row { display: flex; margin-bottom: 12px; font-size: 14px; }
.info-row .info-label { width: 140px; color: var(--text-muted); font-weight: 500; }
.info-row .info-value { flex: 1; font-weight: 500; }
.detail-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 24px; margin-bottom: 24px; }
@media (max-width: 768px) { .detail-grid { grid-template-columns: 1fr; } }

/* Mini Table untuk Cicilan */
.mini-table { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 12px; }
.mini-table th, .mini-table td { padding: 8px 0; border-bottom: 1px solid var(--border-color); text-align: left; }
.mini-table th { color: var(--text-muted); font-weight: 500; }

/* Galeri Foto */
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; margin-top: 16px; }
.photo-card { border: 1px solid var(--border-color); border-radius: var(--radius); overflow: hidden; background-color: var(--white); box-shadow: var(--shadow-sm); }
.photo-card img { width: 100%; height: 150px; object-fit: cover; display: block; }
.photo-info { padding: 12px; text-align: center; font-size: 13px; font-weight: 500; background-color: var(--bg-light); border-top: 1px solid var(--border-color); }

/* Timeline Stepper (Cek Resi) */
.timeline-container { display: flex; justify-content: space-between; align-items: center; position: relative; margin: 40px 0; padding: 0 20px; }
.timeline-container::before { content: ''; position: absolute; top: 50%; left: 40px; right: 40px; height: 4px; background-color: var(--border-color); transform: translateY(-50%); z-index: 1; }
.timeline-progress { position: absolute; top: 50%; left: 40px; height: 4px; background-color: var(--google-blue); transform: translateY(-50%); z-index: 2; transition: width 0.5s ease; }
.timeline-step { position: relative; z-index: 3; display: flex; flex-direction: column; align-items: center; gap: 8px; background-color: var(--white); padding: 0 10px; }
.timeline-icon { width: 40px; height: 40px; border-radius: 50%; background-color: var(--white); border: 4px solid var(--border-color); display: flex; align-items: center; justify-content: center; color: var(--text-muted); font-weight: bold; transition: all 0.3s; }
.timeline-step.active .timeline-icon, .timeline-step.completed .timeline-icon { border-color: var(--google-blue); background-color: var(--google-blue); color: var(--white); }
.timeline-label { font-size: 13px; font-weight: 600; color: var(--text-muted); }
.timeline-step.active .timeline-label, .timeline-step.completed .timeline-label { color: var(--text-dark); }
@media (max-width: 600px) {
    .timeline-label { font-size: 11px; }
    .timeline-icon { width: 32px; height: 32px; border-width: 3px; }
    .timeline-icon .material-symbols-outlined { font-size: 18px; }
}