/* General Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f5f5f5;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.container {
    width: 100%;
    max-width: 400px;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 30px;
}

h1 {
    text-align: center;
    margin-bottom: 24px;
    color: #333;
    font-size: 28px;
}

/* Form styling */
.form-group {
    margin-bottom: 25px;
    position: relative;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #333;
    font-size: 16px;
}

.form-control {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 16px;
    box-sizing: border-box;
    transition: all 0.3s ease;
    background-color: #f9f9f9;
    color: #333;
}

.form-control:focus {
    border-color: #4a90e2;
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
    outline: none;
}

.form-control::placeholder {
    color: #aaa;
    font-style: italic;
}

.form-control[readonly] {
    background-color: #f0f0f0;
    border-color: #ddd;
    color: #666;
    cursor: not-allowed;
}

textarea.form-control {
    min-height: 180px;
    resize: vertical;
    line-height: 1.5;
}

select.form-control {
    height: 54px;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24'%3E%3Cpath fill='%23555' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 16px;
    padding-right: 45px;
}

select.form-control:focus {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24'%3E%3Cpath fill='%234a90e2' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
}

.btn-primary {
    background-color: #4a90e2;
    border: none;
    color: white;
    padding: 14px 30px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-primary:hover {
    background-color: #3a7bc8;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Error messages */
.error-message {
    color: #dc3545;
    font-size: 14px;
    margin-top: 5px;
    display: block;
}

/* Checkbox styling */
.checkbox-group {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.checkbox-group label {
    margin-bottom: 0;
    margin-left: 10px;
    cursor: pointer;
}

.form-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* Card styling improvements */
.card {
    margin-bottom: 40px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    background-color: #fff;
    width: 100%;
    overflow: hidden;
    border: none;
    max-width: 100%;
}

.card-header {
    background-color: #f8f9fa;
    padding: 20px 25px;
    border-bottom: 1px solid #e9ecef;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
}

.card-header h3 {
    margin: 0;
    color: #333;
    font-size: 1.6rem;
    font-weight: 600;
}

.card-body {
    padding: 30px;
}

/* Dashboard styles */
.dashboard-container {
    padding: 40px 20px 20px;
    max-width: 1600px;
    margin: 0 auto;
}

.dashboard-container .card {
    width: 100%;
    max-width: 1500px;
    margin: 0 auto 40px;
}

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

.col-md-12 {
    width: 100%;
    padding: 0 15px;
    margin-bottom: 30px;
}

.header-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    margin-top: 10px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e9ecef;
}

.header-section h1 {
    margin: 0;
    color: #333;
    font-size: 24px;
}

.logout-btn {
    background-color: #dc3545;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

.logout-btn:hover {
    background-color: #c82333;
}

.flash-message {
    padding: 12px 20px;
    margin-bottom: 20px;
    border-radius: 4px;
    font-weight: 500;
    animation: fadeIn 0.3s ease-in-out;
}

.flash-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.flash-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.flash-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.flash-warning {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#flash-container {
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
}

/* Referral form styles */
.card {
    margin-bottom: 30px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    background-color: #fff;
    width: 100%;
}

.card-header {
    background-color: #f8f9fa;
    padding: 15px 20px;
    border-bottom: 1px solid #e9ecef;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
}

.card-header h3 {
    margin: 0;
    color: #333;
    font-size: 1.5rem;
}

.card-body {
    padding: 25px;
}

/* Referrals list styles */
.referrals-section {
    margin-top: 30px;
}

.referrals-section h2 {
    margin-bottom: 20px;
    color: #333;
    font-size: 1.8rem;
}

.referrals-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.referral-item {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 15px;
    transition: transform 0.2s;
}

.referral-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.referral-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e9ecef;
}

.referral-header h3 {
    margin: 0;
    font-size: 1.2rem;
    color: #333;
}

.status-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
}

.status-pending {
    background-color: #fff3cd;
    color: #856404;
}

.status-accepted {
    background-color: #d4edda;
    color: #155724;
}

.status-rejected {
    background-color: #f8d7da;
    color: #721c24;
}

.status-completed {
    background-color: #d1ecf1;
    color: #0c5460;
}

.referral-details p {
    margin: 8px 0;
    font-size: 14px;
}

.no-referrals {
    background-color: #f8f9fa;
    padding: 30px;
    text-align: center;
    border-radius: 8px;
    color: #6c757d;
}

/* Status dropdown controls styling */
.referral-status-controls {
    margin-top: 25px;
}

.status-control {
    margin-bottom: 25px;
}

.status-control:last-child {
    margin-bottom: 15px;
}

.status-control label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    font-size: 16px;
}

.status-select {
    width: 100%;
    padding: 12px 16px;
    font-size: 16px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    background-color: #f9f9f9;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24'%3E%3Cpath fill='%23555' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.status-select:focus {
    border-color: #4a90e2;
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
    outline: none;
}

/* Responsive adjustments */
@media (max-width: 480px) {
    .container {
        padding: 20px;
    }
    
    h1 {
        font-size: 24px;
    }
    
    input[type="email"],
    input[type="password"],
    button {
        padding: 10px;
        font-size: 14px;
    }
}

@media (max-width: 768px) {
    .form-control {
        min-width: 100%;
    }
}
