:root {
    --glass: rgba(255, 255, 255, 0.95);
    --primary-gradient: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    --accent-color: #3b82f6;
}

body {
    background-color: #f8fafc;
}

.absensi-container {
    max-width: 900px;
    margin: 40px auto;
    padding: 0 20px;
}

.alert {
    padding: 1rem 1.25rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    font-weight: 500;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}
.alert.success {
    background-color: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}
.alert.error {
    background-color: #fef2f2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.profile-card {
    background: white;
    padding: 25px;
    border-radius: 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 10px 15px -3px rgba(0, 0, 0, 0.03);
    border: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
    border-left: 6px solid #2563eb;
}

.profile-avatar {
    width: 64px;
    height: 64px;
    background: var(--primary-gradient);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 800;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

.profile-info h2 {
    margin: 0;
    font-size: 1.35rem;
    color: #1e293b;
    font-weight: 700;
}

.profile-info p {
    margin: 4px 0 0;
    color: #64748b;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.attendance-form-wrapper {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 10px 15px -3px rgba(0, 0, 0, 0.03);
    border: 1px solid #f1f5f9;
    overflow: hidden;
}

.form-header {
    background: var(--primary-gradient);
    padding: 30px 40px;
    color: white;
}

.form-header h1 {
    margin: 0;
    font-size: 1.6rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 12px;
}

.form-header p {
    margin: 8px 0 0;
    opacity: 0.9;
    font-size: 0.95rem;
}

.form-body {
    padding: 40px;
}

.form-row {
    display: flex;
    gap: 20px;
}

.input-group-premium {
    margin-bottom: 1.5rem;
    flex: 1;
}

.input-group-premium label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 0.5rem;
}

.input-with-icon-premium {
    position: relative;
}

.input-with-icon-premium i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 1rem;
}

.input-with-icon-premium select, 
.input-with-icon-premium input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.6rem;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    font-size: 0.95rem;
    background-color: #f8fafc;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    appearance: none;
}

.input-with-icon-premium select:focus, 
.input-with-icon-premium input:focus {
    outline: none;
    border-color: #2563eb;
    background-color: #ffffff;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

/* Camera Section */
.camera-section {
    background: #f8fafc;
    border: 2px dashed #cbd5e1;
    border-radius: 14px;
    padding: 20px;
    text-align: center;
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
}

#camera-preview {
    width: 100%;
    max-width: 480px;
    border-radius: 10px;
    background: #000;
    margin: 0 auto;
    display: block;
    border: 2px solid #cbd5e1;
}

#captured-image {
    width: 100%;
    max-width: 480px;
    border-radius: 10px;
    display: none;
    margin: 0 auto;
    border: 2px solid #cbd5e1;
}

.camera-controls {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.btn-capture {
    background: var(--primary-gradient);
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
    transition: all 0.2s ease;
}

.btn-capture:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 15px rgba(37, 99, 235, 0.3);
}

.btn-retake {
    background: #64748b;
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    display: none;
    transition: all 0.2s ease;
}

.btn-switch {
    background: #ffffff;
    color: #475569;
    border: 1px solid #cbd5e1;
    padding: 10px 20px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.btn-switch:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

/* GPS Status Overlay */
.gps-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(8px);
    color: white;
    padding: 12px 20px;
    font-size: 0.8rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    z-index: 10;
    text-align: left;
}

.gps-status-row {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
}

#gpsAddress {
    font-size: 0.75rem;
    opacity: 0.9;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}

.gps-pulse {
    width: 10px;
    height: 10px;
    background: #10b981;
    border-radius: 50%;
    box-shadow: 0 0 0 rgba(16, 185, 129, 0.4);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0px rgba(16, 185, 129, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(16, 185, 129, 0); }
    100% { box-shadow: 0 0 0 0px rgba(16, 185, 129, 0); }
}

.btn-submit-main {
    background: var(--primary-gradient);
    color: white;
    border: none;
    width: 100%;
    padding: 16px;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 20px;
}

.btn-submit-main:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

.btn-submit-main:disabled {
    background: #cbd5e1;
    color: #94a3b8;
    cursor: not-allowed;
}

.info-details {
    margin-bottom: 1.5rem;
    padding: 15px;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    transition: all 0.3s;
}

.info-details summary {
    font-weight: 600;
    color: #334155;
    cursor: pointer;
    outline: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.info-details p {
    font-size: 0.9rem;
    color: #475569;
    margin: 8px 0 0;
    line-height: 1.5;
}

#watermark-canvas {
    display: none;
}

/* Mode Toggle */
.photo-mode-toggle {
    display: flex;
    background: #f1f5f9;
    padding: 5px;
    border-radius: 12px;
    margin-bottom: 20px;
    gap: 5px;
    border: 1px solid #e2e8f0;
}

.mode-btn {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #64748b;
    background: transparent;
}

.mode-btn.active {
    background: white;
    color: #2563eb;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

/* Upload Section */
.upload-section {
    background: #f8fafc;
    border: 2px dashed #cbd5e1;
    border-radius: 14px;
    padding: 40px 20px;
    text-align: center;
    margin-bottom: 30px;
    transition: all 0.3s;
}

.upload-box {
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.btn-browse {
    background: #64748b;
    color: white;
    padding: 8px 20px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-top: 10px;
    transition: all 0.2s ease;
}

.upload-box:hover .btn-browse {
    background: #2563eb;
}

.upload-box i {
    font-size: 3rem;
    color: #cbd5e1;
    margin-bottom: 15px;
}

.upload-box p {
    margin: 0;
    color: #64748b;
    font-size: 0.9rem;
}

#upload-preview-container {
    display: none;
    margin-top: 20px;
    position: relative;
}

#upload-preview {
    width: 100%;
    max-width: 480px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border: 2px solid #cbd5e1;
}

.btn-remove-upload {
    position: absolute;
    top: -10px;
    right: -10px;
    background: #ef4444;
    color: white;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.4);
}

.btn-remove-upload:hover {
    transform: scale(1.1);
}

.helper-text {
    display: block;
    margin-top: 0.35rem;
    font-size: 0.8rem;
    color: #64748b;
}

@media (max-width: 600px) {
    .form-body { padding: 25px; }
    .profile-card { flex-direction: column; text-align: center; }
    .form-row { flex-direction: column; gap: 0; }
}

@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
