/* lastwish.company Application Styles */

/* Base styles */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: #f8fafc;
    margin: 0;
    padding: 0;
    line-height: 1.6;
    color: #374151;
}

/* CSS Variables for consistent theming */
:root {
    --primary-color: #667eea;
    --primary-dark: #764ba2;
    --secondary-color: #f093fb;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --info-color: #17a2b8;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --border-radius: 8px;
    --box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-xxl: 3rem;
}

/* Utility classes (scoped) */
.lw-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

/* Button styles (scoped) */
.lw-btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: var(--border-radius);
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
    font-size: 14px;
    line-height: 1.5;
}

.lw-btn:hover {
    text-decoration: none;
}

.lw-btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
}

.lw-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.lw-btn-secondary {
    background-color: #6c757d;
    color: white;
}

.lw-btn-secondary:hover {
    background-color: #5a6268;
}

.lw-btn-success {
    background-color: var(--success-color);
    color: white;
}

.lw-btn-success:hover {
    background-color: #218838;
}

.lw-btn-danger {
    background-color: var(--danger-color);
    color: white;
}

.lw-btn-danger:hover {
    background-color: #c82333;
}

.lw-btn-warning {
    background-color: var(--warning-color);
    color: #212529;
}

.lw-btn-warning:hover {
    background-color: #e0a800;
}

.lw-btn-info {
    background-color: var(--info-color);
    color: white;
}

.lw-btn-info:hover {
    background-color: #138496;
}

/* Form styles */
.form-group {
    margin-bottom: var(--spacing-md);
}

.form-label {
    display: block;
    margin-bottom: var(--spacing-sm);
    font-weight: 500;
    color: #374151;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: var(--border-radius);
    font-size: 14px;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-control.is-invalid {
    border-color: var(--danger-color);
}

.invalid-feedback {
    display: none;
    width: 100%;
    margin-top: var(--spacing-xs);
    font-size: 0.875rem;
    color: var(--danger-color);
}

/* Remove button styling */
.remove-btn {
    margin-top: var(--spacing-lg);
}

/* Form section styling */
.form-section {
    background: var(--light-color);
    border: 1px solid #e5e7eb;
    border-radius: var(--border-radius);
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

.form-section h3 {
    color: var(--primary-color);
    margin-bottom: var(--spacing-md);
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: var(--spacing-sm);
}

/* Form row styling */
.form-row {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-md);
}

.form-row .form-group {
    flex: 1;
    min-width: 200px;
}

/* Beneficiary and asset items */
.beneficiary-item,
.asset-item {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: var(--border-radius);
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-md);
}

/* Page header styling */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-xl);
    padding-bottom: var(--spacing-md);
    border-bottom: 1px solid #e5e7eb;
}

.page-header h1 {
    margin: 0;
    color: var(--primary-color);
}

/* Form actions */
.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    padding-top: 2rem;
    border-top: 1px solid #e5e7eb;
    margin-top: 2rem;
}

/* Card styles (scoped) */
.lw-card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
    margin-bottom: var(--spacing-md);
}

.lw-card .card-header {
    padding: var(--spacing-md);
    background-color: #f8f9fa;
    border-bottom: 1px solid #e5e7eb;
    font-weight: 600;
}

.lw-card .card-body {
    padding: var(--spacing-md);
}

/* Alert styles (scoped) */
.lw-alert {
    padding: 16px var(--spacing-md);
    border-radius: var(--border-radius);
    margin-bottom: var(--spacing-md);
    border-left: 4px solid;
}

.lw-alert-success {
    background-color: #d4edda;
    border-color: var(--success-color);
    color: #155724;
}

.lw-alert-danger {
    background-color: #f8d7da;
    border-color: var(--danger-color);
    color: #721c24;
}

.lw-alert-warning {
    background-color: #fff3cd;
    border-color: var(--warning-color);
    color: #856404;
}

.lw-alert-info {
    background-color: #d1ecf1;
    border-color: var(--info-color);
    color: #0c5460;
}

/* Navigation styles (scoped) */
.lw-navbar {
    background: white;
    box-shadow: var(--box-shadow);
    padding: 16px 0;
}

.lw-navbar .navbar-brand {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
}

.lw-navbar .navbar-nav {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    align-items: center;
}

.lw-navbar .nav-item {
    margin-left: 20px;
}

