/**
 * Adhuha PSAK System - Styles
 */
:root {
    --primary: #1a73e8;
    --primary-dark: #1557b0;
    --success: #0f9d58;
    --warning: #f4b400;
    --danger: #db4437;
    --bg: #f8f9fa;
    --card: #ffffff;
    --text: #202124;
    --text-secondary: #5f6368;
    --border: #dadce0;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* Header */
.header {
    background: var(--primary);
    color: white;
    padding: 16px 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.header .container { display: flex; justify-content: space-between; align-items: center; }
.header h1 { font-size: 20px; font-weight: 600; }
.header h1 a { color: white; text-decoration: none; }
.header nav a {
    color: rgba(255,255,255,0.9);
    text-decoration: none;
    margin-left: 20px;
    font-size: 14px;
    padding: 4px 8px;
    border-radius: 4px;
}
.header nav a:hover { background: rgba(255,255,255,0.15); }

/* Cards */
.card {
    background: var(--card);
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.12);
    padding: 24px;
    margin-bottom: 20px;
}

.card h2 { font-size: 18px; margin-bottom: 16px; color: var(--primary); }

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--card);
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.12);
    text-align: center;
}
.stat-card .label { font-size: 12px; color: var(--text-secondary); text-transform: uppercase; }
.stat-card .value { font-size: 24px; font-weight: 700; margin: 8px 0; }
.stat-card .sub { font-size: 13px; color: var(--text-secondary); }

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}
th, td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
}
th { background: var(--bg); font-weight: 600; color: var(--text-secondary); }
tr:hover td { background: #f1f3f4; }

/* Status badges */
.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}
.badge-proforma { background: #e8f0fe; color: #1967d2; }
.badge-dp { background: #fef7e0; color: #ea8600; }
.badge-lunas { background: #e6f4ea; color: #137333; }
.badge-terkirim { background: #e8f5e9; color: #1b5e20; }
.badge-draft { background: #f1f3f4; color: #5f6368; }

/* Buttons */
.btn {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    border: none;
    cursor: pointer;
}
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-success { background: var(--success); color: white; }
.btn-warning { background: var(--warning); color: #333; }
.btn-danger { background: var(--danger); color: white; }
.btn-sm { padding: 4px 10px; font-size: 12px; }

/* Alerts */
.alert {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 16px;
    font-size: 14px;
}
.alert-info { background: #e8f0fe; color: #1967d2; }
.alert-success { background: #e6f4ea; color: #137333; }
.alert-warning { background: #fef7e0; color: #ea8600; }
.alert-danger { background: #fce8e6; color: #c5221f; }

/* Page header */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}
.page-header h2 { font-size: 24px; }

/* Footer */
.footer {
    text-align: center;
    padding: 20px;
    color: var(--text-secondary);
    font-size: 13px;
}

/* Responsive */
@media (max-width: 768px) {
    .header .container { flex-direction: column; gap: 12px; }
    .header nav a { margin: 0 8px; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    table { font-size: 12px; }
    th, td { padding: 6px 8px; }
}

/* Filters */
.filters {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    align-items: center;
    flex-wrap: wrap;
}
.filters select, .filters input {
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 14px;
}

/* Section */
.section { margin-bottom: 32px; }
.section h3 { font-size: 16px; margin-bottom: 12px; color: var(--primary); }
