/* --- Reset & Base Style --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, Arial, sans-serif;
}

body {
    background-color: #f4f7f6;
    color: #333333;
    padding: 40px 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

/* --- Container Utama (Untuk Form / Login) --- */
.container {
    background-color: #ffffff;
    max-width: 450px;
    width: 100%;
    padding: 40px 30px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    text-align: center;
    margin: 0 auto;
}

/* --- Header Text --- */
h2 {
    font-size: 24px;
    color: #1a202c;
    margin-bottom: 8px;
    font-weight: 700;
}

.subtitle {
    font-size: 14px;
    color: #718096;
    margin-bottom: 24px;
    line-height: 1.5;
}

/* --- Form Elements --- */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 20px;
}

input[type="text"], input[type="password"], input[type="email"], select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 15px;
    outline: none;
    transition: all 0.3s ease;
    background-color: #ffffff;
}

input:focus, select:focus {
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}

/* --- Buttons --- */
.btn-primary {
    background-color: #4f46e5;
    color: #ffffff;
    border: none;
    padding: 14px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    width: 100%;
}

.btn-primary:hover {
    background-color: #4338ca;
}

/* --- Notifikasi Kesalahan --- */
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 20px;
    text-align: left;
    display: block;
    width: 100%;
}

.alert-danger {
    background-color: #fef2f2;
    color: #991b1b;
    border: 1px solid #fee2e2;
}

/* --- Tambahan Style untuk Admin Panel (Supaya Lebar) --- */
.container-admin {
    background-color: #ffffff;
    max-width: 1100px;
    width: 100%;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    margin: 0 auto;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 15px;
    margin-bottom: 25px;
}

.btn-danger {
    background-color: #ef4444;
    color: white;
    padding: 10px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
}
.btn-danger:hover { background-color: #dc2626; }

.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
    border-radius: 4px;
    text-decoration: none;
    display: inline-block;
    margin: 2px;
}

/* --- CRUD Form Grid --- */
.crud-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    background: #f8fafc;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 25px;
    border: 1px solid #e2e8f0;
}

/* --- Responsive Table --- */
.table-responsive {
    overflow-x: auto;
    margin-top: 15px;
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 14px;
}

th, td {
    padding: 12px 15px;
    border-bottom: 1px solid #e2e8f0;
}

th {
    background-color: #f8fafc;
    color: #475569;
    font-weight: 600;
}

tr:hover { background-color: #f1f5f9; }

.badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}
.badge-success { background-color: #d1fae5; color: #065f46; }
.badge-danger { background-color: #fee2e2; color: #991b1b; }

/* --- Tambahan Style Desain Sertifikat --- */
.layout-desain {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.panel-form-desain {
    flex: 1;
    min-width: 300px;
}

.panel-preview-desain {
    flex: 1.5;
    min-width: 350px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
}

.img-preview {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    margin-top: 15px;
}

.nav-admin {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
}

.btn-nav {
    background-color: #e2e8f0;
    color: #475569;
    padding: 10px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s ease;
}

.btn-nav:hover, .btn-nav.active {
    background-color: #4f46e5;
    color: #ffffff;
}