.lw-navbar .nav-link {
    color: #6b7280;
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.lw-navbar .nav-link:hover {
    color: var(--primary-color);
}

/* Chart legend styling */
.legend-color {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 2px;
    margin-right: 8px;
}

.legend-active {
    background: var(--success-color);
}

.legend-draft {
    background: var(--warning-color);
}

.legend-inactive {
    background: var(--danger-color);
}

/* Bar chart styling */
.relationship-bar,
.asset-bar {
    background: #f8f9fa;
    border-radius: 4px;
    height: 8px;
    position: relative;
    overflow: hidden;
}

.bar-fill {
    background: var(--primary-color);
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s ease;
}

/* Responsive design */
/* Mobile-first approach */
@media (max-width: 576px) {
    .container {
        padding: 0 var(--spacing-sm);
        max-width: 100%;
    }
    
    .btn {
        width: 100%;
        margin-bottom: var(--spacing-sm);
        padding: 12px var(--spacing-md);
        min-height: 44px; /* Touch target size */
        font-size: 16px; /* Prevent zoom on iOS */
    }
    
    .form-section {
        padding: var(--spacing-md);
        margin-bottom: var(--spacing-md);
    }
    
    .form-row {
        flex-direction: column;
        gap: var(--spacing-sm);
    }
    
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--spacing-md);
        text-align: left;
        padding: var(--spacing-md) 0;
    }
    
    .page-header h1 {
        font-size: 1.5rem;
        line-height: 1.3;
    }
    
    .form-actions {
        flex-direction: column;
        gap: var(--spacing-sm);
        position: sticky;
        bottom: 0;
        background: white;
        padding: var(--spacing-md);
        margin: 0 -var(--spacing-md);
        border-top: 1px solid #e5e7eb;
    }
    
    .card {
        margin-bottom: var(--spacing-md);
        border-radius: 8px;
    }
    
    .card-header,
    .card-body {
        padding: var(--spacing-md);
    }
    
    /* Form inputs mobile optimization */
    .form-control,
    .form-select,
    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="number"],
    input[type="date"],
    textarea,
    select {
        font-size: 16px; /* Prevent zoom on iOS */
        min-height: 44px; /* Touch target size */
        padding: 12px 16px;
    }
    
    /* Table responsive */
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .table {
        min-width: 600px;
    }
    
    .table th,
    .table td {
        padding: 8px 12px;
        font-size: 0.875rem;
    }
    
    /* Navigation mobile improvements */
    .navbar {
        padding: 12px 0;
    }
    
    .navbar-brand {
        font-size: 1.25rem;
    }
    
    /* Modal mobile optimization */
    .lw-modal .modal-content {
        width: 95%;
        margin: 10px auto;
        max-height: 90vh;
        overflow-y: auto;
    }
    
    /* Stats cards mobile */
    .stats-card {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    .stats-number {
        font-size: 1.5rem;
    }
    
    /* Progress bars mobile */
    .progress {
        height: 16px;
        margin: 8px 0;
    }
    
    /* Dashboard and Analytics Mobile Optimizations */
    .dashboard-overview,
    .admin-dashboard,
    .analytics-container {
        padding: var(--spacing-sm);
    }
    
    .overview-stats,
    .dashboard-stats,
    .stats-grid {
        display: grid;
        grid-template-columns: 1fr;
        gap: var(--spacing-sm);
        margin-bottom: var(--spacing-md);
    }
    
    .stat-card {
        padding: var(--spacing-sm);
        background: white;
        border-radius: 8px;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
        border: 1px solid #e5e7eb;
        display: flex;
        align-items: center;
        gap: var(--spacing-sm);
    }
    
    .stat-icon {
        width: 48px;
        height: 48px;
        border-radius: 8px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: #eff6ff;
        color: var(--primary-color);
        font-size: 1.25rem;
        flex-shrink: 0;
    }
    
    .stat-content {
        flex: 1;
        min-width: 0;
    }
    
    .stat-content h3 {
        font-size: 1.5rem;
        font-weight: 700;
        margin: 0 0 4px 0;
        color: #1f2937;
    }
    
    .stat-content p {
        font-size: 0.875rem;
        color: #6b7280;
        margin: 0;
    }
    
    .stat-trend {
        font-size: 0.75rem;
        color: #059669;
        font-weight: 500;
        text-align: right;
        flex-shrink: 0;
    }
    
    .stat-number {
        font-size: 1.75rem !important;
        font-weight: 700 !important;
        color: var(--primary-color) !important;
        margin: 0 !important;
    }
    
    /* Dashboard content sections */
    .overview-content,
    .content-section {
        margin-bottom: var(--spacing-md);
    }
    
    .section-card,
    .action-card,
    .completeness-card,
    .tips-card {
        background: white;
        border-radius: 8px;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
        border: 1px solid #e5e7eb;
        margin-bottom: var(--spacing-sm);
        overflow: hidden;
    }
    
    .section-header,
    .completeness-header,
    .tips-header {
        padding: var(--spacing-sm);
        background: #f8f9fa;
        border-bottom: 1px solid #e5e7eb;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    
    .section-header h3,
    .completeness-header h2,
    .tips-header h3 {
        margin: 0;
        font-size: 1.125rem;
        color: #1f2937;
    }
    
    .section-body,
    .completeness-details,
    .tips-body {
        padding: var(--spacing-sm);
    }
    
    /* List items */
    .wills-list,
    .beneficiaries-list,
    .notifications-list {
        display: flex;
        flex-direction: column;
        gap: var(--spacing-sm);
    }
    
    .will-item,
    .beneficiary-item,
    .notification-item {
        padding: var(--spacing-sm);
        border: 1px solid #e5e7eb;
        border-radius: 6px;
        background: #f9fafb;
        display: flex;
        align-items: center;
        gap: var(--spacing-sm);
    }
    
    .will-info,
    .beneficiary-info,
    .notification-content {
        flex: 1;
        min-width: 0;
    }
    
    .will-info h4,
    .beneficiary-info h4 {
        margin: 0 0 4px 0;
        font-size: 1rem;
        font-weight: 600;
    }
    
    .will-meta,
    .beneficiary-meta {
        font-size: 0.8125rem;
        color: #6b7280;
        margin: 0;
        display: flex;
        flex-direction: column;
        gap: 2px;
    }
    
    .status-badge {
        display: inline-block;
        padding: 2px 8px;
        border-radius: 12px;
        font-size: 0.75rem;
        font-weight: 500;
        text-transform: uppercase;
        letter-spacing: 0.025em;
    }
    
    .status-draft {
        background: #fef3c7;
        color: #92400e;
    }
    
    .status-active {
        background: #d1fae5;
        color: #065f46;
    }
    
    .status-pending {
        background: #fde68a;
        color: #92400e;
    }
    
    /* Action buttons */
    .will-actions,
    .beneficiary-actions {
        flex-shrink: 0;
    }
    
    .action-buttons {
        display: grid;
        grid-template-columns: 1fr;
        gap: 8px;
        margin-top: var(--spacing-sm);
    }
    
    .action-buttons .btn {
        padding: 8px 12px;
        font-size: 0.875rem;
        text-align: center;
    }
    
    /* Empty states */
    .empty-state {
        text-align: center;
        padding: var(--spacing-md);
        color: #6b7280;
    }
    
    .empty-state i {
        font-size: 3rem;
        color: #d1d5db;
        margin-bottom: var(--spacing-sm);
    }
    
    .empty-state h4 {
        margin: 0 0 8px 0;
        color: #374151;
    }
    
    .empty-state p {
        margin: 0 0 var(--spacing-sm) 0;
        font-size: 0.875rem;
    }
    
    /* Progress and completeness */
    .completeness-meter {
        height: 8px;
        background: #e5e7eb;
        border-radius: 4px;
        overflow: hidden;
        margin: var(--spacing-sm) 0;
    }
    
    .meter-bar {
        height: 100%;
        background: linear-gradient(90deg, #10b981, #059669);
        transition: width 0.3s ease;
    }
    
    .percentage {
        font-size: 1.25rem;
        font-weight: 700;
        color: var(--primary-color);
    }
    
    .missing-list {
        list-style: none;
        padding: 0;
        margin: 0;
    }
    
    .missing-list li {
        padding: 8px 0;
        border-bottom: 1px solid #e5e7eb;
        font-size: 0.875rem;
        color: #6b7280;
    }
    
    .missing-list li:last-child {
        border-bottom: none;
    }
    
    /* Tips and notifications */
    .tip-item {
        display: flex;
        gap: var(--spacing-sm);
        padding: var(--spacing-sm) 0;
        border-bottom: 1px solid #e5e7eb;
    }
    
    .tip-item:last-child {
        border-bottom: none;
    }
    
    .tip-item i {
        color: #fbbf24;
        font-size: 1.25rem;
        flex-shrink: 0;
        margin-top: 2px;
    }
    
    .tip-content h5 {
        margin: 0 0 4px 0;
        font-size: 0.9375rem;
        font-weight: 600;
        color: #1f2937;
    }
    
    .tip-content p {
        margin: 0;
        font-size: 0.8125rem;
        color: #6b7280;
        line-height: 1.4;
    }
    
    /* Analytics specific */
    .analytics-card,
    .chart-container {
        background: white;
        border-radius: 8px;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
        border: 1px solid #e5e7eb;
        margin-bottom: var(--spacing-sm);
        overflow: hidden;
    }
    
    .chart-header {
        padding: var(--spacing-sm);
        background: #f8f9fa;
        border-bottom: 1px solid #e5e7eb;
    }
    
    .chart-body {
        padding: var(--spacing-sm);
        min-height: 200px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .chart-legend {
        padding: var(--spacing-sm);
        border-top: 1px solid #e5e7eb;
        display: flex;
        flex-wrap: wrap;
        gap: var(--spacing-sm);
        justify-content: center;
    }
    
    .legend-item {
        display: flex;
        align-items: center;
        gap: 6px;
        font-size: 0.8125rem;
    }
    
    .legend-color {
        width: 12px;
        height: 12px;
        border-radius: 2px;
    }
}

/* Tablet styles */
@media (min-width: 577px) and (max-width: 768px) {
    .container {
        padding: 0 var(--spacing-md);
        max-width: 100%;
    }
    
    /* Tablet dashboard optimizations */
    .dashboard-overview,
    .admin-dashboard,
    .analytics-container {
        padding: var(--spacing-md);
    }
    
    .overview-stats,
    .dashboard-stats,
    .stats-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-md);
        margin-bottom: var(--spacing-lg);
    }
    
    .stat-card {
        padding: var(--spacing-md);
        background: white;
        border-radius: 10px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
        border: 1px solid #e5e7eb;
        display: flex;
        align-items: center;
        gap: var(--spacing-md);
        transition: transform 0.2s ease, box-shadow 0.2s ease;
    }
    
    .stat-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }
    
    .stat-icon {
        width: 56px;
        height: 56px;
        border-radius: 12px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: linear-gradient(135deg, #eff6ff, #dbeafe);
        color: var(--primary-color);
        font-size: 1.5rem;
        flex-shrink: 0;
    }
    
    .stat-content h3 {
        font-size: 1.75rem;
        font-weight: 700;
        margin: 0 0 6px 0;
        color: #1f2937;
    }
    
    .stat-content p {
        font-size: 0.9375rem;
        color: #6b7280;
        margin: 0;
    }
    
    .stat-trend {
        font-size: 0.8125rem;
        color: #059669;
        font-weight: 500;
        text-align: right;
        flex-shrink: 0;
    }
    
    .stat-number {
        font-size: 2rem !important;
        font-weight: 700 !important;
        color: var(--primary-color) !important;
        margin: 0 !important;
    }
    
    /* Tablet content layout */
    .overview-content {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: var(--spacing-md);
        margin-bottom: var(--spacing-lg);
    }
    
    .content-section {
        margin-bottom: 0;
    }
    
    .section-card,
    .action-card,
    .completeness-card,
    .tips-card {
        background: white;
        border-radius: 10px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
        border: 1px solid #e5e7eb;
        margin-bottom: var(--spacing-md);
        overflow: hidden;
    }
    
    .section-header,
    .completeness-header,
    .tips-header {
        padding: var(--spacing-md);
        background: #f8f9fa;
        border-bottom: 1px solid #e5e7eb;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    
    .section-header h3,
    .completeness-header h2,
    .tips-header h3 {
        margin: 0;
        font-size: 1.25rem;
        color: #1f2937;
        font-weight: 600;
    }
    
    .section-body,
    .completeness-details,
    .tips-body {
        padding: var(--spacing-md);
    }
    
    /* Tablet action sections */
    .overview-actions {
        display: grid;
        grid-template-columns: 2fr 1fr;
        gap: var(--spacing-md);
        margin-bottom: var(--spacing-lg);
    }
    
    .action-section {
        margin-bottom: 0;
    }
    
    .action-buttons {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-sm);
        margin-top: var(--spacing-md);
    }
    
    .action-buttons .btn {
        padding: 10px 16px;
        font-size: 0.875rem;
        text-align: center;
        border-radius: 6px;
    }
    
    /* Tablet analytics layout */
    .detailed-analytics {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-md);
    }
    
    .analytics-card,
    .chart-container {
        background: white;
        border-radius: 10px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
        border: 1px solid #e5e7eb;
        margin-bottom: var(--spacing-md);
        overflow: hidden;
    }
    
    .chart-header {
        padding: var(--spacing-md);
        background: #f8f9fa;
        border-bottom: 1px solid #e5e7eb;
    }
    
    .chart-body {
        padding: var(--spacing-md);
        min-height: 250px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .form-row {
        flex-direction: column;
    }
    
    .form-row .form-group {
        min-width: auto;
    }
    
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--spacing-md);
    }
    
    /* Tablet-specific button sizing */
    .btn {
        min-height: 44px;
        padding: 12px 24px;
    }
    
    /* Tablet navigation */
    .navbar-nav {
        flex-direction: row;
        flex-wrap: wrap;
        gap: var(--spacing-sm);
    }
    
    /* Tablet form improvements */
    .form-control,
    .form-select,
    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="number"],
    input[type="date"],
    textarea,
    select {
        min-height: 44px;
        padding: 12px 16px;
    }
    
    /* Tablet modal sizing */
    .lw-modal .modal-content {
        width: 85%;
        max-width: 600px;
    }
    
    /* Tablet stats layout */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
}

