/**
 * Stylesheet untuk Sistem Fingerprint U.are.u 5200
 * Modern & Clean Design
 */

:root {
    --primary-color: #2563eb;
    --success-color: #16a34a;
    --danger-color: #dc2626;
    --warning-color: #f59e0b;
    --info-color: #0891b2;
    --dark-color: #1f2937;
    --light-color: #f3f4f6;
    --border-color: #e5e7eb;
    --text-color: #374151;
    --text-muted: #6b7280;
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: var(--text-color);
    min-height: 100vh;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
header {
    text-align: center;
    color: white;
    padding: 40px 20px;
    margin-bottom: 30px;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

header .subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Main Content */
.main-content {
    display: grid;
    gap: 20px;
}

/* Card */
.card {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: var(--shadow-lg);
    transition: transform 0.2s;
}

.card:hover {
    transform: translateY(-2px);
}

.card h2 {
    color: var(--dark-color);
    margin-bottom: 15px;
    font-size: 1.75rem;
}

.card h3 {
    color: var(--dark-color);
    margin-bottom: 15px;
    font-size: 1.25rem;
}

/* Menu Buttons */
.menu-buttons {
    display: grid;
    gap: 15px;
    margin-top: 25px;
}

/* Buttons */
.btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    padding: 18px 25px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.btn svg {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.btn span {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
}

.btn small {
    font-size: 0.85rem;
    font-weight: normal;
    opacity: 0.8;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: #1d4ed8;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-success {
    background: var(--success-color);
    color: white;
}

.btn-success:hover {
    background: #15803d;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-info {
    background: var(--info-color);
    color: white;
}

.btn-info:hover {
    background: #0e7490;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: var(--text-muted);
    color: white;
}

.btn-secondary:hover {
    background: var(--dark-color);
}

.btn-scan {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    width: 100%;
    margin-top: 15px;
}

.btn-scan:hover {
    transform: scale(1.02);
}

.btn:disabled {
    background: var(--border-color);
    color: var(--text-muted);
    cursor: not-allowed;
    transform: none;
}

.btn-back {
    display: inline-flex;
    align-items: center;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    margin-bottom: 20px;
    transition: color 0.2s;
}

.btn-back:hover {
    color: #1d4ed8;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.9rem;
}

/* Info Card */
.info-card {
    background: linear-gradient(135deg, #e0f2fe 0%, #dbeafe 100%);
    border-left: 4px solid var(--info-color);
}

.requirements-card {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-left: 4px solid var(--warning-color);
}

.info-list {
    list-style: none;
    padding: 0;
}

.info-list li {
    padding: 10px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.info-list li:last-child {
    border-bottom: none;
}

.requirements-card ol {
    padding-left: 20px;
}

.requirements-card ol li {
    margin: 10px 0;
}

.note {
    margin-top: 15px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 6px;
    font-size: 0.95rem;
}

/* Status Box */
.status-box {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.status-success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #86efac;
}

.status-warning {
    background: #fef3c7;
    color: #854d0e;
    border: 1px solid #fde68a;
}

.status-danger {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

/* Form */
.fingerprint-form {
    margin-top: 25px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--dark-color);
}

.required {
    color: var(--danger-color);
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.2s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Fingerprint Capture */
.fingerprint-capture {
    text-align: center;
}

.fingerprint-preview {
    width: 200px;
    height: 250px;
    margin: 0 auto 20px;
    border: 3px dashed var(--border-color);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--light-color);
    transition: all 0.3s;
}

.fingerprint-preview.active {
    border-color: var(--success-color);
    background: #dcfce7;
}

.fingerprint-icon {
    width: 80px;
    height: 80px;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.fingerprint-preview p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.fingerprint-preview img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.scan-status {
    margin-top: 15px;
    font-size: 0.95rem;
    color: var(--text-muted);
    min-height: 20px;
}

/* Form Actions */
.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.form-actions .btn {
    flex: 1;
}

/* Result Message */
.result-message {
    margin-top: 25px;
    padding: 15px;
    border-radius: 8px;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.result-message.success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #86efac;
}

.result-message.error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

/* Verify Section */
.verify-section {
    margin-top: 25px;
}

.verify-result {
    margin-top: 30px;
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.result-card {
    text-align: center;
    padding: 30px;
    background: var(--light-color);
    border-radius: 12px;
}

.result-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.result-card h2 {
    margin-bottom: 20px;
}

.result-data {
    background: white;
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
}

.result-data .data-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
}

.result-data .data-row:last-child {
    border-bottom: none;
}

.result-data .label {
    font-weight: 600;
    color: var(--dark-color);
}

.result-data .value {
    color: var(--text-color);
}

/* Table */
.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.table-actions {
    display: flex;
    gap: 10px;
}

.table-responsive {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.data-table thead {
    background: var(--dark-color);
    color: white;
}

.data-table th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
}

.data-table td {
    padding: 12px 15px;
    border-bottom: 1px solid var(--border-color);
}

.data-table tbody tr:hover {
    background: var(--light-color);
}

.table-footer {
    margin-top: 20px;
    text-align: right;
    color: var(--text-muted);
}

.text-center {
    text-align: center;
}

.text-muted {
    color: var(--text-muted);
}

.loading-indicator {
    text-align: center;
    padding: 30px;
    color: var(--text-muted);
}

/* History List */
.history-list {
    max-height: 300px;
    overflow-y: auto;
}

.history-item {
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.history-item:last-child {
    border-bottom: none;
}

.history-item.success {
    border-left: 3px solid var(--success-color);
    background: rgba(22, 163, 74, 0.05);
}

.history-item.failed {
    border-left: 3px solid var(--danger-color);
    background: rgba(220, 38, 38, 0.05);
}

/* Footer */
footer {
    text-align: center;
    color: white;
    padding: 30px 20px;
    margin-top: 40px;
}

/* Responsive */
@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }

    .card {
        padding: 20px;
    }

    .form-actions {
        flex-direction: column;
    }

    .table-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .data-table {
        font-size: 0.9rem;
    }

    .data-table th,
    .data-table td {
        padding: 10px;
    }
}

