/* Client Dashboard Enhanced CSS */

/* Global Variables */
:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary-gradient: linear-gradient(135deg, #10b981 0%, #059669 100%);
    --danger-gradient: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    --warning-gradient: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    --info-gradient: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    --glass-bg: rgba(255, 255, 255, 0.95);
    --glass-border: rgba(255, 255, 255, 0.2);
    --shadow-light: 0 4px 6px rgba(0, 0, 0, 0.05);
    --shadow-medium: 0 10px 25px rgba(0, 0, 0, 0.1);
    --shadow-heavy: 0 20px 40px rgba(0, 0, 0, 0.15);
    --border-radius: 15px;
    --border-radius-lg: 20px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dashboard Section */
.dashboard-section {
    padding: 80px 0;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    overflow: hidden;
}

.dashboard-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
    pointer-events: none;
}

.dashboard-container {
    background: var(--glass-bg);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-heavy);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    position: relative;
    z-index: 1;
    transition: var(--transition);
}

.dashboard-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2);
}

/* Section Titles */
.section-title {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
    margin-bottom: 10px;
    font-size: 2.5rem;
    text-align: center;
}

.section-subtitle {
    color: #6b7280;
    font-size: 1.2rem;
    text-align: center;
    margin-bottom: 2rem;
}

/* Info Cards */
.info-card {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: var(--border-radius);
    padding: 2rem;
    margin-bottom: 2rem;
    border: 1px solid rgba(102, 126, 234, 0.1);
    box-shadow: var(--shadow-light);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.info-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary-gradient);
}

.info-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-medium);
}

.info-label {
    font-weight: 700;
    color: #374151;
    margin-bottom: 8px;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-value {
    color: #1f2937;
    font-size: 1.1rem;
    font-weight: 500;
    word-break: break-word;
}

.info-value a {
    color: #3b82f6;
    text-decoration: none;
    transition: var(--transition);
    font-weight: 600;
}

.info-value a:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

/* Status Badges */
.status-badge {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-active {
    background: var(--secondary-gradient);
    color: white;
}

.status-inactive {
    background: var(--danger-gradient);
    color: white;
}

.status-pending {
    background: var(--warning-gradient);
    color: white;
}

/* Buttons */
.btn-action {
    background: var(--primary-gradient);
    border: none;
    border-radius: 12px;
    padding: 12px 24px;
    font-weight: 600;
    color: white;
    transition: var(--transition);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    box-shadow: var(--shadow-light);
}

.btn-action:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-medium);
    color: white;
    text-decoration: none;
}

.btn-action:active {
    transform: translateY(-1px);
}

.btn-secondary-action {
    background: var(--secondary-gradient);
    border: none;
    border-radius: 12px;
    padding: 12px 24px;
    font-weight: 600;
    color: white;
    transition: var(--transition);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    box-shadow: var(--shadow-light);
}

.btn-secondary-action:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-medium);
    color: white;
    text-decoration: none;
}

.btn-danger-action {
    background: var(--danger-gradient);
    border: none;
    border-radius: 12px;
    padding: 8px 16px;
    font-weight: 600;
    color: white;
    transition: var(--transition);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
}

.btn-danger-action:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
    color: white;
    text-decoration: none;
}

/* Family Member Cards */
.family-member-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 1rem;
    border: 1px solid #e5e7eb;
    box-shadow: var(--shadow-light);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.family-member-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--secondary-gradient);
}

.family-member-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
    border-color: #d1d5db;
}

.family-member-name {
    font-weight: 700;
    color: #374151;
    margin-bottom: 8px;
    font-size: 1.1rem;
}

.family-member-relationship {
    color: #6b7280;
    font-size: 0.9rem;
    margin-bottom: 8px;
    font-weight: 500;
}

.family-member-contact {
    color: #9ca3af;
    font-size: 0.85rem;
    margin-bottom: 12px;
}

.emergency-badge {
    background: var(--danger-gradient);
    color: white;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
    margin-bottom: 12px;
}

/* Form Styling */
.form-control {
    border-radius: 10px;
    border: 2px solid #e5e7eb;
    padding: 12px 16px;
    font-size: 0.95rem;
    transition: var(--transition);
    background: #fafafa;
}

.form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    background: white;
}

.form-select {
    border-radius: 10px;
    border: 2px solid #e5e7eb;
    padding: 12px 16px;
    font-size: 0.95rem;
    transition: var(--transition);
    background: #fafafa;
}

.form-select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    background: white;
}