/* Desktop styles */
@media (min-width: 769px) and (max-width: 1024px) {
    .container {
        max-width: 960px;
    }
    
    .form-row .form-group {
        min-width: 250px;
    }
}

/* Large desktop styles */
@media (min-width: 1025px) {
    .container {
        max-width: 1200px;
    }
}

/* Navigation responsive styles */
@media (max-width: 768px) {
    .navbar {
        padding: 12px 0;
    }
    
    .navbar-nav {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
        background: white;
        border-radius: 8px;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
        margin-top: var(--spacing-sm);
        padding: var(--spacing-sm);
    }
    
    .nav-item {
        margin-left: 0;
        margin-top: var(--spacing-sm);
        width: 100%;
    }
    
    .nav-link {
        padding: 12px var(--spacing-sm);
        width: 100%;
        border-radius: 6px;
        transition: background-color 0.2s ease;
        min-height: 44px;
        display: flex;
        align-items: center;
    }
    
    .nav-link:hover,
    .nav-link:focus {
        background-color: #f8f9fa;
    }
    
    /* Mobile dropdown improvements */
    .dropdown-menu {
        position: static;
        display: block;
        width: 100%;
        box-shadow: none;
        border: none;
        background: #f8f9fa;
        margin-top: var(--spacing-xs);
        border-radius: 6px;
    }
    
    .dropdown-item {
        padding: 12px var(--spacing-md);
        min-height: 44px;
        display: flex;
        align-items: center;
    }
    
    /* Mobile menu toggle */
    .navbar-toggler {
        border: none;
        padding: 8px 12px;
        background: transparent;
        min-height: 44px;
        min-width: 44px;
    }
    
    .navbar-toggler:focus {
        outline: 2px solid var(--primary-color);
        outline-offset: 2px;
    }
}

