* {
    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%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    padding: 20px;
    font-size: 1.5rem;
    color: black;
}

.c-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 40px 40px;
    max-width: 1200px;
    width: 100%;
}

.header {
    margin-bottom: 40px;
    text-align: center;
    position: relative;
}

.header h1 {
    font-size: 28px;
    color: #2d3748;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}

.back-link {
    display: inline-block;
    margin-top: 15px;
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.back-link:hover {
    color: #764ba2;
}

.button-group {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    width: 100%;
}

.btn {
    flex: 1;
    min-width: 200px;
    padding: 20px 40px;
    font-family: inherit;
    font-size: 18px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: inherit;
    border: 3px solid #2d3748;
    background: white;
    color: #2d3748;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    text-align: center;
    display: inline-block;
}

.btn:hover {
    background: #2d3748;
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.btn:active {
    transform: translateY(-1px);
}

.btn-submit {
    width: 100%;
    background: #667eea;
    border-color: #667eea;
    color: white;
}

.btn-submit:hover {
    background: #5568d3;
    border-color: #5568d3;
}


/* Success Page */
.success-message {
    text-align: center;
    padding: 30px;
    background: #f0fdf4;
    border-radius: 10px;
    margin-bottom: 30px;
}

.success-message p {
    color: #4b5563;
    margin-bottom: 10px;
}

.no-rm {
    font-size: 36px;
    color: #667eea;
    font-weight: bold;
    margin: 20px 0;
}

.info {
    font-size: 14px;
    color: #6b7280;
    font-style: italic;
}

/* Dashboard */
.dashboard-content {
    text-align: center;
}

.dashboard-content h3 {
    color: #2d3748;
    margin-bottom: 10px;
}

.dashboard-content p {
    color: #667eea;
    font-weight: 600;
    margin-bottom: 30px;
}

.menu-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 30px;
}

.menu-item {
    padding: 20px;
    background: #f7fafc;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    text-decoration: none;
    color: #2d3748;
    font-weight: 600;
    transition: all 0.3s ease;
}

.menu-item:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
    transform: translateX(5px);
}

@media (max-width: 600px) {
    .container {
        padding: 40px 20px;
    }

    .header h1 {
        font-size: 22px;
    }

    .button-group {
        flex-direction: column;
    }

    .btn {
        min-width: 100%;
        padding: 18px 30px;
        font-size: 16px;
    }
    
    .no-rm {
        font-size: 28px;
    }
}

/* Global */
.btn-kembali {
    margin-top: 20px;
    display: inline-block;
    padding: 12px 40px;
    background: #000;
    color: white;
    text-decoration: none;
    font-size: 16px;
    font-weight: 600;
    border: 3px solid #000;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-kembali:hover {
    background: white;
    color: #000;
}

/*Pasien Baru*/

.pasien-baru {
    display: flex;
    flex-direction: column;
    align-items: center;

    p {
        text-align: center;
    }
}

/* Pendaftaran Poli - Scan KTP */
.scan-ktp {
    display: flex;
    align-items: center;
    flex-direction: column;
}

.search-box {
    display: flex;
    gap: 10px;
}

.search-input {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid #2d3748;
    border-radius: 5px;
    font-size: 16px;
    font-family: inherit;
}

.search-input:focus {
    outline: none;
    border-color: #667eea;
}

.btn-primary {
    background: #2d3748;
    color: white;
}

.btn-cari {
    padding: 12px 30px;
    background: #2d3748;
    color: white;
    border: 2px solid #2d3748;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-cari:hover {
    background: white;
    color: #2d3748;
}


.data-section {
    margin-bottom: 30px;
}

.data-title {
    color: #2d3748;
    text-align: center;
    margin-bottom: 25px;
}


/* Modal */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal {
    background: white;
    border-radius: 20px;
    max-width: 750px;
    width: 90%;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.modal-header {
    padding: 30px 20px;
    text-align: center;
    background: white;
}

.modal-title {
    font-size: 28px;
    color: #333;
    margin-bottom: 20px;
    font-weight: bold;
}

.modal-question {
    font-size: 20px;
    color: #333;
}

.modal-buttons {
    display: flex;
    border-top: 3px solid #333;
}

.modal-button {
    flex: 1;
    padding: 20px;
    border: none;
    background: white;
    font-size: 20px;
    cursor: pointer;
    transition: background 0.3s;
    font-weight: 500;
}

.modal-button:first-child {
    border-right: 3px solid #333;
}

.modal-button:hover {
    background: #f0f0f0;
}

.hidden {
    display: none;
}

.text-center {
    text-align: center;
}

.mt-20{
    margin-top: 20px;
}

/* Form Pendaftaran lanjutan */

.form-group {
    display: flex;
    align-items: center;
    margin-bottom: 25px;
}

.form-label {
    flex: 0 0 200px;
    font-size: 18px;
    color: #333;
    font-weight: 500;
}

.form-separator {
    margin: 0 15px;
    font-size: 18px;
    color: #333;
}

.form-control {
    flex: 1;
}

select {
    width: 100%;
    padding: 12px 40px 12px 15px;
    font-size: 16px;
    border: 2px solid #333;
    border-radius: 5px;
    background: white;
    color: #666;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23333' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 12px;
}

select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

select:hover {
    border-color: #555;
}

.submit-button {
    width: 100%;
    padding: 15px;
    margin-top: 30px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 18px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s;
}

.submit-button:hover {
    background: #5568d3;
}

.submit-button:active {
    transform: translateY(1px);
}

@media (max-width: 600px) {
    .form-group {
        flex-direction: column;
        align-items: flex-start;
    }

    .form-label {
        margin-bottom: 8px;
    }

    .form-separator {
        display: none;
    }

    .form-control {
        width: 100%;
    }
}

.error-message {
    color: #dc3545;
    font-size: 14px;
    margin-top: 5px;
    display: none;
}

.error-message.show {
    display: block;
}

select.error {
    border-color: #dc3545;
    background-color: #fff5f5;
}