.form-label {
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

/* Alerts */
.alert {
    border-radius: 12px;
    border: none;
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
    font-weight: 500;
    box-shadow: var(--shadow-light);
}

.alert-success {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #065f46;
    border-left: 4px solid #10b981;
}

.alert-danger {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #991b1b;
    border-left: 4px solid #ef4444;
}

.alert-warning {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #92400e;
    border-left: 4px solid #f59e0b;
}

.alert-info {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    color: #1e40af;
    border-left: 4px solid #3b82f6;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: #6b7280;
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state h5 {
    color: #374151;
    margin-bottom: 0.5rem;
}

/* Divider */
.divider {
    height: 2px;
    background: linear-gradient(90deg, transparent, #e5e7eb, transparent);
    margin: 2rem 0;
    border: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .dashboard-section {
        padding: 40px 0;
    }
    
    .dashboard-container {
        margin: 0 15px;
        padding: 1.5rem !important;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .info-card {
        padding: 1.5rem;
    }
    
    .btn-action,
    .btn-secondary-action {
        width: 100%;
        justify-content: center;
        margin-bottom: 0.5rem;
    }
    
    .family-member-card {
        padding: 1rem;
    }
}

@media (max-width: 576px) {
    .dashboard-container {
        margin: 0 10px;
        padding: 1rem !important;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
    
    .info-card {
        padding: 1rem;
    }
    
    .btn-action,
    .btn-secondary-action {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.6s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-in-left {
    animation: slideInLeft 0.6s ease-out;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.slide-in-right {
    animation: slideInRight 0.6s ease-out;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Form Section Styling */
.form-section {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    margin: 2rem 0;
    box-shadow: var(--shadow-medium);
    backdrop-filter: blur(20px);
    animation: fadeIn 0.5s ease-in-out;
}

.form-section h3 {
    color: var(--primary-color);
    font-weight: 700;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

/* Modal Styling */
.modal-content {
    border-radius: var(--border-radius-lg);
    border: none;
    box-shadow: var(--shadow-heavy);
    backdrop-filter: blur(20px);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
}

.modal-header {
    background: var(--primary-gradient);
    color: white;
    border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0;
    padding: 1.5rem;
    border-bottom: none;
}

.modal-title {
    font-weight: 700;
    font-size: 1.25rem;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.modal-title::before {
    content: '👥';
    font-size: 1.5rem;
}

.modal-body {
    padding: 2rem;
    background: white;
}

.modal-footer {
    background: #f8fafc;
    border-radius: 0 0 var(--border-radius-lg) var(--border-radius-lg);
    padding: 1.5rem;
    border-top: 1px solid #e5e7eb;
}

.btn-close {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    opacity: 1;
    transition: var(--transition);
}

.btn-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.btn-close:focus {
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
}

/* Form Section Styling */
.form-section {
    background: var(--glass-bg);
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    margin: 2rem 0;
    box-shadow: var(--shadow-medium);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    position: relative;
    overflow: hidden;
}

.form-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--secondary-gradient);
}

.form-section h3 {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-section h3::before {
    content: '➕';
    font-size: 1.25rem;
}

/* Enhanced Form Controls */
.form-control,
.form-select {
    border-radius: 12px;
    border: 2px solid #e5e7eb;
    padding: 14px 18px;
    font-size: 1rem;
    transition: var(--transition);
    background: #fafafa;
    font-weight: 500;
}

.form-control:focus,
.form-select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
    background: white;
    transform: translateY(-1px);
}

.form-control:hover,
.form-select:hover {
    border-color: #d1d5db;
    background: white;
}

.form-label {
    font-weight: 700;
    color: #374151;
    margin-bottom: 10px;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-text {
    color: #6b7280;
    font-size: 0.85rem;
    margin-top: 6px;
    font-style: italic;
}

/* Required Field Indicator */
.text-danger {
    color: #ef4444 !important;
    font-weight: 700;
}

/* Form Row Styling */
.form-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.form-row .form-group {
    flex: 1;
}

/* Checkbox Styling */
.form-check-input {
    width: 20px;
    height: 20px;
    border-radius: 6px;
    border: 2px solid #d1d5db;
    background: #fafafa;
    transition: var(--transition);
}

.form-check-input:checked {
    background: var(--secondary-gradient);
    border-color: #10b981;
}

.form-check-input:focus {
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.form-check-label {
    font-weight: 600;
    color: #374151;
    margin-left: 0.5rem;
    cursor: pointer;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-gradient);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
}