/* Loading spinner */
.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Table styles */
.table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.table th,
.table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

.table th {
    background-color: #f8f9fa;
    font-weight: 600;
}

.table-striped tbody tr:nth-child(odd) {
    background-color: #f8f9fa;
}

/* Responsive table wrapper */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Mobile table optimizations */
@media (max-width: 768px) {
    .table-responsive {
        margin: 0 -var(--spacing-sm);
        border-radius: 0;
    }
    
    .table {
        min-width: 600px;
        font-size: 0.875rem;
    }
    
    .table th,
    .table td {
        padding: 8px 12px;
        white-space: nowrap;
    }
    
    /* Stack table for very small screens */
    .table-stack {
        display: block;
        width: 100%;
    }
    
    .table-stack thead {
        display: none;
    }
    
    .table-stack tbody,
    .table-stack tr,
    .table-stack td {
        display: block;
        width: 100%;
    }
    
    .table-stack tr {
        border: 1px solid #e5e7eb;
        border-radius: 8px;
        margin-bottom: var(--spacing-sm);
        padding: var(--spacing-sm);
        background: white;
    }
    
    .table-stack td {
        border: none;
        padding: 4px 0;
        text-align: left;
    }
    
    .table-stack td:before {
        content: attr(data-label) ": ";
        font-weight: 600;
        color: var(--primary-color);
    }
}

