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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    padding-top: 0 !important;
}

#main {
    min-height: 100vh;
    background: #f5f7fa;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    position: relative;
    overflow: hidden;
}

#main::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    top: -300px;
    right: -200px;
    opacity: 0.1;
    z-index: 0;
}

#main::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    border-radius: 50%;
    bottom: -200px;
    left: -100px;
    opacity: 0.1;
    z-index: 0;
}

.container {
    position: relative;
    z-index: 1;
    background: #ffffff !important;
    border-radius: 24px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    max-width: 1200px;
    width: 100%;
    animation: fadeInUp 0.6s ease-out;
    padding: 60px 50px !important;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

h2.text-center {
    font-size: 32px;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 30px;
}

.info-card {
    background: linear-gradient(135deg, #f6f9fc 0%, #ffffff 100%);
    border-left: 5px solid #667eea;
    border-radius: 16px;
    padding: 30px 35px;
    margin: 30px 0 40px 0;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.12);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.info-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 150px;
    height: 150px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.05) 100%);
    border-radius: 0 0 0 100%;
    z-index: 0;
}

.info-card:hover {
    box-shadow: 0 8px 30px rgba(102, 126, 234, 0.2);
    transform: translateY(-3px);
    border-left-color: #764ba2;
}

.info-card-content {
    position: relative;
    z-index: 1;
}

.info-card-title {
    display: flex;
    align-items: center;
    font-size: 17px;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 18px;
    gap: 10px;
}

.info-card-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    font-size: 18px;
}

.info-card p {
    font-size: 15px;
    color: #102B65;
    margin-bottom: 14px;
    line-height: 1.8;
    font-weight: 500;
}

.info-card p:last-child {
    margin-bottom: 0;
}

.info-card strong {
    color: #667eea;
    font-weight: 600;
}

.content {
    padding: 20px 10px !important;
}

.form-field {
    padding: 10px 15px !important;
    margin-bottom: 10px;
}

.form-label {
    display: block;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 8px;
    font-size: 14px;
}

span.required {
    color: #e53e3e !important;
}

.form-control, .form-select {
    width: 100%;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 14px 16px;
    font-size: 15px;
    transition: all 0.3s ease;
    background-color: #f8fafc;
    color: #2d3748;
}

#candidate_dateofbirth {
    background-color: white !important;
}

.form-control:focus, .form-select:focus {
    border-color: #667eea;
    background-color: #ffffff;
    outline: none;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.form-control::placeholder {
    color: #a0aec0;
}

input[type="submit"], button[type="submit"] {
    width: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 16px 20px;
    font-size: 16px;
    font-weight: 600;
    margin-top: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

input[type="submit"]:hover, button[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

input[type="submit"]:active, button[type="submit"]:active {
    transform: translateY(0);
}

.flash-error, .errors {
    border-radius: 12px;
    border: none;
    padding: 14px 18px;
    margin-bottom: 20px;
    font-size: 14px;
    background-color: #fee;
    color: #c53030;
    border-left: 4px solid #fc8181;
}

.flash-error p, .errors p {
    margin: 0;
}

.form-error, .invalid-feedback {
    color: #e53e3e;
    font-size: 13px;
    margin-top: 6px;
    display: block;
}

.form-help, small.form-text {
    font-size: 13px;
    color: #a0aec0;
    margin-top: 6px;
    display: block;
}

.captcha-wrapper {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.captcha-image {
    display: inline-block;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 5px;
    background: white;
}

.renew-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    padding: 8px 16px;
    border-radius: 8px;
    background: rgba(102, 126, 234, 0.1);
    transition: all 0.3s ease;
}

.renew-link:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.renew-link::before {
    content: '🔄';
    font-size: 14px;
}

.form-search {
    width: 38% !important;
}

table.duration, table.language {
    width: 100%;
    margin-bottom: 20px;
}

table.duration td, table.language td {
    padding: 10px 15px;
}

.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -15px;
}

.col-md-2 { flex: 0 0 16.666667%; max-width: 16.666667%; }
.col-md-4 { flex: 0 0 33.333333%; max-width: 33.333333%; }
.col-md-5 { flex: 0 0 41.666667%; max-width: 41.666667%; }
.col-md-6 { flex: 0 0 50%; max-width: 50%; }
.col-md-10 { flex: 0 0 83.333333%; max-width: 83.333333%; }
.col-md-12 { flex: 0 0 100%; max-width: 100%; }

.justify-content-center {
    justify-content: center;
}

.form-wrapper label.required:not(.form-check-label):after,
.form-wrapper legend.required:after,
.attachment:after {
    content: "\00a0*";
    color: red;
}

@media (max-width: 768px) {
    .container {
        padding: 40px 30px !important;
        margin: 20px;
    }

    .col-md-2, .col-md-4, .col-md-5, .col-md-6, .col-md-10, .col-md-12 {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .form-search {
        width: 100% !important;
    }

    h2.text-center {
        font-size: 24px;
    }
}
