* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
}

body {
    background: linear-gradient(135deg, #e0eaf4 0%, #cfdef3 100%);
    min-height: 100vh;
    padding: 2rem 1rem;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
}

.card {
    background: white;
    border-radius: 28px;
    box-shadow: 0 20px 35px -10px rgba(0, 0, 0, 0.15);
    overflow: hidden;
}

.card-header {
    background: #1e3a5f;
    color: white;
    padding: 1.5rem 2rem;
}

.card-header h1 {
    font-weight: 600;
    font-size: 1.8rem;
    letter-spacing: -0.3px;
}

.card-header p {
    opacity: 0.85;
    margin-top: 0.3rem;
}

.card-body {
    padding: 2rem;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.form-field.full-width {
    grid-column: 1 / -1;
}

label {
    font-weight: 600;
    color: #1e2a3e;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.required:after {
    content: " *";
    color: #dc2626;
}

input, select {
    padding: 0.75rem 1rem;
    border: 1px solid #cbd5e1;
    border-radius: 16px;
    font-size: 1rem;
    background: #fefefe;
    transition: 0.2s;
    outline: none;
}

input:focus, select:focus {
    border-color: #1e3a5f;
    box-shadow: 0 0 0 3px rgba(30,58,95,0.2);
}

/* Button Styles */
button {
    background: #1e3a5f;
    color: white;
    border: none;
    padding: 0.9rem 1.8rem;
    font-weight: bold;
    border-radius: 40px;
    font-size: 1rem;
    cursor: pointer;
    transition: 0.2s;
    width: 100%;
}

button:hover:not(:disabled) {
    background: #0f2b44;
    transform: translateY(-2px);
}

button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Button with spinner */
#submitBtn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 52px;
}

.btn-text, .btn-spinner {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.spinner-icon {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.alert {
    padding: 1rem;
    border-radius: 20px;
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border-left: 6px solid #10b981;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border-left: 6px solid #dc2626;
}

hr {
    margin: 1.5rem 0;
    border: 0;
    height: 1px;
    background: #e2e8f0;
}

.admin-link {
    text-align: center;
    margin-top: 1.8rem;
}

.admin-link a {
    color: #1e3a5f;
    font-weight: 600;
    text-decoration: none;
}

.admin-link a:hover {
    text-decoration: underline;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    border-radius: 28px;
    width: 90%;
    max-width: 650px;
    box-shadow: 0 25px 45px rgba(0, 0, 0, 0.2);
    animation: slideIn 0.3s ease;
    overflow: hidden;
}

@keyframes fadeIn {
    from { 
        opacity: 0;
        backdrop-filter: blur(0px);
    }
    to { 
        opacity: 1;
        backdrop-filter: blur(4px);
    }
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #1e3a5f; /* Match your existing header color */
    color: white;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.35rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
}

.modal-icon {
    font-size: 1.5rem;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.75rem;
    cursor: pointer;
    color: white;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
    line-height: 1;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

.modal-body {
    padding: 2rem;
    max-height: 65vh;
    overflow-y: auto;
}

.modal-body p:first-child {
    color: #2d3748;
    font-weight: 500;
    margin-bottom: 1rem;
}

.review-data {
    background: #f8fafc;
    padding: 1.25rem;
    border-radius: 16px;
    margin: 1.25rem 0;
    border: 1px solid #e2e8f0;
}

.review-item {
    display: flex;
    padding: 0.625rem 0;
    border-bottom: 1px solid #e2e8f0;
}

.review-item:last-child {
    border-bottom: none;
}

.review-label {
    font-weight: 600;
    width: 38%;
    color: #1e3a5f;
    font-size: 0.875rem;
}

.review-value {
    width: 62%;
    color: #2d3748;
    font-size: 0.875rem;
    word-break: break-word;
}

.modal-warning {
    background: #fef3e8;
    color: #c2410c;
    padding: 0.875rem 1rem;
    border-radius: 12px;
    margin-top: 1.25rem;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.625rem;
    border-left: 4px solid #f97316;
}

.modal-warning i, 
.modal-warning .warning-icon {
    font-size: 1.1rem;
}

.modal-footer {
    padding: 1.5rem 2rem;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    background: #fefefe;
}

.modal-btn {
    padding: 0.75rem 1.75rem;
    border: none;
    border-radius: 40px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.cancel-btn {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
}

.cancel-btn:hover {
    background: #e2e8f0;
    transform: translateY(-1px);
}

.confirm-btn {
    background: #1e3a5f; /* Match your existing button color */
    color: white;
}

.confirm-btn:hover {
    background: #0f2b44;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(30, 58, 95, 0.3);
}

.confirm-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Scrollbar styling for modal body */
.modal-body::-webkit-scrollbar {
    width: 6px;
}

.modal-body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.modal-body::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    body {
        padding: 1rem;
    }
    
    .card-body {
        padding: 1.5rem;
    }
    
    .modal-content {
        width: 95%;
        margin: 10% auto;
        border-radius: 24px;
    }
    
    .modal-header {
        padding: 1.25rem 1.5rem;
    }
    
    .modal-header h2 {
        font-size: 1.2rem;
    }
    
    .modal-body {
        padding: 1.5rem;
        max-height: 70vh;
    }
    
    .review-item {
        flex-direction: column;
        padding: 0.75rem 0;
    }
    
    .review-label {
        width: 100%;
        margin-bottom: 0.25rem;
        font-size: 0.8rem;
    }
    
    .review-value {
        width: 100%;
        font-size: 0.85rem;
        padding-left: 0.5rem;
    }
    
    .modal-footer {
        padding: 1.25rem 1.5rem;
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .modal-btn {
        width: 100%;
        justify-content: center;
        padding: 0.7rem 1.25rem;
    }
    
    .form-grid {
        gap: 1rem;
    }
    
    input, select {
        padding: 0.65rem 0.9rem;
        font-size: 0.95rem;
    }
    
    label {
        font-size: 0.8rem;
    }
    
    .card-header h1 {
        font-size: 1.4rem;
    }
    
    .card-header p {
        font-size: 0.85rem;
    }
}

/* Small mobile devices */
@media (max-width: 480px) {
    .card-header {
        padding: 1rem 1.25rem;
    }
    
    .card-body {
        padding: 1.25rem;
    }
    
    .modal-body {
        padding: 1.25rem;
    }
    
    .review-data {
        padding: 0.875rem;
    }
    
    .review-label, 
    .review-value {
        font-size: 0.8rem;
    }
}

/* Print styles */
@media print {
    body {
        background: white;
        padding: 0;
    }
    
    .admin-link,
    button,
    .modal {
        display: none;
    }
    
    .card {
        box-shadow: none;
    }
    
    .card-header {
        background: #f0f0f0;
        color: black;
    }
}

/* Ensure modal displays properly */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    animation: fadeIn 0.3s ease;
}

.modal.active {
    display: block !important;
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    border-radius: 28px;
    width: 90%;
    max-width: 650px;
    box-shadow: 0 25px 45px rgba(0, 0, 0, 0.2);
    animation: slideIn 0.3s ease;
    position: relative;
    z-index: 10000;
}

/* Success message styling */
.alert-success {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #065f46;
    border-left: 6px solid #10b981;
    padding: 1rem 1.25rem;
    border-radius: 20px;
    margin-bottom: 1.5rem;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.15);
    animation: slideInDown 0.5s ease;
}

/* Animation for alerts */
@keyframes slideInDown {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Ensure modal is above everything */
.modal,
.modal-content {
    z-index: 10000;
}

body.modal-open {
    overflow: hidden;
}