/* Modal styles */
.lw-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.lw-modal .modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 20px;
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 500px;
    position: relative;
}

.lw-modal .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.close {
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: #aaa;
}

.close:hover {
    color: #000;
}

/* Consolidated styles from inline CSS */

/* Form and validation styles */
.required {
    color: #dc3545;
}

.form-control.is-invalid {
    border-color: #dc3545;
}

.invalid-feedback {
    display: block;
    width: 100%;
    margin-top: 0.25rem;
    font-size: 0.875em;
    color: #dc3545;
}

/* Profile and dashboard styles */
.profile-header {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    padding: 2rem 0;
    margin-bottom: 2rem;
}

.stats-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.stats-card:hover {
    transform: translateY(-5px);
}

.stats-number {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary-color);
}

/* Progress bar styles */
.progress {
    height: 20px;
    background-color: #e9ecef;
    border-radius: 10px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transition: width 0.6s ease;
}

/* Beneficiary and will management styles */
.beneficiary-card {
    border: 1px solid #dee2e6;
    border-radius: var(--border-radius);
    padding: 1rem;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.beneficiary-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.will-status {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
}

.will-status.draft {
    background-color: #fff3cd;
    color: #856404;
}

.will-status.active {
    background-color: #d4edda;
    color: #155724;
}

.will-status.archived {
    background-color: #f8d7da;
    color: #721c24;
}

/* Email template styles */
.email-preview {
    border: 1px solid #dee2e6;
    border-radius: var(--border-radius);
    padding: 1rem;
    background-color: #f8f9fa;
    font-family: Arial, sans-serif;
}

.email-header {
    font-weight: bold;
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

/* Subscription and pricing styles */
.pricing-card {
    border: 2px solid #e9ecef;
    border-radius: var(--border-radius);
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
}

.pricing-card.featured {
    border-color: var(--primary-color);
    transform: scale(1.05);
}

.pricing-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.price-amount {
    font-size: 3rem;
    font-weight: bold;
    color: var(--primary-color);
}

.price-period {
    color: #6c757d;
    font-size: 1rem;
}

/* Checkout and payment styles */
.checkout-header {
    border-bottom: 1px solid #e9ecef;
    padding-bottom: 2rem;
}

.plan-details {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 0.5rem;
}

.price-display {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
}

.payment-methods .form-check {
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    padding: 1rem;
    transition: all 0.3s ease;
}

.payment-methods .form-check:hover {
    border-color: var(--primary-color);
    background-color: #f8f9fa;
}

.payment-methods .form-check-input:checked + .form-check-label {
    color: var(--primary-color);
    font-weight: 500;
}

/* Success page styles */
.success-icon i {
    font-size: 4rem;
}

.step-item {
    position: relative;
}

.step-item:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 1rem;
    top: 3rem;
    bottom: -1rem;
    width: 2px;
    background: #dee2e6;
}

.step-number {
    min-width: 2rem;
}

.step-number .badge {
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
}

/* Landing page styles */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    padding: 5rem 0;
}

.feature-icon {
    width: 60px;
    height: 60px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    margin: 0 auto 1rem;
}

.testimonial-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

/* Admin dashboard styles */
.admin-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 1.5rem;
}

.admin-stat {
    text-align: center;
    padding: 1rem;
}

.admin-stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

/* Utility classes */
.text-gradient {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.shadow-soft {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.border-gradient {
    border: 2px solid;
    border-image: linear-gradient(135deg, var(--primary-color), var(--secondary-color)) 1;
}

/* Animation classes */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.slide-up {
    animation: slideUp 0.6s ease-out;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Navigation Accessibility Enhancements */
.main-navigation {
    position: relative;
}

.nav-link:focus,
.dropdown-toggle:focus,
.dropdown-item:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
    background-color: rgba(0, 123, 255, 0.1);
}

.nav-dropdown {
    position: relative;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 1000;
    min-width: 200px;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.dropdown-menu.show {
    display: block;
}

.dropdown-item {
    display: block;
    width: 100%;
    padding: 0.5rem 1rem;
    color: #212529;
    text-decoration: none;
    border: none;
    background: none;
    text-align: left;
}

.dropdown-item:hover,
.dropdown-item:focus {
    background-color: #f8f9fa;
    color: #16181b;
}

.dropdown-divider {
    height: 0;
    margin: 0.5rem 0;
    overflow: hidden;
    border-top: 1px solid #dee2e6;
}

/* Skip to main content link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: #000;
    color: #fff;
    padding: 8px;
    text-decoration: none;
    z-index: 9999;
    border-radius: 4px;
}

.skip-link:focus {
    top: 6px;
}

/* Screen reader only content */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus visible for better keyboard navigation */
.nav-link:focus-visible,
.dropdown-toggle:focus-visible,
.dropdown-item:focus-visible,
.btn:focus-visible {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

/* -----------------------------------------------
   LastWish: Sidebar Section Header Enhancements
   ----------------------------------------------- */
#lwSidebar {
  --lw-sidebar-header-bg: #f8fafc; /* very light slate */
  --lw-sidebar-header-border: #e5e7eb; /* light gray border */
  --lw-sidebar-header-text: #475569; /* slate-600 */
  --lw-sidebar-header-accent: #2563eb; /* primary */
}

#lwSidebar .lw-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--lw-sidebar-header-text);
  background: var(--lw-sidebar-header-bg);
  border: 1px solid var(--lw-sidebar-header-border);
  border-radius: 10px;
  padding: 8px 12px;
  margin: 4px 8px 6px;
}

#lwSidebar .lw-section-title::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--lw-sidebar-header-accent);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}

@media (max-width: 992px) {
  #lwSidebar .lw-section-title {
    border-radius: 8px;
    padding: 7px 10px;
    margin: 2px 6px 6px;
  }
}

/* ==========================================================================
   FORM MOBILE ENHANCEMENTS
   ========================================================================== */

/* Mobile form improvements */
@media (max-width: 576px) {
    /* Form sections */
    .form-section {
        padding: var(--spacing-md);
        margin-bottom: var(--spacing-lg);
        border-radius: 8px;
        background: white;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    }
    
    .form-section h3,
    .form-section legend {
        font-size: 1.25rem;
        margin-bottom: var(--spacing-md);
        color: var(--primary-color);
        border-bottom: 2px solid #e5e7eb;
        padding-bottom: var(--spacing-sm);
    }
    
    /* Form rows - stack on mobile */
    .form-row {
        display: flex;
        flex-direction: column;
        gap: var(--spacing-md);
    }
    
    /* Form groups */
    .form-group {
        margin-bottom: var(--spacing-md);
    }
    
    .form-group label {
        display: block;
        font-weight: 600;
        margin-bottom: var(--spacing-xs);
        color: #374151;
        font-size: 16px; /* Prevent zoom on iOS */
    }
    
    /* Required field indicator */
    .required {
        color: #dc3545;
        font-weight: bold;
    }
    
    /* Form help text */
    .form-help {
        font-size: 14px;
        color: #6b7280;
        margin-top: var(--spacing-xs);
        line-height: 1.4;
    }
    
    /* Error messages */
    .error-message {
        color: #dc3545;
        font-size: 14px;
        margin-top: var(--spacing-xs);
        padding: var(--spacing-xs) var(--spacing-sm);
        background-color: #fef2f2;
        border-radius: 4px;
        border-left: 3px solid #dc3545;
    }
    
    /* Dynamic form items (beneficiaries, assets) */
    .beneficiary-item,
    .asset-item {
        border: 1px solid #e5e7eb;
        border-radius: 8px;
        padding: var(--spacing-md);
        margin-bottom: var(--spacing-md);
        background: #f9fafb;
        position: relative;
    }
    
    .beneficiary-item h4 {
        font-size: 1.1rem;
        margin-bottom: var(--spacing-sm);
        color: var(--primary-color);
    }
    
    /* Remove buttons */
    .remove-btn {
        position: absolute;
        top: var(--spacing-sm);
        right: var(--spacing-sm);
        min-width: 44px;
        min-height: 44px;
        padding: 8px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Add buttons */
    #add-beneficiary,
    #add-asset {
        width: 100%;
        margin-top: var(--spacing-md);
        padding: 16px;
        font-size: 16px;
        border-radius: 8px;
        border: 2px dashed var(--primary-color);
        background: transparent;
        color: var(--primary-color);
        transition: all 0.3s ease;
    }
    
    #add-beneficiary:hover,
    #add-asset:hover,
    #add-beneficiary:focus,
    #add-asset:focus {
        background: var(--primary-color);
        color: white;
    }
    
    /* Fieldset styling */
    fieldset {
        border: 1px solid #e5e7eb;
        border-radius: 8px;
        padding: var(--spacing-md);
        margin-bottom: var(--spacing-lg);
    }
    
    fieldset legend {
        padding: 0 var(--spacing-sm);
        font-weight: 600;
        color: var(--primary-color);
    }
    
    /* File input improvements */
    input[type="file"] {
        width: 100%;
        padding: 12px;
        border: 2px dashed #d1d5db;
        border-radius: 8px;
        background: #f9fafb;
        text-align: center;
        cursor: pointer;
        transition: border-color 0.3s ease;
    }
    
    input[type="file"]:hover,
    input[type="file"]:focus {
        border-color: var(--primary-color);
        background: #f0f9ff;
    }
    
    /* Form text styling */
    .form-text {
        font-size: 14px;
        color: #6b7280;
        margin-top: var(--spacing-xs);
        display: block;
    }
    
    /* Percentage input styling */
    input[type="number"][name*="percentage"] {
        text-align: center;
        font-weight: 600;
    }
    
    /* Textarea improvements */
    textarea {
        resize: vertical;
        min-height: 100px;
    }
    
    /* Select improvements */
    select {
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
        background-position: right 12px center;
        background-repeat: no-repeat;
        background-size: 16px 12px;
        padding-right: 40px;
    }
    
    .form-row {
        flex-direction: column;
        gap: var(--spacing-sm);
    }
    
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--spacing-md);
        text-align: left;
        padding: var(--spacing-md) 0;
    }
    
    .page-header h1 {
        font-size: 1.5rem;
        line-height: 1.3;
    }
    
    .form-actions {
        flex-direction: column;
        gap: var(--spacing-sm);
        position: sticky;
        bottom: 0;
        background: white;
        padding: var(--spacing-md);
        margin: 0 -var(--spacing-md);
        border-top: 1px solid #e5e7eb;
    }
    
    .card {
        margin-bottom: var(--spacing-md);
        border-radius: 8px;
    }
    
    .card-header,
    .card-body {
        padding: var(--spacing-md);
    }
    
    /* Form inputs mobile optimization */
    .form-control,
    .form-select,
    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="number"],
    input[type="date"],
    textarea,
    select {
        font-size: 16px; /* Prevent zoom on iOS */
        min-height: 44px; /* Touch target size */
        padding: 12px 16px;
    }
    
    /* Table responsive */
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .table {
        min-width: 600px;
    }
    
    .table th,
    .table td {
        padding: 8px 12px;
        font-size: 0.875rem;
    }
    
    /* Navigation mobile improvements */
    .navbar {
        padding: 12px 0;
    }
    
    .navbar-brand {
        font-size: 1.25rem;
    }
    
    /* Modal mobile optimization */
    .lw-modal .modal-content {
        width: 95%;
        margin: 10px auto;
        max-height: 90vh;
        overflow-y: auto;
    }
    
    /* Stats cards mobile */
    .stats-card {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    .stats-number {
        font-size: 1.5rem;
    }
    
    /* Progress bars mobile */
    .progress {
        height: 16px;
        margin: 8px 0;
    }
}

/* Tablet styles */
@media (min-width: 577px) and (max-width: 768px) {
    .container {
        padding: 0 var(--spacing-md);
        max-width: 100%;
    }
    
    .form-row {
        flex-direction: column;
    }
    
    .form-row .form-group {
        min-width: auto;
    }
    
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--spacing-md);
    }
    
    /* Tablet-specific button sizing */
    .btn {
        min-height: 44px;
        padding: 12px 24px;
    }
    
    /* Tablet navigation */
    .navbar-nav {
        flex-direction: row;
        flex-wrap: wrap;
        gap: var(--spacing-sm);
    }
    
    /* Tablet form improvements */
    .form-control,
    .form-select,
    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="number"],
    input[type="date"],
    textarea,
    select {
        min-height: 44px;
        padding: 12px 16px;
    }
    
    /* Tablet modal sizing */
    .modal-content {
        width: 85%;
        max-width: 600px;
    }
    
    /* Tablet stats layout */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
}

/* Desktop styles */
@media (min-width: 769px) and (max-width: 1024px) {
    .container {
        max-width: 960px;
    }
    
    .form-row .form-group {
        min-width: 250px;
    }
}

/* Large desktop styles */
@media (min-width: 1025px) {
    .container {
        max-width: 1200px;
    }
}

/* Navigation responsive styles */
@media (max-width: 768px) {
    .navbar {
        padding: 12px 0;
    }
    
    .navbar-nav {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
        background: white;
        border-radius: 8px;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
        margin-top: var(--spacing-sm);
        padding: var(--spacing-sm);
    }
    
    .nav-item {
        margin-left: 0;
        margin-top: var(--spacing-sm);
        width: 100%;
    }
    
    .nav-link {
        padding: 12px var(--spacing-sm);
        width: 100%;
        border-radius: 6px;
        transition: background-color 0.2s ease;
        min-height: 44px;
        display: flex;
        align-items: center;
    }
    
    .nav-link:hover,
    .nav-link:focus {
        background-color: #f8f9fa;
    }
    
    /* Mobile dropdown improvements */
    .dropdown-menu {
        position: static;
        display: block;
        width: 100%;
        box-shadow: none;
        border: none;
        background: #f8f9fa;
        margin-top: var(--spacing-xs);
        border-radius: 6px;
    }
    
    .dropdown-item {
        padding: 12px var(--spacing-md);
        min-height: 44px;
        display: flex;
        align-items: center;
    }
    
    /* Mobile menu toggle */
    .navbar-toggler {
        border: none;
        padding: 8px 12px;
        background: transparent;
        min-height: 44px;
        min-width: 44px;
    }
    
    .navbar-toggler:focus {
        outline: 2px solid var(--primary-color);
        outline-offset: 2px;
    }
}

/* Loading spinner */
.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Table styles */
.table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.table th,
.table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

.table th {
    background-color: #f8f9fa;
    font-weight: 600;
}

.table-striped tbody tr:nth-child(odd) {
    background-color: #f8f9fa;
}

/* Responsive table wrapper */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Mobile table optimizations */
@media (max-width: 768px) {
    .table-responsive {
        margin: 0 -var(--spacing-sm);
        border-radius: 0;
    }
    
    .table {
        min-width: 600px;
        font-size: 0.875rem;
    }
    
    .table th,
    .table td {
        padding: 8px 12px;
        white-space: nowrap;
    }
    
    /* Stack table for very small screens */
    .table-stack {
        display: block;
        width: 100%;
    }
    
    .table-stack thead {
        display: none;
    }
    
    .table-stack tbody,
    .table-stack tr,
    .table-stack td {
        display: block;
        width: 100%;
    }
    
    .table-stack tr {
        border: 1px solid #e5e7eb;
        border-radius: 8px;
        margin-bottom: var(--spacing-sm);
        padding: var(--spacing-sm);
        background: white;
    }
    
    .table-stack td {
        border: none;
        padding: 4px 0;
        text-align: left;
    }
    
    .table-stack td:before {
        content: attr(data-label) ": ";
        font-weight: 600;
        color: var(--primary-color);
    }
}

/* Modal styles */
.lw-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.lw-modal .modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 20px;
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 500px;
    position: relative;
}

.lw-modal .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.close {
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: #aaa;
}

.close:hover {
    color: #000;
}

/* Consolidated styles from inline CSS */

/* Form and validation styles */
.required {
    color: #dc3545;
}

.form-control.is-invalid {
    border-color: #dc3545;
}

.invalid-feedback {
    display: block;
    width: 100%;
    margin-top: 0.25rem;
    font-size: 0.875em;
    color: #dc3545;
}

/* Profile and dashboard styles */
.profile-header {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    padding: 2rem 0;
    margin-bottom: 2rem;
}

.stats-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.stats-card:hover {
    transform: translateY(-5px);
}

.stats-number {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary-color);
}

/* Progress bar styles */
.progress {
    height: 20px;
    background-color: #e9ecef;
    border-radius: 10px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transition: width 0.6s ease;
}

/* Beneficiary and will management styles */
.beneficiary-card {
    border: 1px solid #dee2e6;
    border-radius: var(--border-radius);
    padding: 1rem;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.beneficiary-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.will-status {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
}

.will-status.draft {
    background-color: #fff3cd;
    color: #856404;
}

.will-status.active {
    background-color: #d4edda;
    color: #155724;
}

.will-status.archived {
    background-color: #f8d7da;
    color: #721c24;
}

/* Email template styles */
.email-preview {
    border: 1px solid #dee2e6;
    border-radius: var(--border-radius);
    padding: 1rem;
    background-color: #f8f9fa;
    font-family: Arial, sans-serif;
}

.email-header {
    font-weight: bold;
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

/* Subscription and pricing styles */
.pricing-card {
    border: 2px solid #e9ecef;
    border-radius: var(--border-radius);
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
}

.pricing-card.featured {
    border-color: var(--primary-color);
    transform: scale(1.05);
}

.pricing-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.price-amount {
    font-size: 3rem;
    font-weight: bold;
    color: var(--primary-color);
}

.price-period {
    color: #6c757d;
    font-size: 1rem;
}

/* Checkout and payment styles */
.checkout-header {
    border-bottom: 1px solid #e9ecef;
    padding-bottom: 2rem;
}

.plan-details {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 0.5rem;
}

.price-display {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
}

.payment-methods .form-check {
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    padding: 1rem;
    transition: all 0.3s ease;
}

.payment-methods .form-check:hover {
    border-color: var(--primary-color);
    background-color: #f8f9fa;
}

.payment-methods .form-check-input:checked + .form-check-label {
    color: var(--primary-color);
    font-weight: 500;
}

/* Success page styles */
.success-icon i {
    font-size: 4rem;
}

.step-item {
    position: relative;
}

.step-item:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 1rem;
    top: 3rem;
    bottom: -1rem;
    width: 2px;
    background: #dee2e6;
}

.step-number {
    min-width: 2rem;
}

.step-number .badge {
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
}

/* Landing page styles */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    padding: 5rem 0;
}

.feature-icon {
    width: 60px;
    height: 60px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    margin: 0 auto 1rem;
}

.testimonial-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

/* Admin dashboard styles */
.admin-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 1.5rem;
}

.admin-stat {
    text-align: center;
    padding: 1rem;
}

.admin-stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

/* Utility classes */
.text-gradient {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.shadow-soft {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.border-gradient {
    border: 2px solid;
    border-image: linear-gradient(135deg, var(--primary-color), var(--secondary-color)) 1;
}

/* Animation classes */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.slide-up {
    animation: slideUp 0.6s ease-out;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Navigation Accessibility Enhancements */
.main-navigation {
    position: relative;
}

.nav-link:focus,
.dropdown-toggle:focus,
.dropdown-item:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
    background-color: rgba(0, 123, 255, 0.1);
}

.nav-dropdown {
    position: relative;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 1000;
    min-width: 200px;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.dropdown-menu.show {
    display: block;
}

.dropdown-item {
    display: block;
    width: 100%;
    padding: 0.5rem 1rem;
    color: #212529;
    text-decoration: none;
    border: none;
    background: none;
    text-align: left;
}

.dropdown-item:hover,
.dropdown-item:focus {
    background-color: #f8f9fa;
    color: #16181b;
}

.dropdown-divider {
    height: 0;
    margin: 0.5rem 0;
    overflow: hidden;
    border-top: 1px solid #dee2e6;
}

/* Skip to main content link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: #000;
    color: #fff;
    padding: 8px;
    text-decoration: none;
    z-index: 9999;
    border-radius: 4px;
}

.skip-link:focus {
    top: 6px;
}

/* Screen reader only content */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus visible for better keyboard navigation */
.nav-link:focus-visible,
.dropdown-toggle:focus-visible,
.dropdown-item:focus-visible,
.btn:focus-visible {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}