.signature-pad-canvas {
    width: 100%; /* Adjust the width as needed */
    max-width: 600px; /* Limit the maximum width if necessary */
    height: 200px; /* Adjust the height as needed */
    border: 1px solid #cfcfcf; /* Optional: Add border for visual distinction */
    border-radius: 30px; /* Optional: Add border-radius for a rounded appearance */
    margin: 0 auto; /* Optional: Center the canvas horizontally */
}

.file-upload .square {
    height: 250px;
    width: 250px;
    margin: auto;
    vertical-align: middle;
    border: 1px solid #e5dfe4;
    background-color: #fff;
    border-radius: 5px;
}

.form-control {
    display: block;
    width: 100%;
    padding: 0.5rem 1rem;
    font-size: 0.9375rem;
    font-weight: 400;
    line-height: 1.6;
    color: #29292e;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid #e5dfe4;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    border-radius: 5px;
    -webkit-transition: border-color 0.15s ease-in-out, -webkit-box-shadow 0.15s ease-in-out;
    transition: border-color 0.15s ease-in-out, -webkit-box-shadow 0.15s ease-in-out;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out, -webkit-box-shadow 0.15s ease-in-out;
}

.rounded {
    border-radius: 5px !important;
}

/* Initially hide all extra items */
.extra-item {
    display: none;
  }
  
  /* Optional: Styles for showing extra items, if needed */
  .show-more .extra-item {
    display: list-item;
  }

  .calendar-container {
    border-radius: 15px;
    overflow: hidden;
    background-color: #ffffff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    padding: 20px;
}

.day {
    position: relative;
    padding: 20px;
    border-radius: 10px;
    transition: background-color 0.3s, transform 0.2s;
    margin: 5px; /* Add margin for spacing */
}

.day:hover {
    background-color: rgba(0, 0, 0, 0.1);
    transform: scale(1.05);
}

.day-number {
    font-size: 1.5rem;
    font-weight: bold;
    color: #333;
}

.event-indicator {
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: transparent; /* Default to transparent */
}

.bg-danger .event-indicator {
    background-color: #e74c3c; /* Red for pending tasks */
}

.bg-success .event-indicator {
    background-color: #2ecc71; /* Green for completed tasks */
}

.bg-warning .event-indicator {
    background-color: #f39c12; /* Orange for in-progress tasks */
}

.weekdays {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    font-weight: bold;
    color: #666;
}

.weekdays .col {
    flex: 1; /* Ensure equal spacing */
    text-align: center; /* Center align weekday names */
}

.row {
    margin: 0; /* Remove default margin */
}

.day {
    position: relative;
}

.day:hover::after {
    content: attr(title);
    position: absolute;
    bottom: 100%; /* Position above the day */
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.75);
    color: #fff;
    padding: 5px 10px;
    border-radius: 5px;
    white-space: nowrap;
    z-index: 10;
    opacity: 1;
    transition: opacity 0.3s;
}

.day:hover::before {
    content: '';
    position: absolute;
    bottom: 100%; /* Position above the day */
    left: 50%;
    transform: translateX(-50%);
    border-width: 5px;
    border-style: solid;
    border-color: transparent transparent rgba(0, 0, 0, 0.75) transparent;
}

/* Dashboard */
:root {
    --primary-color: #7b1fa2;
    --primary-hover: #6a1b9a;
    --text-primary: #1d1d1f;
    --text-secondary: #86868b;
    --bg-light: #f5f5f7;
    --border-color: #d2d2d7;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --border-radius: 30px; /* Very prominent rounding for cards */
    --border-radius-sm: 15px; /* Pronounced smaller radius for items/buttons */
    --spacing-xs: 0.5rem;
    --spacing-sm: 0.75rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-xxl: 3rem;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--bg-light);
    color: var(--text-primary);
    line-height: 1.4;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    letter-spacing: -0.01em;
    font-size: 0.9375rem;
}

/* App shell */
.app-main-container {
    min-width: 350px;
}

/* Permission denied alert (moved from header inline CSS) */
.permission-alert-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: afspPermissionFadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    padding: 1rem;
}

@keyframes afspPermissionFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.permission-alert-container {
    animation: afspPermissionSlideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes afspPermissionSlideUp {
    from { opacity: 0; transform: translateY(30px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.permission-alert {
    background: linear-gradient(135deg, #ffffff 0%, #fafafa 100%);
    border-radius: 24px;
    padding: 2rem;
    max-width: 420px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.8);
    text-align: center;
}

.permission-alert-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff3b30 0%, #d70015 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: #ffffff;
    font-size: 2rem;
    box-shadow: 0 8px 24px rgba(255, 59, 48, 0.3);
    animation: afspPermissionPulse 2s ease-in-out infinite;
}

@keyframes afspPermissionPulse {
    0%, 100% { transform: scale(1); box-shadow: 0 8px 24px rgba(255, 59, 48, 0.3); }
    50% { transform: scale(1.05); box-shadow: 0 12px 32px rgba(255, 59, 48, 0.4); }
}

.permission-alert-content {
    margin-bottom: 1.5rem;
}

.permission-alert-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1d1d1f;
    margin: 0 0 0.75rem 0;
    letter-spacing: -0.02em;
}

.permission-alert-message {
    font-size: 1.0625rem;
    color: #1d1d1f;
    margin: 0 0 0.5rem 0;
    line-height: 1.5;
    font-weight: 500;
}

.permission-alert-subtitle {
    font-size: 0.9375rem;
    color: #86868b;
    margin: 0;
    line-height: 1.5;
}

.permission-alert-button {
    width: 100%;
    padding: 0.875rem 1.5rem;
    background: linear-gradient(135deg, #007aff 0%, #0051d5 100%);
    color: #ffffff;
    border: none;
    border-radius: 14px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.3);
    letter-spacing: -0.01em;
}

.permission-alert-button:hover {
    background: linear-gradient(135deg, #0051d5 0%, #003d99 100%);
    box-shadow: 0 6px 20px rgba(0, 122, 255, 0.4);
    transform: translateY(-2px);
}

.permission-alert-button:active {
    transform: translateY(0);
}

@media (max-width: 768px) {
    .permission-alert { padding: 1.5rem; border-radius: 20px; }
    .permission-alert-icon { width: 64px; height: 64px; font-size: 1.5rem; }
    .permission-alert-title { font-size: 1.25rem; }
    .permission-alert-message { font-size: 1rem; }
}

/* Funeral management view helpers (avoid inline styles) */
.fm-settings-trigger {
    top: 0;
    right: 0;
    color: #6c757d;
    text-decoration: none;
    font-size: 1.5rem;
}

.fm-marital-status-credits {
    font-size: 0.875rem;
    color: #6e6e73;
    font-weight: 500;
}

.fm-card-link {
    text-decoration: none;
    color: inherit;
}

.fm-card-link:hover,
.fm-card-link:focus,
.fm-card-link:focus-visible {
    text-decoration: none;
    color: inherit;
}

.fm-branch-insights-branch-filter {
    min-width: 200px;
}

.fm-table-full {
    width: 100%;
    margin-bottom: 0;
}

/* Performance helpers: skip offscreen rendering for heavy blocks */
.fm-reg-table-wrap,
.branch-insights-panel,
.dashboard-card {
    content-visibility: auto;
    contain-intrinsic-size: 900px;
}

/* Utility */
.is-hidden {
    display: none;
}

.fm-external-removal-section--disabled {
    opacity: 0.5;
}

.fm-cremation-handover-btn {
    background-color: #5856D6;
    border-color: #5856D6;
    color: #fff;
}

.fm-cremation-certificate-btn {
    background-color: #d94841;
    border-color: #d94841;
    color: #fff;
}

.dashboard-container {
    padding: var(--spacing-xl);
    max-width: 1200px;
    margin: 0 auto;
}

.dashboard-header {
    margin-bottom: var(--spacing-xxl);
    padding-bottom: var(--spacing-lg);
    background-color: #fff;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
    padding: var(--spacing-md) var(--spacing-xl);
    margin-top: var(--spacing-lg);
}

/* Profile Section */
.profile-section {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.profile-image {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    object-fit: cover;
    border: 2px solid #f2f2f7;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.2s ease;
    background: #f8f9fa;
}

.profile-image:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    border-color: #d1d1d6;
}

/* Profile image placeholder for users without images */
.profile-image.d-flex {
    background: linear-gradient(135deg, #f2f2f7, #e5e5e7);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #8e8e93;
    font-size: 1.5rem;
    border: 2px solid #f2f2f7;
}

.profile-image.d-flex:hover {
    background: linear-gradient(135deg, #e5e5e7, #d1d1d6);
    color: #6e6e73;
}

.profile-info h4 {
    font-size: 0.9375rem;
    font-weight: 600;
    margin-bottom: var(--spacing-xs);
    color: var(--text-primary);
}

.profile-info p {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    margin: 0;
}

/* Navigation */
.nav-pills .nav-link {
    border-radius: var(--border-radius);
    color: var(--text-secondary);
    transition: var(--transition);
    padding: var(--spacing-sm) var(--spacing-md);
    font-size: 0.8125rem;
    margin: 0 var(--spacing-xs);
}

.nav-pills .nav-link.active,
.nav-pills .nav-link:hover {
    background-color: var(--primary-color);
    color: #fff;
    box-shadow: 0 2px 8px rgba(123, 31, 162, 0.2);
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-xxl);
}

/* Dashboard Cards - Apple Style */
.dashboard-card {
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #f2f2f7;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    transition: all 0.2s ease;
    margin-bottom: 1.5rem;
}

.dashboard-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border-color: #e5e5e7;
}

.dashboard-card h5 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1d1d1f;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #f2f2f7;
    letter-spacing: -0.01em;
}

/* Buttons */
.btn-modern {
    border-radius: var(--border-radius);
    padding: var(--spacing-sm) var(--spacing-md);
    font-size: 0.8125rem;
    transition: var(--transition);
    font-weight: 500;
}

.btn-modern.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
    background-color: transparent;
}

.btn-modern.btn-outline-primary:hover {
    background-color: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(123, 31, 162, 0.2);
}

.btn-modern.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}

.btn-modern.btn-primary:hover {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
    color: #fff;
    box-shadow: 0 2px 8px rgba(123, 31, 162, 0.3);
}

/* Calendar Styles */
.calendar-container {
    background-color: #fff;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-md);
}

.calendar-header h5 {
    font-size: 0.9375rem;
    font-weight: 600;
    margin: 0;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: var(--spacing-xs);
    text-align: center;
}

.calendar-day {
    padding: var(--spacing-xs);
    border-radius: 8px;
    background-color: var(--bg-light);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.8125rem;
    border: 1px solid transparent;
}

.calendar-day:hover {
    background-color: #e3f2fd;
    border: 1px solid #2196f3;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(33, 150, 243, 0.15);
}

.calendar-day.empty {
    background-color: transparent;
    cursor: default;
}

.calendar-day.is-today {
    background-color: var(--primary-color);
    color: #fff;
    font-weight: 600;
}

.calendar-day.has-birthday {
    color: var(--primary-color);
    font-weight: 600;
}

.calendar-day .fas.fa-birthday-cake {
    font-size: 0.6875rem;
    margin-left: 3px;
}

/* Task Styles */
.task-item {
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-sm);
    background-color: #fff;
    border-radius: var(--border-radius-sm);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
    border: none;
    transition: var(--transition);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--spacing-md);
    cursor: pointer;
}

.task-item:last-child {
    margin-bottom: 0;
}

.task-item:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1); /* More noticeable shadow on hover */
    transform: translateY(-2px); /* Slightly more lift */
}

.task-item > div:first-child {
    flex-grow: 1;
}

.task-item h6 {
    font-size: 0.9375rem;
    font-weight: 600;
    margin-bottom: var(--spacing-xs);
    color: var(--text-primary);
}

.task-item small {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    margin: 0;
}

.task-item .task-note {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-top: var(--spacing-xs);
    line-height: 1.4;
}

.task-item .badge-modern {
    flex-shrink: 0;
    margin-right: var(--spacing-sm);
    padding: 0.25em 0.6em;
    border-radius: var(--border-radius-sm); /* Use defined smaller radius */
    font-size: 0.75rem;
    font-weight: 500;
}

.task-item .delete-task-btn {
    flex-shrink: 0;
    background-color: transparent !important; /* Ensure no background */
    border: none !important; /* Ensure no border */
    color: var(--text-secondary); /* Default icon color */
    padding: 0.6rem; /* Increased padding for larger hit area and visual balance */
    font-size: 1.2rem; /* Larger icon for better visibility */
    opacity: 0.6; /* Slightly less opaque by default */
    transition: var(--transition);
    border-radius: var(--border-radius-sm); /* Apply small border radius */
    display: flex;
    align-items: center;
    justify-content: center;
}

.task-item .delete-task-btn:hover {
    color: var(--primary-color);
    opacity: 1;
    transform: scale(1.05);
    box-shadow: none;
    background-color: rgba(123, 31, 162, 0.05); /* Very subtle background on hover */
}

/* Adjust badge colors for more Apple-like feel */
.badge-modern.bg-warning {
    background-color: #ffcc00; /* Softer yellow */
    color: var(--text-primary);
}

.badge-modern.bg-success {
    background-color: #34c759; /* Apple green */
    color: #fff;
}

.badge-modern.bg-info {
    background-color: #007aff; /* Apple blue for In Progress */
    color: #fff;
}

/* Ensure the task list container provides consistent padding */
.dashboard-card #taskList {
    padding-top: var(--spacing-sm); /* Add padding at the top of the list */
    padding-bottom: var(--spacing-sm); /* Add padding at the bottom of the list */
}

/* Ensure the main dashboard card also has pronounced rounded corners and proper shadow/border */
.dashboard-card {
    border-radius: var(--border-radius); /* Apply prominent global border-radius */
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06); /* Use consistent initial shadow */
    border: none; /* Rely on shadow for definition */
}

/* Specific adjustment for dashboard-card .task-item to remove redundant bottom border from old styles */
.dashboard-card .task-item {
    border-bottom: none; 
}

/* Badge Styles */
.badge-modern {
    padding: 0.25em 0.5em;
    border-radius: 6px;
    font-size: 0.6875rem;
    font-weight: 600;
    color: #fff;
}

.badge-modern.bg-success {
    background-color: #28a745;
}

.badge-modern.bg-danger {
    background-color: #dc3545;
}

.badge-modern.bg-warning {
    background-color: #ffc107;
    color: var(--text-primary);
}

/* News Grid */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: var(--spacing-md);
}

.news-card {
    background-color: #fff;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.news-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.news-image {
    width: 100%;
    height: 140px;
    object-fit: cover;
}

.news-content {
    padding: var(--spacing-md);
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.news-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--spacing-xs);
    letter-spacing: -0.01em;
}

.news-text {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-md);
    flex-grow: 1;
    line-height: 1.4;
}

/* Table Styles */
.table-modern {
    width: 100%;
    border-collapse: collapse;
    border-spacing: 0;
    background: none;
    box-shadow: none;
}

.table-modern th {
    background: none;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.75rem;
    border-bottom: 1px solid #e0e0e0;
    padding: 0.75rem 1rem;
    letter-spacing: 0.03em;
}

.table-modern td {
    background: none;
    border: none;
    border-bottom: 1px solid #f0f0f0;
    font-size: 0.8125rem;
    color: var(--text-primary);
    padding: 0.75rem 1rem;
    vertical-align: middle;
}

.table-modern tbody tr:last-child td {
    border-bottom: none;
}

.table-modern td:first-child {
    border-radius: 0;
    border-left: none;
}

.table-modern td:last-child {
    border-radius: 0;
    border-right: none;
}

.table-modern tbody tr {
    background: none;
    box-shadow: none;
    border-radius: 0;
    transition: none;
}

.table-modern td h5, .table-modern td h6, .table-modern td a {
    font-weight: 500;
    color: var(--primary-color);
    font-size: 0.9375rem;
    margin: 0;
}

.table-modern .text-muted, .table-modern small {
    color: #b0b0b0 !important;
    font-size: 0.75rem;
    font-weight: 400;
}

/* Modal Styles */
.modal-content {
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    border: none;
}

.modal-header {
    border-bottom: 1px solid var(--border-color);
    padding: 1.5rem 2rem;
}

.modal-title {
    font-weight: 600;
    font-size: 1.2rem;
    color: var(--text-primary);
}

.modal-body {
    padding: 0; /* Keep padding 0, content provides its own padding */
    overflow-y: auto; /* Enable vertical scrolling if content overflows */
    max-height: calc(100vh - 200px); /* Adjust based on typical header/footer height */
}

.modal-footer {
    border-top: 1px solid var(--border-color);
    padding: 1.5rem 2rem;
}

/* Form Styles */
.form-control {
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 0.6rem 1rem;
    font-size: 0.95rem;
    transition: var(--transition);
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(123, 31, 162, 0.25);
}

.form-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

/* Responsive Styles */
@media (max-width: 992px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .news-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
}

@media (max-width: 768px) {
    .dashboard-container {
        padding: var(--spacing-md);
    }
    
    .dashboard-header {
        margin-bottom: var(--spacing-xl);
        padding-bottom: var(--spacing-md);
    }
    
    .news-grid {
        grid-template-columns: 1fr;
    }
    
    .table-modern {
        display: block;
        overflow-x: auto;
    }
    
    .modal-dialog {
        margin: var(--spacing-md);
    }
}

/* Article Styles */
.article-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
    background: #fff;
}

.article-header {
    text-align: center;
    margin-bottom: 3rem;
}

.article-title {
    font-size: 2.5rem;
    font-weight: 600;
    color: #1D1D1F;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.article-meta {
    font-size: 0.9375rem;
    color: #86868B;
    margin-bottom: 2rem;
    letter-spacing: -0.01em;
}

.article-image {
    width: 100%;
    max-width: 600px;
    height: auto;
    border-radius: 20px;
    margin: 2rem auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.article-content {
    background: #F5F5F7;
    padding: 2.5rem;
    border-radius: 20px;
    margin-top: 2rem;
}

.article-content .lead {
    font-size: 1.25rem;
    line-height: 1.6;
    color: #1D1D1F;
    margin-bottom: 2rem;
    letter-spacing: -0.01em;
}

.article-content h4 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1D1D1F;
    margin: 2rem 0 1rem;
    letter-spacing: -0.02em;
}

.article-content p {
    font-size: 1.0625rem;
    line-height: 1.6;
    color: #1D1D1F;
    margin-bottom: 1.5rem;
    letter-spacing: -0.01em;
}

.article-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #E5E5E5;
}

.article-navigation .btn {
    padding: 0.875rem 1.75rem;
    border-radius: 10px;
    font-size: 0.9375rem;
    font-weight: 500;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    letter-spacing: -0.01em;
}

.article-navigation .btn-primary {
    background: var(--primary-color);
    border: none;
}

.article-navigation .btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(123, 31, 162, 0.2);
}

@media (max-width: 768px) {
    .article-container {
        padding: 1.5rem;
    }
    
    .article-title {
        font-size: 2rem;
    }
    
    .article-content {
        padding: 1.5rem;
    }
    
    .article-content .lead {
        font-size: 1.125rem;
    }
    
    .article-navigation {
        flex-direction: column;
        gap: 1rem;
    }
    
    .article-navigation .btn {
        width: 100%;
    }
}

/* Leave Management Styles */
.leave-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem;
    background: #F5F5F7;
    border-radius: 24px;
    box-shadow: 0 2px 12px rgba(171, 48, 238, 0.08);
}

.leave-header {
    margin-bottom: 1.5rem;
}

.leave-header h5 {
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--primary-color);
    letter-spacing: -0.01em;
}

.leave-form {
    background: #fff;
    padding: 1.5rem;
    margin-bottom: 2rem;
    border-radius: 20px;
    border: 1px solid var(--primary-color);
}

.leave-form .form-select,
.leave-form .form-control {
    background: #fff;
    border: 1px solid var(--primary-color);
    border-radius: 16px;
    padding: 0.75rem 1rem;
    font-size: 0.9375rem;
    transition: all 0.2s ease;
}

.leave-form .form-select:focus,
.leave-form .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-color);
}

.leave-form .table {
    margin-bottom: 0;
    border-collapse: separate;
    border-spacing: 0 0.5rem;
}

.leave-form .table th {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--primary-color);
    letter-spacing: -0.01em;
    padding: 0.75rem;
    border: none;
}

.leave-form .table td {
    padding: 0.75rem;
    vertical-align: middle;
    border: none;
}

.leave-form .btn {
    padding: 0.75rem 1.5rem;
    border-radius: 16px;
    font-size: 0.9375rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.leave-form .btn-primary {
    background: var(--primary-color);
    border: none;
}

.leave-form .btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(123, 31, 162, 0.15);
}

.leave-requests {
    margin-top: 2rem;
}

.leave-requests .card {
    border: none;
    background: #F5F5F7;
    border-radius: 20px;
    box-shadow: 0 2px 12px rgba(171, 48, 238, 0.08);
}

.leave-requests .card-header {
    background: #F5F5F7;
    border-bottom: 1px solid var(--primary-color);
    padding: 1rem;
    border-radius: 20px 20px 0 0;
}

.leave-requests .card-header h5 {
    color: var(--primary-color);
    font-size: 1.25rem;
    font-weight: 500;
    letter-spacing: -0.01em;
}

.leave-requests .table {
    margin-bottom: 0;
    border-collapse: separate;
    border-spacing: 0 0.5rem;
    background: #fff;
    border-radius: 0 0 20px 20px;
    padding: 1rem;
}

.leave-requests .table th {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--primary-color);
    letter-spacing: -0.01em;
    padding: 0.75rem;
    border: none;
}

.leave-requests .table td {
    padding: 0.75rem;
    vertical-align: middle;
    border: none;
}

.leave-requests .badge {
    padding: 0.375rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
}

.leave-requests .badge.bg-gradient-success {
    background: var(--primary-color);
    color: #fff;
}

.leave-requests .text-xs {
    font-size: 0.75rem;
    letter-spacing: -0.01em;
}

.leave-requests .btn-sm {
    padding: 0.5rem 1rem;
    border-radius: 10px;
    font-size: 0.8125rem;
    font-weight: 500;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    border: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
    letter-spacing: -0.01em;
}

.btn-sm {
    padding: 0.5rem 1rem;
    border-radius: 10px;
    font-size: 0.8125rem;
    font-weight: 500;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    border: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
    letter-spacing: -0.01em;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
}

.btn-sm:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-sm:active {
    transform: translateY(0) scale(0.98);
}

.btn-sm:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(123, 31, 162, 0.2), 0 2px 6px rgba(0, 0, 0, 0.08);
}

.leave-requests .btn-success {
    background: #28a745; /* Standard Bootstrap green */
    border: none;
}

.leave-requests .btn-success:hover {
    background: #218838; /* Darker green on hover */
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.15);
}

.leave-requests .btn-danger {
    background: #dc3545; /* Standard Bootstrap red */
    color: #fff; /* White text for readability */
    border: none;
}

.leave-requests .btn-danger:hover {
    background: #c82333; /* Darker red on hover */
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.15);
}

@media (max-width: 768px) {
    .leave-container {
        padding: 1rem;
        border-radius: 20px;
    }
    
    .leave-form {
        padding: 1rem;
        border-radius: 16px;
    }
    
    .leave-form .table th,
    .leave-form .table td {
        padding: 0.5rem;
    }
    
    .leave-requests .card-header {
        padding: 0.75rem;
        border-radius: 16px 16px 0 0;
    }
    
    .leave-requests .table th,
    .leave-requests .table td {
        padding: 0.5rem;
    }

    /* Mobile specific styles for Leave Requests table */
    .leave-requests .table,
    .leave-requests .table tbody,
    .leave-requests .table tr,
    .leave-requests .table td,
    .leave-requests .table th {
        display: block;
    }

    .leave-requests .table thead {
        display: none;
    }

    .leave-requests .table tr {
        margin-bottom: 1rem;
        border: 1px solid var(--primary-color);
        border-radius: 12px;
        background-color: #fff;
        padding: 1rem;
        box-shadow: 0 2px 4px rgba(0,0,0,0.02);
    }

    .leave-requests .table td {
        text-align: right;
        padding-left: 50%;
        position: relative;
    }

    .leave-requests .table td::before {
        content: attr(data-label);
        position: absolute;
        left: 0.75rem;
        width: calc(50% - 1.5rem);
        padding-right: 1rem;
        white-space: nowrap;
        font-weight: 500;
        color: var(--primary-color);
        text-align: left;
    }

    .leave-requests .table td:last-child {
        text-align: left;
    }
}

/* Document A4 Page Styles */
.document-a4-page {
    width: 210mm; /* A4 width */
    min-height: 297mm; /* A4 height */
    margin: 20px auto; /* Center the page and add some space */
    padding: 20mm 15mm; /* Padding to simulate margins */
    background: #fff;
    border: 1px solid #e0e0e0; /* Subtle border for document feel */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1); /* More pronounced, soft shadow */
    page-break-after: always; /* Ensure a page break after each document if printed */
}

.document-header {
    margin-bottom: 20mm;
}

.document-header-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20mm;
}

.document-logo img {
    max-height: 80px; /* Adjust as needed */
    width: auto;
}

.document-company-info {
    text-align: right;
    font-size: 0.9em;
    color: #333;
}

.document-company-info p {
    margin: 0;
    line-height: 1.4;
}

.document-main-title {
    font-size: 1.8em;
    font-weight: bold;
    text-align: center;
    margin-bottom: 5mm;
}

.document-meta {
     text-align: center;
     font-size: 1em;
     margin-bottom: 10mm;
}

.document-divider {
    border: none;
    border-top: 2px solid #333;
    width: 80%;
    margin: 5px auto 10mm auto;
}

.document-content-area {
    /* Styles for the area where CKEditor renders */
    min-height: 100mm; /* Minimum height for content */
    margin-top: 10mm;
}

/* Adjust CKEditor styles to fit within the A4 page if necessary */
.document-a4-page .ck-editor__editable {
    min-height: 100mm; /* Match minimum height of content area */
    border: none; /* Remove default border */
    background: none; /* Remove default background */
    padding: 0; /* Remove default padding */
}

.document-a4-page .ck.ck-toolbar {
     border: none; /* Remove default border */
     background: none; /* Remove default background */
}

.document-a4-page .ck.ck-editor__main > .ck-editor__editable {
     border-radius: 0; /* Remove border radius */
}

/* Policies & Procedures List Styles (apply similar styles to documents list) */
.list-group-item-action {
    transition: all 0.2s ease;
    border: 1px solid #e9ecef; /* Add a subtle border */
    margin-bottom: 8px; /* Space between items */
    border-radius: 8px; /* Rounded corners */
}

.list-group-item-action:hover {
    background-color: #f8f9fa; /* Light hover effect */
    transform: translateY(-2px); /* Slight lift effect */
    box-shadow: 0 2px 5px rgba(0,0,0,0.05); /* Subtle shadow on hover */
}

.list-group-item h5 {
    color: #495057; /* Darker color for title */
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.list-group-item small {
    color: #868e96; /* More muted text color */
}

.list-group-item p {
    color: #495057; /* Darker text for content preview */
    font-size: 0.95rem;
    margin-top: 0.5rem;
    line-height: 1.4;
}

/* Document A4 Page Preview Styles (Refining existing styles) */
.document-a4-page.view-page {
    padding: 2rem 2.5rem; /* Reduced padding for more compact look */
    background-color: #fff;
    border-radius: 0;
    line-height: 1.5;
    color: #000000; /* Ensure all document content text is black */
    font-size: 0.9375rem;
    box-shadow: none;
}

.view-header {
    margin-bottom: 2rem;
}

.view-header .document-header-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.view-header .document-logo img {
    height: 60px;
    margin-right: 0.8rem;
}

.view-header .document-company-info p {
    font-size: 0.8125rem;
    margin-bottom: 0.2rem;
    color: var(--text-secondary);
}

.view-header .document-main-title {
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 0.5rem; /* Slightly reduced margin below title */
    color: var(--text-primary);
}

.view-header .document-policy-text {
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-align: center;
    margin-top: 0.5rem; /* Added margin-top for spacing from main title */
    margin-bottom: 1.5rem; /* Consistent spacing below policy text */
    padding-top: 0; /* Remove padding-top */
    border-top: none; /* Remove the line */
}

.view-header .document-divider {
    display: none; /* Ensure no duplicate or hardcoded HR */
}

.view-header h4 {
    font-size: 1.1rem; /* Slightly smaller for modal */
    font-weight: 600;
    text-align: center;
    margin-bottom: 1.2rem; /* Reduced margin */
    color: var(--text-primary);
    position: relative;
    padding-bottom: 0.3rem; /* Reduced padding */
}

.view-header h4::after {
    display: none; /* Remove the line under the H4 in the modal */
}

.view-content-area {
    /* Styles for the area where document content renders */
    font-size: 1em; /* Adjust base font size for content */
    line-height: 1.6;
    color: #000000; /* Ensure all main content text is black */
}

.view-content-area p {
    margin-bottom: 1em; /* Space between paragraphs */
}

.view-content-area strong {
    font-weight: bold;
}

.view-content-area em {
    font-style: italic;
}

.view-content-area ul,
.view-content-area ol {
    margin-bottom: 1em;
    padding-left: 2em; /* Indentation for lists */
}

.view-content-area ul li,
.view-content-area ol li {
    margin-bottom: 0.5em;
}

.view-content-area table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1em;
}

.view-content-area table, .view-content-area th, .view-content-area td {
    border: 1px solid #ddd;
}

.view-content-area th,
.view-content-area td {
    padding: 8px;
    text-align: left;
}

.view-content-area th {
    background-color: #f2f2f2;
}

/* --- Improved Company Documents Card Styles (App Main Color) --- */
.dashboard-card.company-documents {
    background: linear-gradient(135deg, var(--primary-color) 0%, #fff 100%);
    border: 1px solid var(--primary-color);
    box-shadow: 0 4px 12px rgba(123, 31, 162, 0.06);
    position: relative;
    overflow: hidden;
    transition: var(--transition);
    margin-bottom: var(--spacing-lg);
}
.dashboard-card.company-documents:hover {
    box-shadow: 0 6px 16px rgba(123, 31, 162, 0.1);
    transform: translateY(-2px);
}
.dashboard-card.company-documents .company-documents-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}
.dashboard-card.company-documents .company-documents-icon {
    background: var(--primary-color);
    color: #fff;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    box-shadow: 0 2px 6px rgba(123, 31, 162, 0.1);
}
.dashboard-card.company-documents h5 {
    font-size: 0.9375rem;
    font-weight: 600;
    margin-bottom: 0;
}
.dashboard-card.company-documents .btn-outline-primary {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: var(--bg-light);
    transition: background 0.2s, color 0.2s;
}
.dashboard-card.company-documents .btn-outline-primary:hover {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(123, 31, 162, 0.13);
}

/* Apple Minimalistic Button Styles - Refined with Subtle Colors */
.apple-btn {
    border: none;
    border-radius: 12px;
    padding: 0.75rem 2.2rem;
    font-size: 1.05rem;
    font-weight: 500;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: #f5f5f7;
    color: #1d1d1f;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    transition: background 0.18s, color 0.18s, box-shadow 0.18s, transform 0.18s;
    outline: none;
    margin: 0;
    display: inline-block;
    letter-spacing: -0.01em;
}
.apple-btn:active {
    transform: scale(0.98);
}
.apple-btn:focus {
    box-shadow: 0 0 0 2px #d1c4e9;
}
.apple-btn-primary {
    background: linear-gradient(135deg, rgba(123,31,162,0.10) 0%, #f5e9fe 100%);
    color: var(--primary-color);
}
.apple-btn-primary:hover, .apple-btn-primary:focus {
    background: var(--primary-color);
    color: #fff;
    box-shadow: 0 4px 16px rgba(123, 31, 162, 0.10);
}
.apple-btn-secondary {
    background: linear-gradient(135deg, #f3f0fa 0%, #f5f5f7 100%);
    color: #7b1fa2;
    border: 1.5px solid var(--bg-light);
}
.apple-btn-secondary:hover, .apple-btn-secondary:focus {
    background: var(--bg-light);
    color: var(--primary-color);
    box-shadow: 0 4px 16px rgba(123, 31, 162, 0.07);
}
.apple-btn-success {
    background: linear-gradient(135deg, #34C759 0%, #10B981 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(52, 199, 89, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.15);
}
.apple-btn-success:hover, .apple-btn-success:focus {
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(52, 199, 89, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.25);
}
.apple-btn-danger {
    background: linear-gradient(135deg, #FF3B30 0%, #DC2626 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(255, 59, 48, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.15);
}
.apple-btn-danger:hover, .apple-btn-danger:focus {
    background: linear-gradient(135deg, #DC2626 0%, #B91C1C 100%);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(255, 59, 48, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.25);
}
.apple-btn-warning {
    background: linear-gradient(135deg, #FF9500 0%, #FF8C00 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(255, 149, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.15);
}
.apple-btn-warning:hover, .apple-btn-warning:focus {
    background: linear-gradient(135deg, #FF8C00 0%, #FF7F00 100%);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(255, 149, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.25);
}

/* Responsive Modal for Document Preview */
@media (min-width: 992px) {
    .modal-dialog.modal-lg {
        max-width: 900px; /* Increased max-width for larger document preview */
    }
}

@media (max-width: 768px) {
    .document-a4-page {
        width: 100% !important;
        min-width: 0 !important;
        margin: 0 !important;
        padding: 0.5rem 0.2rem !important;
        box-shadow: none !important;
        border-radius: 0 !important;
        font-size: 0.97rem;
    }
    .document-header-top {
        flex-direction: column;
        align-items: flex-start;
        margin-bottom: 0.5rem;
    }
    .document-logo img {
        height: 36px;
        max-width: 100%;
        margin-bottom: 0.5rem;
    }
    .document-company-info {
        text-align: left;
        font-size: 0.85em;
    }
    .document-main-title {
        font-size: 1.1rem;
        word-break: break-word;
    }
    .document-meta {
        font-size: 0.95rem;
    }
    .document-policy-text {
        font-size: 0.9rem;
    }
    .document-divider {
        margin: 0.5rem 0;
    }
    .document-header h4 {
        font-size: 1rem;
        word-break: break-word;
    }
    .document-content-area,
    .content-management .form-control,
    .content-management .form-label {
        font-size: 0.97rem;
    }
}
@media (max-width: 480px) {
    .document-a4-page {
        padding: 0.2rem 0.05rem !important;
        font-size: 0.92rem;
    }
    .document-main-title,
    .document-header h4 {
        font-size: 0.98rem;
    }
    .document-content-area,
    .content-management .form-control,
    .content-management .form-label {
        font-size: 0.92rem;
    }
}

/* Centered content group for headings with a short divider */
.centered-content-group {
    display: flex;
    flex-direction: column;
    align-items: center; /* Centers items horizontally within this flex container */
    margin: 2.5rem auto; /* Centers the whole group horizontally and adds vertical spacing */
    max-width: 90%; /* Keep max-width for responsiveness */
}

.centered-content-group hr {
    width: 3cm; /* Keep the fixed width for the line */
    margin-top: 0.8rem; /* Space between the text and the line */
    margin-bottom: 0;
    margin-left: auto; /* Explicitly center the hr within the flex item */
    margin-right: auto;
}

/* Adjust global hr to remove auto margins so .centered-content-group can manage it */
hr, .dashboard-card hr, .document-divider {
    border: none;
    height: 3px;
    width: 3cm;
    /* Remove global auto margins; now managed by .centered-content-group or specific contexts */
    margin-top: 1.2rem;
    margin-bottom: 2rem;
    border-radius: 2px;
    background: linear-gradient(90deg, #7b1fa2 0%, #b39ddb 100%);
    opacity: 0.85;
    display: block;
}

/* Ensure display-3--title also works within the new group */
.display-3--title.text-center {
    text-align: center;
    width: 100%; /* Ensure it spans the group's width for centering */
}

/* Add whitespace between dashboard cards */
.dashboard-card {
    margin-bottom: 2.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
    border: 1px solid #f0f0f0;
}

/* Lighter table header */
.dashboard-card h5 {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1.2rem;
    padding-bottom: 0.5rem;
    border-bottom: none;
}

/* Reduce badge size for status */
.badge-modern {
    font-size: 0.6875rem;
    padding: 0.18em 0.6em;
    border-radius: 6px;
}

.section-divider {
    width: 80px;
    height: 3px;
    margin: 1.2rem auto 2rem auto;
    border-radius: 2px;
    background: linear-gradient(90deg, #7b1fa2 0%, #b39ddb 100%);
    opacity: 0.85;
}

.section-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-top: 2rem;
    margin-bottom: var(--spacing-lg);
    padding-bottom: 0;
    border-bottom: none;
}

/* New Document List Styles (from documents.view.php) */
.main-content .container-fluid {
    padding: var(--spacing-xl);
}

.display-3--title {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: var(--spacing-lg);
    text-align: center;
}

.section-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-top: 2rem;
    margin-bottom: var(--spacing-lg);
    padding-bottom: 0;
    border-bottom: none;
}

.document-list-section {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)) !important;
    gap: 1rem !important;
    margin-bottom: 1.5rem;
    width: 100%;
    position: relative;
    padding: 0.5rem 0;
}

.document-card {
    padding: 1rem;
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border: 1px solid rgba(0, 0, 0, 0.06);
    min-height: 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    justify-content: center;
    gap: 0.5rem;
    position: relative;
    overflow: hidden;
    width: 100%;
    box-sizing: border-box;
}

.document-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #007AFF, #5856D6);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.document-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    border-color: rgba(0, 122, 255, 0.3);
}

.document-card:hover::before {
    opacity: 1;
}

.document-card h5 {
    font-size: 0.875rem;
    font-weight: 600;
    color: #1d1d1f;
    margin-bottom: 0.25rem;
    line-height: 1.2;
    text-align: center;
    word-break: break-word;
}

.document-icon {
    font-size: 2rem;
    color: #007AFF;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #f0f8ff 0%, #e6f3ff 100%);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.document-card:hover .document-icon {
    transform: scale(1.1);
    color: #0056b3;
}

.document-card .document-icon i {
    font-size: 1.25rem;
}

/* Different colors for different document types */
.document-card[data-document-type="policy"] .document-icon {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    color: #1976d2;
}

.document-card[data-document-type="procedure"] .document-icon {
    background: linear-gradient(135deg, #f3e5f5 0%, #e1bee7 100%);
    color: #7b1fa2;
}

.document-card[data-document-type="company"] .document-icon {
    background: linear-gradient(135deg, #e8f5e8 0%, #c8e6c9 100%);
    color: #388e3c;
}

.pdf-document-card .document-icon {
    background: linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%);
    color: #d32f2f;
}

/* Hover effects for different document types */
.document-card[data-document-type="policy"]:hover .document-icon {
    background: linear-gradient(135deg, #bbdefb 0%, #90caf9 100%);
    color: #0d47a1;
}

.document-card[data-document-type="procedure"]:hover .document-icon {
    background: linear-gradient(135deg, #e1bee7 0%, #ce93d8 100%);
    color: #4a148c;
}

.document-card[data-document-type="company"]:hover .document-icon {
    background: linear-gradient(135deg, #c8e6c9 0%, #a5d6a7 100%);
    color: #1b5e20;
}

.pdf-document-card:hover .document-icon {
    background: linear-gradient(135deg, #ffcdd2 0%, #ef9a9a 100%);
    color: #b71c1c;
}

.document-card p {
    display: none;
}

.document-card .document-description {
    display: none;
}

.document-card small {
    font-size: 0.6875rem;
    color: #86868b;
    font-weight: 500;
    text-align: center;
    margin-top: 0.125rem;
}

.document-type-badge {
    display: none;
}

/* Modal Styles (Refined) */
.modal-content {
    border-radius: var(--border-radius);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    border: none;
}

.modal-header {
    border-bottom: 1px solid var(--border-color);
    padding: 1.2rem 1.5rem;
}

.modal-title {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text-primary);
}

.modal-body {
    padding: 0; /* Keep padding 0, content provides its own padding */
    overflow-y: auto; /* Enable vertical scrolling if content overflows */
    max-height: calc(100vh - 200px); /* Adjust based on typical header/footer height */
}

.modal-footer {
    border-top: 1px solid var(--border-color);
    padding: 1.2rem 1.5rem;
}

.document-a4-page.view-page {
    padding: 2rem 2.5rem; /* Reduced padding for more compact look */
    background-color: #fff;
    border-radius: 0;
    line-height: 1.5;
    color: #000000; /* Ensure all document content text is black */
    font-size: 0.9375rem;
    box-shadow: none;
}

.view-header {
    margin-bottom: 2rem;
}

.view-header .document-header-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.view-header .document-logo img {
    height: 60px;
    margin-right: 0.8rem;
}

.view-header .document-company-info p {
    font-size: 0.8125rem;
    margin-bottom: 0.2rem;
    color: var(--text-secondary);
}

.view-header .document-main-title {
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 0.5rem; /* Slightly reduced margin below title */
    color: var(--text-primary);
}

.view-header .document-policy-text {
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-align: center;
    margin-top: 0.5rem; /* Added margin-top for spacing from main title */
    margin-bottom: 1.5rem; /* Consistent spacing below policy text */
    padding-top: 0; /* Remove padding-top */
    border-top: none; /* Remove the line */
}

.view-header .document-divider {
    display: none; /* Already handled globally */
}

.view-header h4 {
    font-size: 1.2rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 1.8rem;
    color: var(--text-primary);
    position: relative;
    padding-bottom: 0.4rem;
}

.view-header h4::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    height: 2px;
    width: 40px;
    background-color: var(--primary-color);
}

.view-content-area p,
.view-content-area ul,
.view-content-area ol,
.view-content-area h1,
.view-content-area h2,
.view-content-area h3,
.view-content-area h4,
.view-content-area h5,
.view-content-area h6,
.view-content-area table {
    margin-bottom: 1em;
    color: #000000; /* Ensure all main content text is black */
}

.view-content-area ul,
.view-content-area ol {
    padding-left: 20px;
}

.view-content-area li {
    margin-bottom: 0.3em;
}

.view-content-area strong {
    font-weight: 600;
}

.view-content-area img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 1.5em auto;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
}

.view-content-area table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1em;
    border: 1px solid var(--border-color);
}

.view-content-area th,
.view-content-area td {
    border: 1px solid var(--border-color);
    padding: 0.8rem 1rem;
    text-align: left;
}

.view-content-area th {
    background-color: var(--bg-light);
    font-weight: 600;
    color: var(--text-secondary);
}

.view-content-area tr:nth-child(even) {
    background-color: var(--bg-light);
}

/* Company Notice Board Styles - Urgent Modern Design */
.dashboard-card #noticeList {
    padding-top: var(--spacing-sm);
}

.notice-item {
    background-color: var(--bg-light);
    border-radius: var(--border-radius);
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-md);
    border: 1px solid var(--border-color);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.02);
    position: relative;
    overflow: hidden;
}

.notice-item:hover {
    box-shadow: var(--shadow-sm);
    transform: translateY(-2px);
}

.notice-item.urgent {
    border-left: 4px solid var(--primary-color);
    background-color: #f7f0fc; /* Lighter background for urgent notices */
    box-shadow: 0 2px 8px rgba(123, 31, 162, 0.1);
}

.notice-item.urgent:hover {
    box-shadow: 0 4px 12px rgba(123, 31, 162, 0.15);
}

.notice-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--spacing-xs);
    line-height: 1.3;
}

.notice-content {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-sm);
    line-height: 1.5;
}

.notice-meta {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.notice-actions .btn {
    padding: 0.35rem 0.65rem;
    font-size: 0.75rem;
    border-radius: 8px;
    margin-right: 0.5rem;
}

.notice-actions .btn-outline-secondary {
    color: var(--text-secondary);
    border-color: var(--border-color);
}

.notice-actions .btn-outline-secondary:hover {
    background-color: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

.notice-actions .btn-outline-danger {
    color: #dc3545;
    border-color: #dc3545;
}

.notice-actions .btn-outline-danger:hover {
    background-color: #dc3545;
    color: #fff;
}

/* Adjust padding for dashboard cards for better notice board integration */
.dashboard-card {
    padding: var(--spacing-xl);
    margin-bottom: var(--spacing-lg);
}

/* Ensure the modal title for notice is consistent with other modal titles */
#noticeModal .modal-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
}

.task-item .task-actions-group {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.task-item .task-actions-group .btn {
    cursor: pointer;
    z-index: 2;
}

.task-item .task-actions-group .btn:hover {
    z-index: 3;
}

/* --- Begin Apple Modal and Custom Styles from company.view.php --- */
.apple-modal-content {
  border-radius: 20px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.12);
  background: linear-gradient(135deg, #fff 80%, #f5e9fe 100%);
  border: none;
}
.apple-modal-header {
  border-bottom: none;
  padding: 2rem 2rem 1rem 2rem;
  background: transparent;
  border-radius: 20px 20px 0 0;
}
.apple-modal-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: #1d1d1f;
  letter-spacing: -0.01em;
}
.apple-modal-body {
  padding: 2rem;
  background: transparent;
}
.apple-modal-footer {
  border-top: none;
  padding: 1.5rem 2rem 2rem 2rem;
  background: transparent;
  border-radius: 0 0 20px 20px;
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
}
.apple-input {
  border-radius: 12px;
  border: 1.5px solid #e5dfe4;
  padding: 0.75rem 1.2rem;
  font-size: 1.05rem;
  background: #fafbfc;
  transition: border-color 0.2s;
}
.apple-input:focus {
  border-color: #7b1fa2;
  color: #1d1d1f;
  box-shadow: 0 0 0 2px #e9d7fa;
  background: #fff;
}
.event-blue {
    background-color: #e6f7ff !important;
    border: 1px solid #91d5ff !important;
}
.apple-notice-card {
    background: linear-gradient(135deg, #faf7ff 80%, #f5e9fe 100%);
    border-radius: 24px;
    box-shadow: 0 4px 24px rgba(123, 31, 162, 0.06);
    padding: 2.5rem 2rem 1.5rem 2rem;
    margin-bottom: 2.5rem;
    border-left: 6px solid #a259ff;
    transition: box-shadow 0.2s, transform 0.2s;
    position: relative;
}
.apple-notice-card.urgent {
    background: linear-gradient(135deg, #f8e6ff 80%, #f5e9fe 100%);
    border-left: 6px solid #d500f9;
}
.apple-notice-card:hover {
    box-shadow: 0 8px 32px rgba(123, 31, 162, 0.13);
    transform: translateY(-2px) scale(1.01);
}
.apple-notice-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #7b1fa2;
    margin-bottom: 0.5rem;
    letter-spacing: -0.01em;
}
.apple-notice-content {
    font-size: 1.05rem;
    color: #333;
    line-height: 1.7;
    margin-bottom: 1.2rem;
    white-space: pre-line;
}
.apple-notice-meta {
    font-size: 0.92rem;
    color: #8c4297;
    margin-bottom: 0.5rem;
}
.apple-btn.apple-btn-danger {
    background: linear-gradient(135deg, #FF3B30 0%, #DC2626 100%);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    box-shadow: 0 4px 12px rgba(255, 59, 48, 0.3);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.apple-btn.apple-btn-danger:hover {
    background: linear-gradient(135deg, #DC2626 0%, #B91C1C 100%);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(255, 59, 48, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.25);
}
.apple-btn.apple-btn-secondary {
    background: linear-gradient(135deg, #f3f0fa 0%, #f5f5f7 100%);
    color: #7b1fa2;
    border: 1.5px solid #e5dfe4;
    border-radius: 12px;
    padding: 0.5rem 1.1rem;
    font-size: 1.05rem;
    transition: background 0.18s, color 0.18s, box-shadow 0.18s, transform 0.18s;
}
.apple-btn.apple-btn-secondary:hover {
    background: #f5e9fe;
    color: #7b1fa2;
    box-shadow: 0 4px 16px rgba(123, 31, 162, 0.07);
}
.notice-actions .btn {
    margin-right: 0.5rem;
    font-size: 1.1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.notice-actions .btn:last-child {
    margin-right: 0;
}
.minimal-apple-notice {
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    border: 1px solid #ececec;
    padding: 1.2rem 1.5rem 1rem 1.5rem;
    margin-bottom: 1.2rem;
    transition: box-shadow 0.18s, border-color 0.18s;
    position: relative;
    min-width: 0;
}
.minimal-apple-notice.urgent {
    border-color: #a259ff;
}
.minimal-apple-notice-title {
    font-size: 1.08rem;
    font-weight: 600;
    color: #1d1d1f;
    letter-spacing: -0.01em;
    margin-bottom: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.minimal-apple-notice-content {
    font-size: 0.98rem;
    color: #333;
    line-height: 1.5;
    margin-bottom: 0.2rem;
    min-width: 0;
}
.minimal-apple-notice-meta {
    font-size: 0.85rem;
    color: #86868b;
    font-weight: 400;
}
.btn.btn-icon {
    background: none;
    border: none;
    color: #7b1fa2;
    padding: 0.3rem 0.5rem;
    border-radius: 8px;
    font-size: 1.1rem;
    transition: background 0.15s, color 0.15s;
    box-shadow: none;
    outline: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.btn.btn-icon:hover {
    background: #f5e9fe;
    color: #6a1b9a;
}
.apple-request-card {
    background: linear-gradient(135deg, #f5f5f7 80%, #e9e9ff 100%);
    border-radius: 16px;
    box-shadow: 0 3px 16px rgba(123, 31, 162, 0.08);
    padding: 1.1rem 0.9rem 0.95rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    transition: box-shadow 0.18s, transform 0.18s;
    border: none;
    cursor: pointer;
    min-height: 128px;
    height: 100%;
    box-sizing: border-box;
}
.apple-request-card:hover {
    box-shadow: 0 6px 22px rgba(123, 31, 162, 0.13);
    transform: translateY(-2px) scale(1.01);
}
.apple-card-icon {
    font-size: 1.55rem;
    color: #7b1fa2;
    margin-bottom: 0.55rem;
    line-height: 1;
}
.eft-card {
    background: linear-gradient(135deg, #e3f2fd 80%, #f5f5f7 100%);
}
.po-card {
    background: linear-gradient(135deg, #fce4ec 80%, #f5f5f7 100%);
}
.funeral-card {
    background: linear-gradient(135deg, #f5f5f7 80%, #e9e9ff 100%);
}
.dha-card {
    background: linear-gradient(135deg, #e8f5e9 80%, #c8e6c9 100%);
}
.mortuary-in-card {
    background: linear-gradient(135deg, #e3f2fd 0%, #f5f5f7 100%);
    border: 2px solid transparent;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.mortuary-in-card:hover {
    border-color: #1976d2;
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 8px 32px rgba(25, 118, 210, 0.15);
}
.mortuary-out-card {
    background: linear-gradient(135deg, #fff3e0 0%, #f5f5f7 100%);
    border: 2px solid transparent;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.mortuary-out-card:hover {
    border-color: #f57c00;
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 8px 32px rgba(245, 124, 0, 0.15);
}
.mortuary-form .mortuary-section {
    background: linear-gradient(135deg, #f7f8fa 80%, #ececf6 100%);
    border-radius: 18px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(123, 31, 162, 0.08);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.mortuary-form .mortuary-section:hover {
    box-shadow: 0 4px 16px rgba(123, 31, 162, 0.08);
    transform: translateY(-1px);
}
.mortuary-form .section-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1d1d1f;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid rgba(123, 31, 162, 0.1);
}
.mortuary-form .section-subtitle {
    font-size: 0.95rem;
    font-weight: 500;
    color: #6e6e73;
    margin-bottom: 0.75rem;
}
.mortuary-form .form-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #1d1d1f;
    margin-bottom: 0.5rem;
}
.mortuary-form .form-label.fw-bold {
    font-weight: 600;
    color: #1d1d1f;
}
.mortuary-form .form-check-label {
    font-size: 0.875rem;
    color: #1d1d1f;
}
.mortuary-form .form-check-input:checked {
    background-color: #7b1fa2;
    border-color: #7b1fa2;
}
.table-row-clickable:hover {
    background-color: #f8f9fa !important;
    transform: scale(1.01);
    transition: all 0.2s ease;
}
.table-row-clickable {
    transition: all 0.2s ease;
}
.mortuary-form hr {
    border: none;
    border-top: 1px solid rgba(123, 31, 162, 0.1);
    margin: 1.5rem 0;
}
.apple-card-title {
    font-size: 0.98rem;
    font-weight: 600;
    color: #1d1d1f;
    margin-bottom: 0.3rem;
    line-height: 1.25;
}
.apple-card-desc {
    font-size: 0.78rem;
    color: #86868b;
    text-align: center;
    line-height: 1.3;
    margin: 0;
}

.company-request-cards {
    margin-bottom: 1.25rem;
}
.company-request-cards .apple-request-card {
    min-height: 122px;
}

.eft-form .eft-section {
  background: linear-gradient(135deg, #f7f8fa 80%, #ececf6 100%);
  border-radius: 18px;
  padding: 1.1rem 1.2rem 0.8rem 1.2rem;
  margin-bottom: 1.1rem;
  box-shadow: 0 2px 12px rgba(123,31,162,0.06);
}
.eft-form label.form-label {
  font-weight: 500;
  color: #5e5e63;
  font-size: 1.01rem;
  margin-bottom: 0.1rem;
  letter-spacing: -0.01em;
}
.eft-form input[type="text"],
.eft-form input[type="date"],
.eft-form input[type="number"],
.eft-form select,
.eft-form textarea {
  border-radius: 10px;
  border: 1.5px solid #e0e0e7;
  background: #fafdff;
  font-size: 1.01rem;
  padding: 0.45rem 1rem;
  height: 2.3rem;
  min-height: 2.3rem;
  color: #222;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.eft-form textarea {
  min-height: 2.7rem;
  font-size: 1.01rem;
  padding: 0.7rem 1rem;
}
.eft-form input:focus,
.eft-form select:focus,
.eft-form textarea:focus {
  border-color: #7d5fff;
  box-shadow: 0 0 0 2px #e9e7fa;
  background: #fff;
  color: #1a1a1a;
}
.eft-form .form-check-input:checked {
  background-color: #7d5fff;
  border-color: #7d5fff;
}
.eft-form .form-check-label {
  color: #5e5e63;
  font-weight: 400;
  font-size: 0.97rem;
}
.eft-form .row.g-2 > .col-6, .eft-form .row.g-2 > .col-4, .eft-form .row.g-2 > .col-3 {
  padding-right: 0.3rem;
  padding-left: 0.3rem;
}
.eft-form .modal-body {
  padding: 2.2rem 2.2rem 1.2rem 2.2rem;
}
.eft-form .modal-footer {
  padding: 1.1rem 2.2rem 2.2rem 2.2rem;
}
.eft-form .fw-bold {
  color: #7d5fff;
  font-size: 1.09rem;
  letter-spacing: -0.01em;
}
.eft-form .form-label {
  margin-bottom: 0.1rem;
}
.eft-form .form-check {
  margin-right: 0.7rem;
}
.eft-form .form-check-input {
  width: 1.1em;
  height: 1.1em;
}
.eft-form .apple-modal-title {
  color: #7d5fff;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.eft-form input[readonly], .eft-form input[disabled] {
  background: #f3f3f7;
  color: #b0b0b8;
}

.po-form .po-section {
  background: linear-gradient(135deg, #f7f8fa 80%, #ececf6 100%);
  border-radius: 18px;
  padding: 1.1rem 1.2rem 0.8rem 1.2rem;
  margin-bottom: 1.1rem;
  box-shadow: 0 2px 12px rgba(123,31,162,0.06);
}
.po-form label.form-label {
  font-weight: 500;
  color: #5e5e63;
  font-size: 1.01rem;
  margin-bottom: 0.1rem;
  letter-spacing: -0.01em;
}
.po-form input[type="text"],
.po-form input[type="date"],
.po-form input[type="number"],
.po-form select,
.po-form textarea {
  border-radius: 10px;
  border: 1.5px solid #e0e0e7;
  background: #fafdff;
  font-size: 1.01rem;
  padding: 0.45rem 1rem;
  height: 2.3rem;
  min-height: 2.3rem;
  color: #222;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.po-form textarea {
  min-height: 2.7rem;
  font-size: 1.01rem;
  padding: 0.7rem 1rem;
}
.po-form input:focus,
.po-form select:focus,
.po-form textarea:focus {
  border-color: #7d5fff;
  box-shadow: 0 0 0 2px #e9e7fa;
  background: #fff;
  color: #1a1a1a;
}
.po-form .form-check-input:checked {
  background-color: #7d5fff;
  border-color: #7d5fff;
}
.po-form .form-check-label {
  color: #5e5e63;
  font-weight: 400;
  font-size: 0.97rem;
}
.po-form .row.g-2 > .col-6, .po-form .row.g-2 > .col-4, .po-form .row.g-2 > .col-3 {
  padding-right: 0.3rem;
  padding-left: 0.3rem;
}
.po-form .modal-body {
  padding: 2.2rem 2.2rem 1.2rem 2.2rem;
}
.po-form .modal-footer {
  padding: 1.1rem 2.2rem 2.2rem 2.2rem;
}
.po-form .fw-bold {
  color: #7d5fff;
  font-size: 1.09rem;
  letter-spacing: -0.01em;
}
.po-form .form-label {
  margin-bottom: 0.1rem;
}
.po-form .form-check {
  margin-right: 0.7rem;
}
.po-form .form-check-input {
  width: 1.1em;
  height: 1.1em;
}
.po-form .apple-modal-title {
  color: #7d5fff;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.po-form input[readonly], .po-form input[disabled] {
  background: #f3f3f7;
  color: #b0b0b8;
}
.po-table th, .po-table td {
  font-size: 0.97rem;
  vertical-align: middle;
  background: #fafdff;
  color: #222;
  border-top: 1px solid #ececf6;
}
.po-table th {
  color: #7d5fff;
  font-weight: 600;
  background: #f7f8fa;
}
.po-table input {
  min-width: 60px;
  max-width: 120px;
  text-align: center;
}

.badge-modern.bg-overdue {
    background-color: #ff3b30;
    color: #fff;
}

.task-item.task-overdue {
    background: #ffeaea !important;
    color: #ff3b30 !important;
    border: none;
    box-shadow: 0 2px 10px rgba(255,59,48,0.06);
}
.task-item.task-overdue h6,
.task-item.task-overdue small,
.task-item.task-overdue .task-note {
    color: #ff3b30 !important;
}
.task-item.task-overdue .badge-modern {
    background: #ff3b30 !important;
    color: #fff !important;
    border: none;
}
.task-item.task-overdue .btn-outline-success,
.task-item.task-overdue .btn-outline-danger {
    border-color: #ff3b30 !important;
    color: #ff3b30 !important;
    background: #fff !important;
}
.task-item.task-overdue .btn-outline-success:hover,
.task-item.task-overdue .btn-outline-danger:hover {
    background: #ff3b30 !important;
    color: #fff !important;
}

/* Improve readability for Beneficiary & Bank / Refs cells */
.kv {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 0.25rem 0.75rem;
  margin: 0.2rem 0;
  align-items: start;
}
.kv label {
  color: #6b7280;
  font-size: 0.85rem;
  font-weight: 500;
}
.kv div {
  color: #111827;
  font-weight: 600;
  font-size: 0.95rem;
  word-break: break-word;
}
.cell-block {
  min-width: 260px;
}
.fw-semibold {
  font-weight: 600 !important;
}
@media (max-width: 768px) {
  .kv {
    grid-template-columns: 110px 1fr;
  }
}
.muted {
  color: #6b7280;
}
.nowrap {
  white-space: nowrap;
}

/* Apple-Inspired Notice Board Design - Minimalistic */
/* ============================================
   APPLE NOTICE BOARD - COMPLETE REDESIGN
   Modern, Clean, Minimalistic Apple Style
   ============================================ */
.apple-notice-board-new {
    margin: 2rem 0;
}

.apple-notice-board-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    gap: 1rem;
}

.apple-notice-board-title-section {
    flex: 1;
}

.apple-notice-board-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1d1d1f;
    margin: 0 0 0.375rem 0;
    letter-spacing: -0.03em;
    line-height: 1.2;
}

.apple-notice-board-subtitle {
    font-size: 0.9375rem;
    color: #86868b;
    margin: 0;
    font-weight: 400;
    letter-spacing: -0.01em;
    line-height: 1.4;
}

.apple-notice-add-btn-new {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: #007AFF;
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    letter-spacing: -0.01em;
    white-space: nowrap;
}

.apple-notice-add-btn-new:hover {
    background: #0051D5;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.25);
}

.apple-notice-add-btn-new:active {
    transform: translateY(0);
}

.apple-notice-list-new {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1rem;
}

.apple-notice-card-new {
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid #e5e5e7;
    padding: 1.5rem;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.apple-notice-card-new::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: transparent;
    transition: background 0.2s ease;
}

.apple-notice-card-new:hover {
    border-color: #d2d2d7;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.apple-notice-card-new.urgent::before {
    background: linear-gradient(90deg, #FF3B30 0%, #FF6B60 100%);
}

.apple-notice-card-header-new {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    gap: 0.75rem;
}

.apple-notice-card-title-section-new {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    flex: 1;
    min-width: 0;
}

.apple-notice-urgent-dot-new {
    width: 8px;
    height: 8px;
    background: #FF3B30;
    border-radius: 50%;
    flex-shrink: 0;
    animation: noticePulse 2s ease-in-out infinite;
}

@keyframes noticePulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.1);
    }
}

.apple-notice-card-title-new {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1d1d1f;
    margin: 0;
    line-height: 1.3;
    letter-spacing: -0.02em;
    flex: 1;
    min-width: 0;
}

.apple-notice-urgent-label-new {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.625rem;
    background: #FF3B30;
    color: white;
    border-radius: 8px;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    white-space: nowrap;
    flex-shrink: 0;
}

.apple-notice-card-content-new {
    font-size: 0.9375rem;
    color: #1d1d1f;
    line-height: 1.6;
    margin-bottom: 1.25rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: pre-wrap;
    flex: 1;
}

.apple-notice-card-footer-new {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid #f5f5f7;
    gap: 1rem;
    flex-wrap: wrap;
}

.apple-notice-card-meta-new {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.8125rem;
    color: #86868b;
    flex: 1;
    min-width: 0;
}

.apple-notice-meta-item-new {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    white-space: nowrap;
}

.apple-notice-meta-item-new i {
    font-size: 0.75rem;
    opacity: 0.7;
}

.apple-notice-meta-separator-new {
    color: #d2d2d7;
    font-size: 0.75rem;
}

.apple-notice-card-actions-new {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

.apple-notice-action-btn-new {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 10px;
    background: transparent;
    color: #86868b;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
    font-size: 0.875rem;
}

.apple-notice-action-btn-new:hover {
    background: #f5f5f7;
    color: #1d1d1f;
}

.apple-notice-action-delete-new:hover {
    background: #ffebee;
    color: #FF3B30;
}

.apple-notice-empty-new {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 2rem;
    background: #ffffff;
    border-radius: 16px;
    border: 1px dashed #e5e5e7;
}

.apple-notice-empty-icon-new {
    width: 64px;
    height: 64px;
    background: #f5f5f7;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25rem auto;
    font-size: 1.75rem;
    color: #86868b;
}

.apple-notice-empty-text-new {
    font-size: 0.9375rem;
    color: #86868b;
    margin: 0;
    line-height: 1.4;
    font-weight: 400;
}

/* Responsive Notice Board */
@media (max-width: 768px) {
    .apple-notice-board-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .apple-notice-add-btn-new {
        width: 100%;
        justify-content: center;
    }
    
    .apple-notice-list-new {
        grid-template-columns: 1fr;
        gap: 0.875rem;
    }
    
    .apple-notice-card-new {
        padding: 1.25rem;
    }
    
    .apple-notice-card-footer-new {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .apple-notice-card-actions-new {
        align-self: flex-end;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .apple-notice-board {
        margin: 1.5rem 0;
    }
    
    .apple-notice-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
        margin-bottom: 1.25rem;
        padding-bottom: 0.875rem;
    }
    
    .apple-notice-header-content {
        gap: 0.875rem;
    }
    
    .apple-notice-header-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .apple-notice-title {
        font-size: 1.375rem;
    }
    
    .apple-notice-subtitle {
        font-size: 0.75rem;
    }
    
    .apple-notice-add-btn {
        width: 100%;
        justify-content: center;
    }
    
    .apple-notice-item {
        padding: 1rem 0.875rem;
        border-radius: 10px;
    }
    
    .apple-notice-content {
        font-size: 0.8125rem;
        margin-bottom: 0.875rem;
    }
    
    .apple-notice-footer {
        flex-direction: column;
        gap: 0.75rem;
        align-items: flex-start;
    }
    
    .apple-notice-meta {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
    }
    
    .apple-notice-actions {
        align-self: flex-end;
    }
    
    .apple-notice-action-btn {
        width: 36px;
        height: 36px;
    }
}

@media (max-width: 576px) {
    .apple-notice-board {
        margin: 1rem 0;
    }
    
    .apple-notice-header-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .apple-notice-title {
        font-size: 1.375rem;
    }
    
    .apple-notice-subtitle {
        font-size: 0.75rem;
    }
    
    .apple-notice-item {
        padding: 14px;
    }
    
    .apple-notice-item-title-row {
        gap: 8px;
    }
    
    .apple-notice-urgent-indicator {
        width: 18px;
        height: 18px;
        font-size: 0.625rem;
    }
    
    .apple-notice-title-text {
        font-size: 0.9375rem;
    }
    
    .apple-notice-urgent-badge {
        font-size: 0.625rem;
        padding: 2px 6px;
    }
    
    .apple-notice-content {
        font-size: 0.75rem;
    }
    
    .apple-notice-meta {
        font-size: 0.6875rem;
    }
}

/* Apple-Inspired UI Components */
.apple-notification {
  border-radius: 16px;
  padding: 1.1rem 2rem;
  margin: 1.5rem auto 2rem auto;
  max-width: 600px;
  font-size: 1.08rem;
  font-weight: 500;
  box-shadow: 0 4px 24px rgba(123, 31, 162, 0.08);
  text-align: center;
  letter-spacing: -0.01em;
  transition: all 0.2s;
}

.apple-notification.apple-success {
  background: linear-gradient(90deg, #e0ffe7 0%, #f5fff7 100%);
  color: #1b5e20;
  border: 1.5px solid #34c759;
}

.apple-notification.apple-danger {
  background: linear-gradient(90deg, #fff0f0 0%, #fff5f5 100%);
  color: #c62828;
  border: 1.5px solid #ff3b30;
}

/* Apple Request Cards */
.apple-request-card.funeral-card,
.apple-request-card[href] {
  position: relative;
  z-index: 1;
}

.apple-request-card.funeral-card:hover,
.apple-request-card[href]:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Apple Modal Styles */
.apple-modal-content {
  border-radius: 20px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.12);
  background: linear-gradient(135deg, #fff 80%, #f5e9fe 100%);
  border: none;
}

/* PDF Document Styles */
.pdf-document-card {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    transition: all 0.2s ease;
    cursor: pointer;
    margin-bottom: 15px;
}

.pdf-document-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border-color: #3b82f6;
}

.pdf-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    flex-shrink: 0;
}

.pdf-info {
    flex: 1;
    min-width: 0;
}

.pdf-info h5 {
    margin: 0 0 8px 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #1f2937;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pdf-description {
    margin: 0 0 8px 0;
    color: #6b7280;
    font-size: 0.9rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.pdf-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 8px;
}

.file-size {
    color: #9ca3af;
    font-size: 0.8rem;
    font-weight: 500;
}

.pdf-badge {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pdf-viewer-container {
    background: #f8fafc;
    border-radius: 8px;
    overflow: hidden;
}

/* PDF Upload Modal Styles */
.apple-modal .form-label {
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
}

.apple-modal .form-control {
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.apple-modal .form-control:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.apple-modal .form-text {
    color: #6b7280;
    font-size: 0.8rem;
    margin-top: 4px;
}

/* Proof of Payment Styles */
.proof-upload-btn {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 0.75rem;
    font-weight: 500;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.proof-upload-btn:hover {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.proof-view-btn {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 0.75rem;
    font-weight: 500;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.proof-view-btn:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.proof-uploaded-info {
    font-size: 0.7rem;
    color: #6b7280;
    margin-top: 4px;
    display: block;
}

/* User Documents Styles */
.apple-documents-header {
  background: #ffffff;
  border-radius: 20px;
  padding: 2.5rem;
  margin-bottom: 2rem;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  border: 1px solid #e5e5e7;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.apple-header-content {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.apple-header-icon {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, #007AFF, #5856D6);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.75rem;
  box-shadow: 0 4px 16px rgba(0, 122, 255, 0.25);
}

.apple-header-text {
  flex: 1;
}

.apple-header-title {
  font-size: 2rem;
  font-weight: 700;
  color: #1d1d1f;
  margin: 0 0 0.5rem 0;
  letter-spacing: -0.02em;
}

.apple-header-subtitle {
  color: #6e6e73;
  font-size: 1rem;
  margin: 0;
  line-height: 1.5;
}

.apple-header-actions {
  display: flex;
  gap: 1rem;
}

.apple-upload-btn {
  background: linear-gradient(135deg, #007AFF, #5856D6);
  border: none;
  border-radius: 16px;
  padding: 1rem 2rem;
  font-size: 1rem;
  font-weight: 600;
  color: #ffffff;
  transition: all 0.25s ease;
  box-shadow: 0 4px 16px rgba(0, 122, 255, 0.25);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.apple-upload-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 122, 255, 0.35);
  background: linear-gradient(135deg, #0056CC, #4A4AC4);
}

/* Admin Search Button */
.apple-search-btn {
  background: linear-gradient(135deg, #34C759, #30D158);
  border: none;
  border-radius: 16px;
  padding: 1rem 2rem;
  font-size: 1rem;
  font-weight: 600;
  color: #ffffff;
  transition: all 0.25s ease;
  box-shadow: 0 4px 16px rgba(52, 199, 89, 0.25);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-right: 0.75rem;
}

.apple-search-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(52, 199, 89, 0.35);
  background: linear-gradient(135deg, #28A745, #20C997);
}

/* User Search Modal Styles */
.apple-user-list {
  max-height: 400px;
  overflow-y: auto;
  margin-top: 1rem;
}

.apple-user-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  border: 1px solid #e5e5e7;
  border-radius: 8px;
  margin-bottom: 0.75rem;
  background: #ffffff;
  transition: all 0.2s ease;
}

.apple-user-item:hover {
  border-color: #007AFF;
  box-shadow: 0 2px 8px rgba(0, 122, 255, 0.1);
}

.apple-user-info {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.apple-user-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #007AFF, #5856D6);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1rem;
}

.apple-user-details {
  flex: 1;
}

.apple-user-name {
  font-size: 1rem;
  font-weight: 600;
  color: #1d1d1f;
  margin-bottom: 0.25rem;
}

.apple-user-email {
  font-size: 0.85rem;
  color: #8e8e93;
}

.apple-view-docs-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: linear-gradient(135deg, #007AFF, #5856D6);
  color: white;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 500;
  font-size: 0.85rem;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 122, 255, 0.2);
  border: none;
  cursor: pointer;
}

.apple-view-docs-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 122, 255, 0.3);
  color: white;
  text-decoration: none;
}

/* Stats Grid */
.apple-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.apple-stat-card {
  background: #ffffff;
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  border: 1px solid #e5e5e7;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: all 0.2s ease;
}

.apple-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}

.apple-stat-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, #34C759, #30D158);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.25rem;
}

.apple-stat-content {
  flex: 1;
}

.apple-stat-number {
  font-size: 1.75rem;
  font-weight: 700;
  color: #1d1d1f;
  margin: 0;
}

.apple-stat-label {
  color: #6e6e73;
  font-size: 0.875rem;
  margin: 0.25rem 0 0 0;
}

/* Filters Section */
.apple-filters-section {
  background: #ffffff;
  border-radius: 16px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  border: 1px solid #e5e5e7;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
}

.apple-search-box {
  position: relative;
  flex: 1;
  max-width: 400px;
}

.apple-search-box i {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: #8e8e93;
  font-size: 0.875rem;
}

.apple-search-input {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 2.5rem;
  border: 1px solid #e5e5e7;
  border-radius: 12px;
  font-size: 0.875rem;
  background: #f8f9fa;
  transition: all 0.2s ease;
}

.apple-search-input:focus {
  outline: none;
  border-color: #007AFF;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

.apple-filter-controls {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.apple-filter-select {
  padding: 0.75rem 1rem;
  border: 1px solid #e5e5e7;
  border-radius: 12px;
  font-size: 0.875rem;
  background: #f8f9fa;
  color: #1d1d1f;
  transition: all 0.2s ease;
  min-width: 150px;
}

.apple-filter-select:focus {
  outline: none;
  border-color: #007AFF;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

.apple-clear-btn {
  background: #f2f2f7;
  border: 1px solid #e5e5e7;
  border-radius: 12px;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  color: #6e6e73;
  transition: all 0.2s ease;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.apple-clear-btn:hover {
  background: #e5e5e7;
  color: #1d1d1f;
}

/* Categories Section */
.apple-categories-section {
  margin-bottom: 2rem;
}

.apple-section-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: #1d1d1f;
  margin: 0 0 1.5rem 0;
}

.apple-categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}

.apple-category-card {
  background: #ffffff;
  border-radius: 12px;
  padding: 1.25rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  border: 1px solid #e5e5e7;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.apple-category-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.apple-category-icon {
  width: 40px;
  height: 40px;
  background: #f2f2f7;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.125rem;
}

.apple-category-content {
  flex: 1;
}

.apple-category-name {
  font-weight: 600;
  color: #1d1d1f;
  margin: 0 0 0.25rem 0;
  font-size: 0.875rem;
}

.apple-category-count {
  color: #6e6e73;
  font-size: 0.75rem;
  margin: 0 0 0.125rem 0;
}

.apple-category-size {
  color: #8e8e93;
  font-size: 0.75rem;
  margin: 0;
}

/* Documents Section */
.apple-documents-section {
  background: #ffffff;
  border-radius: 20px;
  padding: 2rem;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  border: 1px solid #e5e5e7;
}

.apple-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.apple-view-controls {
  display: flex;
  gap: 0.2rem;
}

.apple-view-btn {
  background: #f2f2f7;
  border: 1px solid #e5e5e7;
  border-radius: 4px;
  padding: 0.3rem;
  color: #8e8e93;
  transition: all 0.2s ease;
  cursor: pointer;
  font-size: 0.7rem;
}

.apple-view-btn.active,
.apple-view-btn:hover {
  background: #8e8e93;
  color: white;
  border-color: #8e8e93;
}

.apple-documents-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.apple-document-card {
  background: #ffffff;
  border-radius: 6px;
  padding: 1rem;
  border: 1px solid #e5e5e7;
  transition: all 0.2s ease;
  position: relative;
}

.apple-document-card:hover {
  transform: none;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  background: #ffffff;
}

.apple-document-icon {
  width: 24px;
  height: 24px;
  background: #8e8e93;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 0.7rem;
  margin-bottom: 0.5rem;
}

.apple-document-content {
  margin-bottom: 1rem;
}

.apple-document-name {
  font-size: 0.85rem;
  font-weight: 500;
  color: #1d1d1f;
  margin: 0 0 0.4rem 0;
  line-height: 1.2;
}

.apple-document-meta {
  color: #8e8e93;
  font-size: 0.65rem;
  margin: 0 0 0.3rem 0;
}

.apple-document-description {
  color: #8e8e93;
  font-size: 0.7rem;
  margin: 0 0 0.3rem 0;
  line-height: 1.2;
}

.apple-document-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  margin-bottom: 0.75rem;
}

.apple-tag {
  background: #f2f2f7;
  color: #8e8e93;
  padding: 0.15rem 0.3rem;
  border-radius: 3px;
  font-size: 0.6rem;
  font-weight: 400;
}

.apple-document-category {
  margin-bottom: 1rem;
}

.apple-category-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  font-size: 0.6rem;
  font-weight: 400;
}

.apple-document-actions {
  position: absolute;
  top: 1rem;
  right: 1rem;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.apple-document-card:hover .apple-document-actions {
  opacity: 1;
}

.apple-action-buttons {
  display: flex;
  gap: 0.25rem;
}

.apple-action-btn {
  background: #ffffff;
  border: 1px solid #e5e5e7;
  border-radius: 6px;
  padding: 0.375rem;
  color: #6e6e73;
  transition: all 0.2s ease;
  cursor: pointer;
  font-size: 0.75rem;
}

.apple-action-btn:hover {
  background: #007AFF;
  color: white;
  border-color: #007AFF;
}

.apple-action-btn.apple-delete-btn:hover {
  background: #ff3b30;
  border-color: #ff3b30;
}

/* Empty State */
.apple-empty-state {
  text-align: center;
  padding: 4rem 2rem;
  grid-column: 1 / -1;
}

.apple-empty-icon {
  width: 80px;
  height: 80px;
  background: #f2f2f7;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem auto;
  font-size: 2rem;
  color: #8e8e93;
}

.apple-empty-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: #1d1d1f;
  margin: 0 0 0.5rem 0;
}

.apple-empty-text {
  color: #6e6e73;
  font-size: 1rem;
  margin: 0 0 2rem 0;
}

/* Pagination */
.apple-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin-top: 2rem;
}

.apple-page-btn {
  background: #f2f2f7;
  border: 1px solid #e5e5e7;
  border-radius: 8px;
  padding: 0.5rem 1rem;
  color: #6e6e73;
  text-decoration: none;
  transition: all 0.2s ease;
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.apple-page-btn:hover,
.apple-page-btn.active {
  background: #007AFF;
  color: white;
  border-color: #007AFF;
  text-decoration: none;
}

.apple-page-numbers {
  display: flex;
  gap: 0.25rem;
}

/* Upload Modal Styles */
.apple-upload-area {
  border: 2px dashed #e5e5e7;
  border-radius: 16px;
  padding: 3rem 2rem;
  text-align: center;
  transition: all 0.2s ease;
  cursor: pointer;
}

.apple-upload-area:hover,
.apple-upload-area.dragover {
  border-color: #007AFF;
  background: #f0f8ff;
}

.apple-upload-content i {
  font-size: 3rem;
  color: #8e8e93;
  margin-bottom: 1rem;
}

.apple-upload-content h4 {
  font-size: 1.25rem;
  font-weight: 600;
  color: #1d1d1f;
  margin: 0 0 0.5rem 0;
}

.apple-upload-content p {
  color: #6e6e73;
  font-size: 0.875rem;
  margin: 0;
}

.apple-upload-details {
  background: #f8f9fa;
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 1.5rem;
}

.apple-file-info {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.apple-file-icon {
  width: 40px;
  height: 40px;
  background: #007AFF;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1rem;
}

.apple-file-details {
  flex: 1;
}

.apple-file-name {
  font-weight: 600;
  color: #1d1d1f;
  margin: 0 0 0.25rem 0;
}

.apple-file-size {
  color: #6e6e73;
  font-size: 0.875rem;
  margin: 0;
}

/* Form Styles */
.apple-form-group {
  margin-bottom: 1.5rem;
}

.apple-form-label {
  display: block;
  font-weight: 600;
  color: #1d1d1f;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
}

.apple-form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid #e5e5e7;
  border-radius: 12px;
  font-size: 0.875rem;
  background: #f8f9fa;
  transition: all 0.2s ease;
  color: #1d1d1f;
}

.apple-form-input:focus {
  outline: none;
  border-color: #007AFF;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

.apple-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.apple-checkbox-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.apple-checkbox {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-size: 0.875rem;
  color: #1d1d1f;
}

.apple-checkbox input[type="checkbox"] {
  display: none;
}

.apple-checkmark {
  width: 20px;
  height: 20px;
  border: 2px solid #e5e5e7;
  border-radius: 4px;
  position: relative;
  transition: all 0.2s ease;
}

.apple-checkbox input[type="checkbox"]:checked + .apple-checkmark {
  background: #007AFF;
  border-color: #007AFF;
}

.apple-checkbox input[type="checkbox"]:checked + .apple-checkmark::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 0.75rem;
  font-weight: bold;
}

/* Responsive Design */
@media (max-width: 768px) {
  .apple-documents-header {
    flex-direction: column;
    gap: 1.5rem;
    text-align: center;
  }
  
  .apple-header-content {
    flex-direction: column;
    text-align: center;
  }
  
  .apple-filters-section {
    flex-direction: column;
    gap: 1rem;
  }
  
  .apple-filter-controls {
    flex-wrap: wrap;
  }
  
  .apple-documents-grid {
    grid-template-columns: 1fr;
  }
  
  .apple-form-row {
    grid-template-columns: 1fr;
  }
  
  .apple-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .apple-categories-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .apple-stats-grid {
    grid-template-columns: 1fr;
  }
  
  .apple-categories-grid {
    grid-template-columns: 1fr;
  }
  
  .apple-pagination {
    flex-wrap: wrap;
  }
}

.apple-modal-header {
  border-bottom: none;
  padding: 2rem 2rem 1rem 2rem;
  background: transparent;
  border-radius: 20px 20px 0 0;
}

.apple-modal-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: #1d1d1f;
  letter-spacing: -0.01em;
}

.apple-modal-body {
  padding: 2rem;
  background: transparent;
}

.apple-modal-footer {
  border-top: none;
  padding: 1.5rem 2rem 2rem 2rem;
  background: transparent;
  border-radius: 0 0 20px 20px;
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
}

.apple-input {
  border-radius: 12px;
  border: 1.5px solid #e5dfe4;
  padding: 0.75rem 1.2rem;
  font-size: 1.05rem;
  background: #fafbfc;
  transition: border-color 0.2s;
}

.apple-input:focus {
  border-color: #7b1fa2;
  color: #1d1d1f;
  box-shadow: 0 0 0 2px #e9d7fa;
  background: #fff;
}

.apple-btn {
  border: none;
  border-radius: 12px;
  padding: 0.75rem 2.2rem;
  font-size: 1.05rem;
  font-weight: 500;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: #f5f5f7;
  color: #1d1d1f;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  transition: background 0.18s, color 0.18s, box-shadow 0.18s, transform 0.18s;
  outline: none;
  margin: 0;
  display: inline-block;
  letter-spacing: -0.01em;
}

.apple-btn:active {
  transform: scale(0.98);
}

.apple-btn:focus {
  box-shadow: 0 0 0 2px #d1c4e9;
}

.apple-btn-primary {
  background: linear-gradient(135deg, rgba(123,31,162,0.10) 0%, #f5e9fe 100%);
  color: var(--primary-color);
}

.apple-btn-primary:hover, .apple-btn-primary:focus {
  background: var(--primary-color);
  color: #fff;
  box-shadow: 0 4px 16px rgba(123, 31, 162, 0.10);
}

.apple-btn-secondary {
  background: linear-gradient(135deg, #f3f0fa 0%, #f5f5f7 100%);
  color: #7b1fa2;
  border: 1.5px solid var(--bg-light);
}

.apple-btn-secondary:hover, .apple-btn-secondary:focus {
  background: var(--bg-light);
  color: var(--primary-color);
  box-shadow: 0 4px 16px rgba(123, 31, 162, 0.07);
}

.apple-btn-danger {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: white;
  border: 1px solid #dc2626;
  box-shadow: 0 2px 4px rgba(239, 68, 68, 0.2);
}

.apple-btn-danger:hover {
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(239, 68, 68, 0.3);
}

/* Apple Document Card Styles */
.apple-document-card {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06), 0 4px 16px rgba(0, 0, 0, 0.08);
    padding: 1.8rem 1.5rem 1.5rem 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid #f0f0f0;
    cursor: pointer;
    min-height: 200px;
    position: relative;
    overflow: hidden;
}

.apple-document-card:hover {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12), 0 16px 48px rgba(0, 0, 0, 0.08);
    transform: translateY(-4px);
    border-color: #e0e0e7;
}

.apple-document-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg, #007AFF, #5856D6, #AF52DE);
    border-radius: 16px 16px 0 0;
}

.apple-document-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.8) 0%, rgba(248, 249, 250, 0.4) 100%);
    opacity: 0;
    transition: opacity 0.25s ease;
    pointer-events: none;
}

.apple-document-card:hover::after {
    opacity: 1;
}

.apple-document-icon {
    font-size: 2rem;
    margin-bottom: 1.2rem;
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
}

.apple-document-card:nth-child(4n+1) .apple-document-icon {
    color: #007AFF;
}

.apple-document-card:nth-child(4n+2) .apple-document-icon {
    color: #34C759;
}

.apple-document-card:nth-child(4n+3) .apple-document-icon {
    color: #FF9500;
}

.apple-document-card:nth-child(4n+4) .apple-document-icon {
    color: #AF52DE;
}

.apple-document-card:hover .apple-document-icon {
    transform: scale(1.15) rotate(5deg);
}

.apple-document-title {
    font-size: 1.15rem;
    font-weight: 600;
    color: #1d1d1f;
    margin-bottom: 0.6rem;
    text-align: center;
    line-height: 1.4;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    position: relative;
    z-index: 2;
}

.apple-document-type {
    font-size: 0.85rem;
    color: #6e6e73;
    margin-bottom: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    font-weight: 600;
    position: relative;
    z-index: 2;
}

.apple-document-meta {
    display: flex;
    gap: 0.6rem;
    margin-top: auto;
    position: relative;
    z-index: 2;
}

.version-badge, .date-badge {
    background: rgba(0, 0, 0, 0.08);
    color: #6e6e73;
    padding: 0.35rem 0.8rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    transition: all 0.2s ease;
}

.apple-document-card:hover .version-badge,
.apple-document-card:hover .date-badge {
    background: rgba(0, 0, 0, 0.12);
    color: #1d1d1f;
    transform: translateY(-1px);
}

/* Documents Sections Container */
.documents-sections-container {
    display: flex;
    gap: 1.5rem;
    margin: 1rem 0;
}

@media (max-width: 768px) {
    .documents-sections-container {
        flex-direction: column;
        gap: 1rem;
    }
}

/* Apple Documents Section */
.apple-documents-section {
    background: #ffffff;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    border: 1px solid #e5e5e7;
    flex: 1;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e5e5e7;
}

.header-content {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.header-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #007AFF, #5856D6);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.4rem;
    box-shadow: 0 4px 16px rgba(0, 122, 255, 0.3);
}

.header-text {
    flex: 1;
}

.section-title {
    font-size: 1.8rem;
    font-weight: 600;
    color: #1d1d1f;
    margin: 0 0 0.5rem 0;
    letter-spacing: -0.01em;
}

.section-subtitle {
    font-size: 1rem;
    color: #8e8e93;
    margin: 0;
    line-height: 1.4;
}

.header-actions {
    display: flex;
    gap: 1rem;
}

.apple-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: linear-gradient(135deg, #007AFF, #5856D6);
    color: white;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.25s ease;
    box-shadow: 0 4px 16px rgba(0, 122, 255, 0.25);
}

.apple-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 122, 255, 0.35);
    color: white;
    text-decoration: none;
}

/* Enhanced Empty State */
.apple-empty-state {
    text-align: center;
    padding: 3.5rem 2rem;
    background: #ffffff;
    border-radius: 16px;
    border: 2px dashed #e5e5e7;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.apple-empty-icon {
    font-size: 3.5rem;
    color: #c7c7cc;
    margin-bottom: 1.5rem;
    opacity: 0.7;
}

.apple-empty-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #6e6e73;
    margin-bottom: 0.8rem;
}

.apple-empty-desc {
    font-size: 1rem;
    color: #8e8e93;
    line-height: 1.6;
    max-width: 400px;
    margin: 0 auto;
}

/* Enhanced Document Modal */
.document-info {
    background: #ffffff;
    border-radius: 16px;
    padding: 1.8rem;
    border: 1px solid #e5e5e7;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.document-name {
    font-size: 1.6rem;
    font-weight: 700;
    color: #1d1d1f;
    margin-bottom: 1rem;
}

.document-meta span {
    background: rgba(0, 0, 0, 0.08);
    color: #6e6e73;
    padding: 0.6rem 1.2rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-right: 0.5rem;
    transition: all 0.2s ease;
}

.document-type-badge {
    background: linear-gradient(135deg, #007AFF, #5856D6) !important;
    color: white !important;
    box-shadow: 0 2px 8px rgba(0, 122, 255, 0.3);
}

.content-preview {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 1.8rem;
    border: 1px solid #e5e5e7;
    min-height: 220px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    line-height: 1.7;
    color: #1d1d1f;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* Card Grid Layout Enhancement */
.company-documents .row {
    margin: 0 -0.75rem;
}

.company-documents .col-md-6,
.company-documents .col-lg-3 {
    padding: 0 0.75rem;
    margin-bottom: 1.5rem;
}

/* Responsive Card Adjustments */
@media (max-width: 768px) {
    .apple-document-card {
        min-height: 180px;
        padding: 1.5rem 1.2rem 1.2rem 1.2rem;
    }
    
    .apple-document-title {
        font-size: 1.05rem;
    }
    
    .apple-document-icon {
        font-size: 1.8rem;
    }
    
    .company-documents .col-md-6 {
        margin-bottom: 1rem;
    }
    
    .apple-documents-section {
        padding: 2rem 1.5rem;
        margin: 1.5rem 0;
    }
    
    .section-header {
        flex-direction: column;
        gap: 1.5rem;
        align-items: center;
        text-align: center;
    }
    
    .header-content {
        flex-direction: column;
        text-align: center;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
}

@media (max-width: 576px) {
    .apple-document-card {
        min-height: 160px;
        padding: 1.3rem 1rem 1rem 1rem;
    }
    
    .apple-document-icon {
        font-size: 1.6rem;
        margin-bottom: 1rem;
    }
    
    .apple-document-title {
        font-size: 1rem;
    }
    
    .apple-document-meta {
        gap: 0.4rem;
    }
    
    .version-badge, .date-badge {
        padding: 0.3rem 0.6rem;
        font-size: 0.7rem;
    }
    
    .apple-documents-section {
        padding: 1.5rem 1rem;
    }
    
    .section-title {
        font-size: 1.6rem;
    }
    
    .header-icon {
        width: 56px;
        height: 56px;
        font-size: 1.5rem;
    }
    
    .apple-document-card {
        margin: 0 -0.5rem;
    }
}

/* Apple-Style List Group Items for Profile Information */
.list-group-flush .list-group-item {
    border: none;
    padding: 0.75rem 0;
    background: transparent;
    color: #6e6e73;
    border-bottom: 1px solid #f2f2f7;
    transition: all 0.2s ease;
}

.list-group-flush .list-group-item:last-child {
    border-bottom: none;
}

.list-group-flush .list-group-item:hover {
    background: #f8f9fa;
    border-radius: 8px;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
    margin-left: -0.5rem;
    margin-right: -0.5rem;
}

.list-group-flush .list-group-item strong {
    color: #1d1d1f;
    font-weight: 600;
    font-size: 0.875rem;
}

.list-group-flush .list-group-item span {
    color: #6e6e73;
    font-size: 0.875rem;
    font-weight: 400;
}

/* Apple-Style Navigation — solid white frost (no gradient) */
.apple-navbar {
    --nav-brand: #2e3192;
    --nav-ink: #1d1d1f;
    --nav-muted: #6e6e73;
    --nav-glass: rgba(255, 255, 255, 0.55);
    background: var(--nav-glass) !important;
    background-image:
        linear-gradient(180deg, rgba(255, 255, 255, 0.72) 0%, rgba(255, 255, 255, 0.42) 100%) !important;
    backdrop-filter: blur(28px) saturate(1.65);
    -webkit-backdrop-filter: blur(28px) saturate(1.65);
    border-radius: 20px;
    margin: 1rem auto;
    max-width: 1200px;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.65) inset,
        0 8px 28px rgba(15, 23, 42, 0.08),
        0 1px 3px rgba(15, 23, 42, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.55);
    padding: 0.55rem 1.15rem;
    position: relative;
    overflow: visible;
    z-index: 1100;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", sans-serif;
}

/* Modals above navbar — also demote nav while open (see modals-system.css) */
.modal-backdrop {
    z-index: 20040 !important;
}
.modal {
    z-index: 20050 !important;
}
body.modal-open .apple-navbar,
body.modal-open .apple-nav-menu-container,
body.modal-open .apple-notification-dropdown,
body.modal-open .apple-chat-preview,
body.modal-open .apple-profile-dropdown {
    z-index: 0 !important;
}

.apple-nav-container {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-rows: auto auto;
    align-items: center;
    width: 100%;
    gap: 0.45rem 0.75rem;
}

.apple-nav-brand {
    display: flex;
    align-items: center;
    text-decoration: none;
    flex-shrink: 0;
    z-index: 3;
    grid-column: 1;
    grid-row: 2;
}

.apple-nav-logo {
    height: 40px;
    width: auto;
    object-fit: contain;
}

.apple-nav-toggler {
    display: none;
    background: transparent;
    border: none;
    padding: 0.5rem;
    border-radius: 10px;
    color: var(--nav-muted);
    transition: background 0.18s ease, color 0.18s ease;
    cursor: pointer;
    justify-self: end;
    z-index: 2;
}

.apple-nav-toggler:hover {
    background: rgba(255, 255, 255, 0.45);
    color: var(--nav-ink);
}

.apple-nav-toggler-icon {
    display: block;
    width: 20px;
    height: 2px;
    background: currentColor;
    position: relative;
    transition: all 0.2s ease;
}

.apple-nav-toggler-icon::before,
.apple-nav-toggler-icon::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 2px;
    background: currentColor;
    transition: all 0.2s ease;
}

.apple-nav-toggler-icon::before {
    top: -6px;
}

.apple-nav-toggler-icon::after {
    bottom: -6px;
}

.apple-nav-menu-container {
    display: flex;
    align-items: center;
    justify-content: center;
    grid-column: 1 / -1;
    grid-row: 1;
    overflow: visible;
    pointer-events: none;
}

.apple-nav-notices {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-self: center;
    align-self: center;
    width: min(420px, calc(100% - 220px));
    max-width: min(420px, calc(100% - 220px));
    z-index: 2;
    pointer-events: none;
}
.apple-nav-notices .company-notices-dock,
.apple-nav-notices .company-notices-dock--empty-add {
    pointer-events: auto;
    margin-left: auto;
    margin-right: auto;
}

.apple-nav-menu {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.15rem;
    margin: 0;
    padding: 0;
    list-style: none;
    overflow: visible;
    pointer-events: auto;
}

.apple-nav-item {
    margin: 0;
}

.apple-nav-profile-group {
    margin-left: 0;
    justify-self: end;
    z-index: 3010;
    grid-column: 3;
    grid-row: 2;
    position: relative;
}

.apple-nav-link {
    display: flex;
    align-items: center;
    padding: 0.55rem 1rem;
    color: var(--nav-muted);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.875rem;
    border-radius: 10px;
    transition: color 0.15s ease, background-color 0.15s ease;
    letter-spacing: -0.015em;
    white-space: nowrap;
    background: transparent;
    border: none;
}

.apple-nav-link.active {
    background: rgba(255, 255, 255, 0.55) !important;
    color: #1d1d1f !important;
    font-weight: 600;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.7) inset,
        0 1px 4px rgba(15, 23, 42, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.45);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.apple-nav-link:hover {
    color: #1d1d1f !important;
    background: rgba(255, 255, 255, 0.38) !important;
    text-decoration: none;
    box-shadow: none;
    border: 1px solid transparent;
}

.apple-nav-link.active i {
    color: var(--nav-brand);
}

/* Chat Preview Tooltip */
.apple-nav-item {
    position: relative;
}

.apple-chat-link {
    position: relative;
}

.apple-chat-preview {
    position: absolute;
    top: calc(100% + 12px);
    left: 0;
    width: 320px;
    max-width: calc(100vw - 2rem);
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(24px) saturate(160%);
    -webkit-backdrop-filter: blur(24px) saturate(160%);
    border-radius: 16px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    opacity: 0;
    transform: translateY(-10px) scale(0.95);
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 1010;
    display: flex;
    flex-direction: column;
}

.apple-chat-preview.show {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.apple-chat-preview-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid rgba(142, 142, 147, 0.12);
    background: rgba(248, 248, 250, 0.5);
    font-size: 0.875rem;
    font-weight: 600;
    color: #1D1D1F;
}

.apple-chat-preview-body {
    max-height: 300px;
    overflow-y: auto;
    background: #ffffff;
}

.apple-chat-preview-body::-webkit-scrollbar {
    width: 6px;
}

.apple-chat-preview-body::-webkit-scrollbar-track {
    background: transparent;
}

.apple-chat-preview-body::-webkit-scrollbar-thumb {
    background: rgba(142, 142, 147, 0.3);
    border-radius: 3px;
}

.apple-chat-preview-body::-webkit-scrollbar-thumb:hover {
    background: rgba(142, 142, 147, 0.5);
}

.apple-chat-preview-item {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid rgba(142, 142, 147, 0.08);
    display: flex;
    gap: 0.75rem;
    cursor: pointer;
    transition: background 0.2s ease;
    position: relative;
    align-items: flex-start;
}

.apple-chat-preview-item:hover {
    background: rgba(248, 248, 250, 0.5);
}

.apple-chat-preview-item.unread {
    background: rgba(46, 49, 146, 0.05);
}

.apple-chat-preview-item.unread:hover {
    background: rgba(46, 49, 146, 0.09);
}

.apple-chat-preview-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    background: #2e3192;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(255, 255, 255, 0.95);
    box-shadow:
        0 0 0 2px rgba(46, 49, 146, 0.18),
        0 2px 8px rgba(46, 49, 146, 0.12);
}

.apple-chat-preview-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.apple-chat-preview-initials {
    color: #ffffff;
    font-weight: 600;
    font-size: 0.875rem;
}

.apple-chat-preview-content {
    flex: 1;
    min-width: 0;
}

.apple-chat-preview-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: #1D1D1F;
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.apple-chat-preview-message {
    font-size: 0.8125rem;
    color: #6e6e73;
    line-height: 1.4;
    margin-bottom: 0.25rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.apple-chat-preview-time {
    font-size: 0.75rem;
    color: #86868B;
    margin-top: 0.125rem;
}

.apple-chat-preview-unread-dot {
    position: absolute;
    top: 1rem;
    right: 1.25rem;
    width: 8px;
    height: 8px;
    background: #2e3192;
    border-radius: 50%;
    flex-shrink: 0;
}

.apple-chat-preview-loading,
.apple-chat-preview-empty {
    padding: 2rem 1.25rem;
    text-align: center;
    color: #86868B;
    font-size: 0.875rem;
}

.apple-chat-preview-loading i {
    margin-right: 0.5rem;
    color: #2e3192;
}

/* Responsive Design for Navigation */
@media (max-width: 768px) {
    .apple-navbar {
        margin: 0.5rem;
        border-radius: 16px;
        padding: 0.5rem 0.85rem;
    }

    .apple-nav-container {
        grid-template-columns: auto 1fr auto;
        grid-template-rows: auto auto;
    }

    .apple-nav-brand {
        grid-column: 1;
        grid-row: 1;
    }
    
    .apple-nav-toggler {
        display: block;
        grid-column: 2;
        grid-row: 1;
        justify-self: end;
        margin-right: 0.35rem;
    }
    
    .apple-nav-menu-container {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        grid-column: auto;
        grid-row: auto;
        background: rgba(255, 255, 255, 0.62);
        background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.78) 0%, rgba(255, 255, 255, 0.5) 100%);
        backdrop-filter: blur(28px) saturate(1.65);
        -webkit-backdrop-filter: blur(28px) saturate(1.65);
        border-radius: 16px;
        box-shadow:
            0 1px 0 rgba(255, 255, 255, 0.65) inset,
            0 12px 32px rgba(15, 23, 42, 0.12);
        margin-top: 0.5rem;
        padding: 0.65rem;
        border: 1px solid rgba(255, 255, 255, 0.55);
        display: none;
        z-index: 1000;
        pointer-events: auto;
        justify-content: stretch;
    }
    
    .apple-nav-menu-container.show {
        display: flex;
    }
    
    .apple-nav-menu {
        flex-direction: column;
        gap: 0.15rem;
        width: 100%;
    }
    
    .apple-nav-item {
        width: 100%;
    }
    
    .apple-nav-link {
        width: 100%;
        justify-content: center;
        padding: 0.85rem 1rem;
        border-radius: 10px;
    }
    
    .apple-nav-logo {
        height: 32px;
    }

    .apple-nav-notices {
        grid-column: 1 / -1;
        grid-row: 2;
        width: 100%;
        max-width: 100%;
        justify-self: stretch;
        pointer-events: auto;
    }

    .apple-nav-profile-group {
        grid-column: 3;
        grid-row: 1;
        margin: 0;
        z-index: 3;
    }
}

@media (max-width: 576px) {
    .apple-navbar {
        margin: 0.25rem;
        padding: 0.45rem 0.7rem;
    }
    
    .apple-nav-logo {
        height: 28px;
    }
    
    .apple-nav-link {
        font-size: 0.875rem;
        padding: 0.8rem;
    }
}

/* Profile / notification cluster — matches search chip language */
.apple-nav-profile-group {
    margin-left: 0;
    overflow: visible;
}

.apple-nav-profile-container {
    position: relative;
    z-index: 3010;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 2px;
    border-radius: 999px;
    background: transparent;
    border: none;
    box-shadow: none;
    overflow: visible;
}

.apple-nav-profile-image-wrapper,
.apple-nav-notification-wrapper {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    padding: 0;
    margin: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    font: inherit;
    line-height: 1;
    transition: color 0.08s ease, background 0.08s ease, box-shadow 0.12s ease, transform 0.12s ease;
}

.apple-nav-notification-wrapper {
    position: relative;
    background: transparent;
    color: #86868B;
    font-size: 0.95rem;
}

.apple-nav-notification-wrapper:hover,
.apple-nav-notification-wrapper:focus-visible,
.apple-nav-notification-wrapper[aria-expanded="true"] {
    color: var(--nav-brand, #2e3192);
    background: rgba(255, 255, 255, 0.45);
    outline: none;
}

.apple-nav-profile-anchor {
    position: relative;
    flex-shrink: 0;
    z-index: 3010;
}

.apple-nav-profile-image-wrapper {
    position: relative;
    overflow: visible;
    background: linear-gradient(145deg, #3a3db0 0%, #2e3192 55%, #23256f 100%);
    border: 1px solid rgba(255, 255, 255, 0.85);
    box-shadow:
        0 0 0 1px rgba(46, 49, 146, 0.12),
        0 1px 3px rgba(0, 0, 0, 0.08);
}

.apple-nav-profile-image-wrapper:hover,
.apple-nav-profile-image-wrapper:focus-visible,
.apple-nav-profile-image-wrapper[aria-expanded="true"] {
    transform: translateY(-1px);
    box-shadow:
        0 0 0 1px rgba(46, 49, 146, 0.2),
        0 4px 12px rgba(46, 49, 146, 0.18);
    outline: none;
}

.apple-nav-profile-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.apple-nav-profile-initials {
    color: #ffffff;
    font-weight: 650;
    font-size: 0.88rem;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    line-height: 1;
}

.apple-nav-profile-online,
.apple-profile-dropdown-online {
    position: absolute;
    right: -1px;
    bottom: -1px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #34c759;
    border: 2px solid #ffffff;
    box-shadow: 0 0 0 1px rgba(52, 199, 89, 0.25);
}

.apple-nav-notification-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: #ff3b30;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
    border: 2px solid #ffffff;
    box-shadow: 0 1px 4px rgba(255, 59, 48, 0.28);
    pointer-events: none;
}

@media (max-width: 576px) {
    .apple-nav-profile-container {
        gap: 4px;
    }

    .apple-nav-profile-image-wrapper,
    .apple-nav-notification-wrapper {
        width: 32px;
        height: 32px;
    }

    .apple-nav-notification-wrapper {
        font-size: 0.88rem;
    }

    .apple-nav-profile-initials {
        font-size: 0.8rem;
    }
}

.apple-nav-notification-anchor {
    position: relative;
    flex-shrink: 0;
    z-index: 3010;
}

/* Notification dropdown — anchored to the bell */
.apple-notification-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    left: auto;
    width: 372px;
    max-width: min(372px, calc(100vw - 24px));
    max-height: min(600px, calc(100vh - 1.5rem));
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(24px) saturate(160%);
    -webkit-backdrop-filter: blur(24px) saturate(160%);
    border-radius: 18px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.04);
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    pointer-events: none;
    transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s ease;
    z-index: 3011;
    display: flex;
    flex-direction: column;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Segoe UI", sans-serif;
}

.apple-notification-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

/* Profile menu — anchored to the avatar, not the viewport */
.apple-profile-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    left: auto;
    width: 320px;
    max-width: min(320px, calc(100vw - 24px));
    max-height: min(78vh, 640px);
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(24px) saturate(160%);
    -webkit-backdrop-filter: blur(24px) saturate(160%);
    border-radius: 18px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.04);
    overflow: auto;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    pointer-events: none;
    transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s ease;
    z-index: 3011;
    display: flex;
    flex-direction: column;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Segoe UI", sans-serif;
}

.apple-profile-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.apple-notification-dropdown.expanded {
    max-height: 80vh;
    height: auto;
}

.apple-notification-dropdown-header {
    padding: 0.95rem 1.1rem 0.85rem;
    border-bottom: 1px solid rgba(60, 60, 67, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.75rem;
    background: rgba(248, 248, 250, 0.72);
}

.apple-notification-dropdown-heading {
    min-width: 0;
}

.apple-notification-dropdown-header h5 {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #1d1d1f;
}

.apple-notification-dropdown-sub {
    margin: 0.18rem 0 0;
    font-size: 0.75rem;
    font-weight: 500;
    color: #86868b;
    line-height: 1.3;
}

.apple-notification-mark-all-read {
    background: none;
    border: none;
    color: var(--nav-brand, #2e3192);
    font-size: 0.78rem;
    font-weight: 650;
    cursor: pointer;
    padding: 0.3rem 0.55rem;
    border-radius: 999px;
    transition: background 0.12s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.apple-notification-mark-all-read:hover {
    background: rgba(46, 49, 146, 0.08);
}

.apple-notification-mark-all-read[hidden] {
    display: none !important;
}

.apple-notification-dropdown-body {
    flex: 1;
    overflow-y: auto;
    max-height: 430px;
    min-height: 180px;
    background: transparent;
    position: relative;
}

.apple-notification-dropdown.expanded .apple-notification-dropdown-body {
    max-height: calc(80vh - 140px);
}

.apple-notification-dropdown-body::-webkit-scrollbar {
    width: 6px;
}

.apple-notification-dropdown-body::-webkit-scrollbar-track {
    background: transparent;
}

.apple-notification-dropdown-body::-webkit-scrollbar-thumb {
    background: rgba(142, 142, 147, 0.28);
    border-radius: 3px;
}

.apple-notification-item {
    padding: 0.85rem 1.1rem;
    border-bottom: 1px solid rgba(60, 60, 67, 0.08);
    display: flex;
    gap: 0.8rem;
    cursor: pointer;
    transition: background 0.12s ease;
    position: relative;
    align-items: flex-start;
}

.apple-notification-item:hover {
    background: rgba(0, 0, 0, 0.03);
}

.apple-notification-item.unread {
    background: rgba(46, 49, 146, 0.045);
}

.apple-notification-item.unread:hover {
    background: rgba(46, 49, 146, 0.075);
}

.apple-notification-item-icon {
    width: 36px;
    height: 36px;
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.92rem;
    flex-shrink: 0;
    background: rgba(46, 49, 146, 0.1);
    color: #2e3192;
}

.apple-notification-item-icon[data-tone="teal"] {
    background: rgba(31, 111, 102, 0.12);
    color: #1f6f66;
}

.apple-notification-item-icon[data-tone="amber"] {
    background: rgba(183, 121, 31, 0.14);
    color: #9a6714;
}

.apple-notification-item-icon[data-tone="slate"] {
    background: rgba(60, 60, 67, 0.08);
    color: #3a3a3c;
}

.apple-notification-item-icon[data-tone="brand"] {
    background: rgba(46, 49, 146, 0.1);
    color: #2e3192;
}

.apple-notification-item-content {
    flex: 1;
    min-width: 0;
    padding-right: 0.75rem;
}

.apple-notification-item-kicker {
    margin: 0 0 0.12rem;
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #86868b;
}

.apple-notification-item-title {
    font-size: 0.9rem;
    font-weight: 650;
    color: #1d1d1f;
    margin-bottom: 0.18rem;
    line-height: 1.3;
    letter-spacing: -0.015em;
}

.apple-notification-item-message {
    font-size: 0.8rem;
    color: #6e6e73;
    line-height: 1.4;
    margin-bottom: 0.3rem;
    word-wrap: break-word;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.apple-notification-item-time {
    font-size: 0.72rem;
    color: #86868b;
    font-weight: 500;
}

.apple-notification-loading,
.apple-notification-empty,
.apple-notification-error {
    padding: 2.4rem 1.4rem;
    text-align: center;
    color: #86868b;
    font-size: 0.86rem;
}

.apple-notification-empty {
    display: grid;
    gap: 0.35rem;
    justify-items: center;
}

.apple-notification-empty strong {
    color: #1d1d1f;
    font-size: 0.95rem;
    font-weight: 700;
}

.apple-notification-empty-icon {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(46, 49, 146, 0.08);
    color: #2e3192;
    margin-bottom: 0.25rem;
}

.apple-notification-loading i {
    margin-right: 0.45rem;
}

.apple-notification-dropdown-footer {
    padding: 0.65rem 0.85rem;
    border-top: 1px solid rgba(60, 60, 67, 0.1);
    background: rgba(248, 248, 250, 0.72);
    text-align: center;
}

.apple-notification-view-all {
    background: none;
    border: none;
    color: var(--nav-brand, #2e3192);
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 650;
    transition: background 0.12s ease;
    cursor: pointer;
    padding: 0.55rem 0.85rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    width: 100%;
    justify-content: center;
}

.apple-notification-view-all:hover {
    background: rgba(46, 49, 146, 0.08);
    color: var(--nav-brand, #2e3192);
}

.apple-notification-view-all i {
    font-size: 0.7rem;
}

.apple-notification-section-header {
    padding: 0.55rem 1.1rem 0.4rem;
    font-size: 0.68rem;
    font-weight: 700;
    color: #86868b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: rgba(248, 248, 250, 0.92);
    border-bottom: 1px solid rgba(60, 60, 67, 0.06);
    position: sticky;
    top: 0;
    z-index: 10;
}

.apple-notification-item-unread-dot-small {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--nav-brand, #2e3192);
    box-shadow: 0 0 0 2px #fff;
}

.apple-notification-more-indicator {
    padding: 0.85rem 1.1rem;
    text-align: center;
    font-size: 0.72rem;
    color: #86868b;
    background: rgba(248, 248, 250, 0.65);
    border-top: 1px solid rgba(60, 60, 67, 0.06);
}

.apple-profile-dropdown-hero {
    padding: 1rem 1.05rem 0.9rem;
    border-bottom: 1px solid rgba(60, 60, 67, 0.1);
    background:
        radial-gradient(ellipse 90% 80% at 0% 0%, rgba(46, 49, 146, 0.12), transparent 55%),
        linear-gradient(180deg, rgba(248, 248, 250, 0.95), rgba(255, 255, 255, 0.88));
}

.apple-profile-dropdown-user {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.apple-profile-dropdown-avatar-wrap {
    position: relative;
    flex-shrink: 0;
}

.apple-profile-dropdown-image,
.apple-profile-dropdown-initials {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    flex-shrink: 0;
}

.apple-profile-dropdown-image {
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.9);
    box-shadow:
        0 0 0 1px rgba(46, 49, 146, 0.12),
        0 2px 8px rgba(0, 0, 0, 0.08);
}

.apple-profile-dropdown-initials {
    background: linear-gradient(145deg, #3a3db0 0%, #2e3192 55%, #23256f 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-weight: 650;
    font-size: 1.05rem;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    border: 1px solid rgba(255, 255, 255, 0.9);
    box-shadow:
        0 0 0 1px rgba(46, 49, 146, 0.14),
        0 2px 8px rgba(46, 49, 146, 0.14);
}

.apple-profile-dropdown-online {
    right: 1px;
    bottom: 1px;
    width: 12px;
    height: 12px;
}

.apple-profile-dropdown-info {
    flex: 1;
    min-width: 0;
}

.apple-profile-dropdown-greeting {
    margin: 0 0 0.12rem;
    font-size: 0.72rem;
    font-weight: 650;
    letter-spacing: 0.02em;
    color: #2e3192;
}

.apple-profile-dropdown-name {
    font-size: 1rem;
    font-weight: 750;
    letter-spacing: -0.025em;
    color: #1d1d1f;
    margin-bottom: 0.1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.apple-profile-dropdown-meta {
    font-size: 0.78rem;
    font-weight: 600;
    color: #6e6e73;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.apple-profile-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.45rem;
    margin-top: 0.85rem;
}

.apple-profile-detail {
    padding: 0.5rem 0.6rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(60, 60, 67, 0.08);
    min-width: 0;
}

.apple-profile-detail--wide {
    grid-column: 1 / -1;
}

.apple-profile-detail-label {
    display: block;
    font-size: 0.64rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #86868b;
    margin-bottom: 0.12rem;
}

.apple-profile-detail-value {
    display: block;
    font-size: 0.8rem;
    font-weight: 650;
    color: #1d1d1f;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.apple-profile-smart {
    padding: 0.8rem 1.05rem;
    border-bottom: 1px solid rgba(60, 60, 67, 0.1);
    background: rgba(248, 248, 250, 0.55);
}

.apple-profile-smart-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.3rem;
}

.apple-profile-smart-kicker {
    font-size: 0.66rem;
    font-weight: 750;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #86868b;
}

.apple-profile-smart-status {
    font-size: 0.68rem;
    font-weight: 650;
    color: #2e3192;
    background: rgba(46, 49, 146, 0.08);
    border-radius: 999px;
    padding: 0.12rem 0.45rem;
}

.apple-profile-smart-summary {
    margin: 0;
    font-size: 0.8rem;
    line-height: 1.4;
    color: #3a3a3c;
}

.apple-profile-dropdown-body {
    padding: 0.45rem 0.5rem 0.55rem;
    background: transparent;
}

.apple-profile-section-label {
    margin: 0.2rem 0.55rem 0.35rem;
    font-size: 0.66rem;
    font-weight: 750;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #86868b;
}

.apple-profile-dropdown-divider {
    height: 1px;
    margin: 0.35rem 0.45rem;
    background: rgba(60, 60, 67, 0.1);
}

.apple-profile-dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    width: 100%;
    border: none;
    background: transparent;
    padding: 0.7rem 0.75rem;
    border-radius: 12px;
    color: #1d1d1f;
    text-decoration: none;
    font: inherit;
    font-size: 0.88rem;
    font-weight: 600;
    text-align: left;
    transition: background 0.12s ease;
    cursor: pointer;
}

.apple-profile-dropdown-item:hover {
    background: rgba(46, 49, 146, 0.06);
    color: #1d1d1f;
    text-decoration: none;
}

.apple-profile-dropdown-item i {
    width: 18px;
    text-align: center;
    color: #2e3192;
    font-size: 0.92rem;
    opacity: 0.9;
}

.apple-profile-dropdown-item span {
    flex: 1;
    min-width: 0;
}

.apple-profile-dropdown-item em {
    font-style: normal;
    font-size: 0.7rem;
    font-weight: 650;
    color: #86868b;
    white-space: nowrap;
}

.apple-profile-dropdown-item--danger {
    color: #1d1d1f;
}

.apple-profile-dropdown-item--danger i {
    color: #86868b;
}

.apple-profile-dropdown-item--danger:hover {
    background: rgba(255, 59, 48, 0.08);
    color: #d70015;
}

.apple-profile-dropdown-item--danger:hover i {
    color: #d70015;
}

/* Full Notification Page Styles */
.apple-notification-item-full {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(142, 142, 147, 0.12);
    display: flex;
    gap: 1rem;
    cursor: pointer;
    transition: background 0.2s ease;
    position: relative;
    border-radius: 12px;
    margin-bottom: 0.75rem;
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.apple-notification-item-full:hover {
    background: rgba(248, 248, 250, 0.8);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.apple-notification-item-full.unread {
    background: rgba(46, 49, 146, 0.05);
    border-left: 4px solid #2e3192;
}

.apple-notification-item-full .apple-notification-item-icon[data-tone="teal"] {
    background: rgba(31, 111, 102, 0.12);
    color: #1f6f66;
}

.apple-notification-item-full .apple-notification-item-icon[data-tone="amber"] {
    background: rgba(183, 121, 31, 0.14);
    color: #9a6714;
}

.apple-notification-item-full .apple-notification-item-icon[data-tone="slate"] {
    background: rgba(60, 60, 67, 0.08);
    color: #3a3a3c;
}

.apple-notification-item-unread-dot {
    position: absolute;
    top: 1.25rem;
    right: 1.5rem;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #2e3192;
    box-shadow: 0 0 0 3px rgba(46, 49, 146, 0.2);
}

.apple-notification-empty-full {
    padding: 4rem 2rem;
    text-align: center;
    color: #86868B;
}

@media (max-width: 768px) {
    .apple-notification-dropdown {
        width: min(372px, calc(100vw - 24px));
        right: 0;
        left: auto;
    }
    
    .apple-nav-notification-wrapper {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }
}

/* Funeral Form Styles - Moved to Funeral Section */

/* Funeral Edit Form Styles - Moved to Funeral Section */

/* Funeral View Styles - Moved to Funeral Section */

.overall-progress .progress-circle {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 8px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.overall-progress p {
    font-size: 0.9rem;
    margin: 0;
    opacity: 0.95;
}

/* Funeral View Page Header - Moved to Funeral Section */

/* Notes section - grouped design */
.notes-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 16px;
    padding: 20px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.04);
    margin-bottom: 20px;
}

.notes-section h4 {
    color: #1d1d1f;
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 16px;
    text-align: center;
    letter-spacing: -0.01em;
}

.notes-section .section-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.1), transparent);
    margin: 20px 0;
}

/* Note form - improved design */
.note-form {
    background: white;
    border-radius: 12px;
    padding: 16px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.03);
    margin-bottom: 20px;
}

.note-form textarea {
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    font-size: 0.9rem;
    resize: vertical;
    min-height: 100px;
    padding: 12px;
    transition: all 0.2s ease;
}

.note-form textarea:focus {
    border-color: #007AFF;
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
    outline: none;
}

.note-form .btn {
    border-radius: 10px;
    font-weight: 500;
    padding: 10px 20px;
    font-size: 0.9rem;
    background: #007AFF;
    border: none;
    transition: all 0.2s ease;
}

.note-form .btn:hover {
    background: #0056CC;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.3);
}

/* Activity timeline - grouped with notes */
.activity-timeline {
    background: white;
    border-radius: 12px;
    padding: 16px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.03);
}

.activity-timeline h4 {
    color: #1d1d1f;
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 16px;
    text-align: center;
    letter-spacing: -0.01em;
}

/* Enhanced notes section styling */
.notes-section .timeline.compact {
    max-height: 350px;
    overflow-y: auto;
    padding-right: 8px;
    margin-top: 16px;
}

.notes-section .timeline.compact::-webkit-scrollbar {
    width: 4px;
}

.notes-section .timeline.compact::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 2px;
}

.notes-section .timeline.compact::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 2px;
}

.notes-section .timeline.compact::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Better visual separation */
.notes-section .note-form {
    margin-bottom: 0;
    background: white;
    border-radius: 12px;
    padding: 16px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.03);
}

.notes-section .section-divider {
    margin: 20px 0;
    opacity: 0.6;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.1), transparent);
}

/* Notes section header */
.notes-section h4 {
    color: #1d1d1f;
    font-weight: 600;
    font-size: 1.2rem;
    margin-bottom: 20px;
    text-align: center;
    letter-spacing: -0.01em;
    position: relative;
    padding-bottom: 12px;
}

.notes-section h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 2px;
    background: linear-gradient(90deg, #007AFF, #5856D6);
    border-radius: 1px;
}

/* Note items styling */
.note-item {
    background: #f8f9fa !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    border-radius: 10px !important;
    padding: 14px !important;
    margin-bottom: 12px;
    transition: all 0.2s ease;
}

.note-item:hover {
    background: #f1f3f4 !important;
    border-color: rgba(0, 0, 0, 0.12) !important;
    transform: translateY(-1px);
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.08);
}

.note-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.note-header strong {
    color: #007AFF;
    font-size: 0.9rem;
}

.note-date {
    color: #6c757d;
    font-size: 0.75rem;
    font-weight: 500;
}

.note-content {
    color: #1d1d1f;
    font-size: 0.9rem;
    line-height: 1.5;
    font-style: italic;
}

/* Better spacing between sections */
.notes-section {
    margin-bottom: 24px;
}

.notes-section:last-child {
    margin-bottom: 0;
}

/* Enhanced empty states */
.empty-state {
    text-align: center;
    padding: 30px 20px;
    color: #6c757d;
    background: #f8f9fa;
    border-radius: 10px;
    border: 1px dashed rgba(0, 0, 0, 0.1);
}

.empty-state i {
    display: block;
    margin-bottom: 12px;
    opacity: 0.6;
}

.empty-state p {
    margin-bottom: 6px;
    font-weight: 500;
}

.empty-state small {
    opacity: 0.8;
}

/* Activity items styling */
.notes-section .timeline-item {
    margin-bottom: 12px;
}

.notes-section .step-item.compact {
    background: #f8f9fa;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 8px;
    padding: 10px 12px;
    transition: all 0.2s ease;
}

.notes-section .step-item.compact:hover {
    background: #f1f3f4;
    border-color: rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.notes-section .step-label {
    font-size: 0.85rem;
    line-height: 1.4;
}

.notes-section .step-date {
    font-size: 0.75rem;
    color: #6c757d;
    font-weight: 500;
}

/* Empty state styling */
.notes-section .empty-state {
    text-align: center;
    padding: 20px;
    color: #6c757d;
    font-style: italic;
}

/* Subtle animations */
.notes-section .note-form textarea:focus {
    transform: translateY(-1px);
}

.notes-section .btn:hover {
    transform: translateY(-1px);
}

/* Right sidebar spacing */
.col-lg-4 .notes-section {
    margin-bottom: 0;
}

/* Info cards - more compact */
.info-card {
    background: white;
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 12px;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.info-card h6 {
    font-size: 0.85rem;
    font-weight: 600;
    color: #007AFF;
    margin-bottom: 8px;
}

.info-card p {
    font-size: 0.8rem;
    margin-bottom: 4px;
    color: #495057;
}

.info-card p:last-child {
    margin-bottom: 0;
}

/* Compact timeline styles */
.timeline.compact .timeline-item {
    margin-bottom: 8px;
}

.timeline.compact .timeline-item::before {
    left: -12px;
}

.timeline.compact .timeline-item.completed::before {
    background: #28a745;
}

.timeline.compact .timeline-item.in-progress::before {
    background: #ffc107;
}

.timeline.compact .step-item {
    padding: 6px 10px;
    border-radius: 6px;
    border-left: 2px solid #e9ecef;
}

.timeline.compact .step-item.completed {
    border-left-color: #24c17f;
    background: #eefaf4;
}

.timeline.compact .step-item.in-progress {
    border-left-color: #ffc107;
    background: #fffdf7;
}

.timeline.compact .step-item.pending {
    border-left-color: #6c757d;
    background: #f8f9fa;
}

.timeline.compact .step-checkbox {
    width: 16px;
    height: 16px;
    margin-right: 8px;
}

.timeline.compact .step-label {
    font-size: 0.8rem;
    font-weight: 400;
}

.timeline.compact .step-date {
    font-size: 0.75rem;
    color: #999;
}

.timeline.compact .done-badge {
    padding: 2px 5px;
    font-size: 7px;
    margin-left: 4px;
}

.timeline.compact .step-item.completed .step-label {
    color: #28a745;
    text-decoration: line-through;
}

.timeline.compact .step-item.in-progress .step-label {
    color: #ffc107;
}

.timeline.compact .step-item.pending .step-label {
    color: #6c757d;
}

/* Responsive improvements */
@media (max-width: 991.98px) {
    .col-lg-4 {
        margin-top: 16px;
    }
}

/* Better spacing for main content */
.col-lg-8 .detail-container {
    margin-bottom: 20px;
}

.col-lg-8 .detail-container:last-child {
    margin-bottom: 0;
}

/* Funeral View Container - Moved to Funeral Section */

/* Smaller progress sections */
.progress-section {
    margin-bottom: 10px;
}

.progress-section h5 {
    margin-bottom: 10px;
    font-size: 0.9rem;
}

/* Timeline styles */
.timeline {
    position: relative;
    padding-left: 25px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 12px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #e9ecef;
}

.timeline-item {
    position: relative;
    margin-bottom: 12px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -18px;
    top: 4px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #e9ecef;
}

.timeline-item.completed::before {
    background: #28a745;
}

.timeline-item.in-progress::before {
    background: #ffc107;
}

/* Funeral Management Styles - Moved to Funeral Section */

/* ========================================
   FUNERAL SECTION - ALL FUNERAL STYLES
   ======================================== */

/* Common Funeral Page Header Styles */
.funeral-view .page-header,
.funeral-management .page-header {
    text-align: center;
    margin: 40px 0 32px 0;
    padding: 0;
    color: #1d1d1f;
    position: relative;
}

.funeral-view .page-header::before,
.funeral-management .page-header::before {
    content: '';
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #007AFF, #5856D6, #FF2D92);
    border-radius: 2px;
}

.funeral-view .page-header h1,
.funeral-management .page-header h1 {
    font-size: 2.2rem;
    font-weight: 700;
    margin: 0;
    color: #1d1d1f;
    letter-spacing: -0.03em;
    background: linear-gradient(135deg, #1d1d1f 0%, #434344 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: none;
}

.funeral-view .page-header .header-actions,
.funeral-management .page-header .header-actions {
    margin-top: 28px;
}

.funeral-view .page-header .btn,
.funeral-management .page-header .btn {
    border-radius: 20px;
    padding: 12px 28px;
    font-weight: 500;
    margin: 0 10px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    background: rgba(255, 255, 255, 0.9);
    color: #1d1d1f;
    backdrop-filter: blur(20px);
    transition: all 0.3s ease;
    font-size: 0.9rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.funeral-view .page-header .btn:hover,
.funeral-management .page-header .btn:hover {
    border-color: rgba(0, 0, 0, 0.2);
    background: rgba(255, 255, 255, 0.95);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

/* Common Container Styles */
.funeral-view .container-fluid,
.funeral-management .container-fluid {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ========================================
   FUNERAL FORM STYLES
   ======================================== */

/* Form Container */
.form-container {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

/* Form Sections */
.form-section {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 25px;
    border-left: 4px solid #667eea;
}

.form-section h4 {
    color: #667eea;
    margin-bottom: 20px;
    font-weight: 600;
}

/* Form Controls */
.form-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 8px;
}

.form-control, .form-select {
    border-radius: 10px;
    border: 2px solid #e9ecef;
    padding: 12px 15px;
    transition: all 0.3s ease;
}

.form-control:focus, .form-select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

/* Required Field Indicator */
.required-field::after {
    content: " *";
    color: #dc3545;
    font-weight: bold;
}

/* Form Buttons */
.btn-submit {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 25px;
    padding: 15px 40px;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.btn-cancel {
    border-radius: 25px;
    padding: 15px 40px;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
}

/* Progress Indicator */
.progress-indicator {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
}

.progress-step {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e9ecef;
    color: #6c757d;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin: 0 10px;
    position: relative;
}

.progress-step.active {
    background: #667eea;
    color: white;
}

.progress-step.completed {
    background: #28a745;
    color: white;
}

.progress-step:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 2px;
    background: #e9ecef;
}

.progress-step.completed:not(:last-child)::after {
    background: #28a745;
}

/* ========================================
   FUNERAL EDIT FORM STYLES
   ======================================== */

/* Edit Page Layout */
.edit-page {
    background: #ffffff;
    min-height: 100vh;
    padding: 60px 0 20px 0;
}

/* Edit Page Header */
.edit-page .page-header {
    text-align: center;
    margin-bottom: 25px;
    padding: 20px 0 20px 0;
    position: relative;
}

.edit-page .page-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 3px;
    background: linear-gradient(90deg, #007AFF, #5856D6);
    border-radius: 2px;
}

.edit-page .page-header h1 {
    font-size: 2rem;
    font-weight: 700;
    color: #1d1d1f;
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

.edit-page .page-header p {
    font-size: 1rem;
    color: #6c757d;
    margin: 0;
    font-weight: 500;
}

/* Edit Form Container */
.edit-page .form-container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08);
    padding: 30px;
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border: 1px solid rgba(0, 0, 0, 0.06);
    margin-bottom: 25px;
}

/* Edit Form Sections */
.edit-page .form-section {
    background: #ffffff;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid rgba(0, 0, 0, 0.04);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.04);
    transition: all 0.2s ease;
}

.edit-page .form-section:hover {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}

.edit-page .form-section h5 {
    color: #1d1d1f;
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 12px;
    border-bottom: 2px solid rgba(0, 122, 255, 0.1);
}

.edit-page .form-section h5 i {
    font-family: "Font Awesome 5 Free" !important;
    font-weight: 900;
    color: #007AFF;
    font-size: 1rem;
    padding: 6px;
    background: rgba(0, 122, 255, 0.1);
    border-radius: 8px;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Edit Form Controls */
.edit-page .form-label {
    font-weight: 600;
    color: #1d1d1f;
    margin-bottom: 6px;
    font-size: 0.9rem;
    letter-spacing: -0.01em;
}

.edit-page .form-control, .edit-page .form-select {
    border-radius: 10px;
    border: 2px solid rgba(0, 0, 0, 0.08);
    padding: 10px 14px;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    background: #fafafa;
}

.edit-page .form-control:focus, .edit-page .form-select:focus {
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.15);
    border-color: #007AFF;
    background: #ffffff;
    outline: none;
}

.edit-page .form-control:hover, .edit-page .form-select:hover {
    border-color: rgba(0, 122, 255, 0.3);
    background: #ffffff;
}

.edit-page textarea.form-control {
    resize: vertical;
    min-height: 70px;
}

/* Edit Form Buttons */
.edit-page .btn-submit {
    background: linear-gradient(135deg, #007AFF 0%, #5856D6 100%);
    border: 0;
    border-radius: 14px;
    padding: 12px 28px;
    font-weight: 600;
    font-size: 0.95rem;
    color: #ffffff;
    transition: all 0.2s ease;
    box-shadow: 0 3px 12px rgba(0, 122, 255, 0.3);
}

.edit-page .btn-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0, 122, 255, 0.4);
    color: #ffffff;
}

.edit-page .btn-cancel {
    background: #f8f9fa;
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-radius: 14px;
    padding: 12px 28px;
    font-weight: 600;
    font-size: 0.95rem;
    color: #6c757d;
    transition: all 0.2s ease;
}

.edit-page .btn-cancel:hover {
    background: #e9ecef;
    border-color: rgba(0, 0, 0, 0.2);
    color: #495057;
    transform: translateY(-1px);
}

/* Back Link */
.back-link {
    display: inline-block;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 10px;
    padding: 8px 14px;
    color: #007AFF;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
    transition: all 0.2s ease;
    border: 1px solid rgba(0, 122, 255, 0.1);
    backdrop-filter: blur(10px);
    margin-bottom: 20px;
}

.back-link:hover {
    background: #007AFF;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 3px 12px rgba(0, 122, 255, 0.3);
    text-decoration: none;
}

.back-link i {
    font-family: "Font Awesome 5 Free" !important;
    font-weight: 900;
    margin-right: 6px;
}

/* Edit Form Layout */
.edit-page .form-row {
    margin-bottom: 16px;
}

.edit-page .form-row:last-child {
    margin-bottom: 0;
}

/* Status Badges */
.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge.initial { background: #e3f2fd; color: #1976d2; }
.status-badge.progress { background: #fff3e0; color: #f57c00; }
.status-badge.completed { background: #e8f5e8; color: #388e3c; }
.status-badge.cancelled { background: #ffebee; color: #d32f2f; }

/* Button Group */
.btn-group {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 25px;
    padding-top: 25px;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

/* Edit Page Responsive */
@media (max-width: 768px) {
    .edit-page .form-container {
        padding: 25px 20px;
        margin: 0 15px;
    }
    
    .edit-page .page-header h1 {
        font-size: 2rem;
    }
    
    .edit-page .btn-group {
        flex-direction: column;
        align-items: center;
    }
    
    .edit-page .back-link {
        position: relative;
        top: auto;
        left: auto;
        margin-bottom: 20px;
        display: inline-block;
    }
}

/* ========================================
   FUNERAL VIEW STYLES
   ======================================== */

/* Detail Container */
.detail-container {
    background: white;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    margin-bottom: 16px;
}

/* Progress Section */
.progress-section {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 12px;
}

.progress-section h5 {
    color: #007AFF;
    margin-bottom: 12px;
    font-weight: 600;
    font-size: 0.95rem;
}

/* Step Items */
.step-item {
    display: flex;
    align-items: center;
    padding: 8px;
    margin-bottom: 6px;
    background: white;
    border-radius: 8px;
    border-left: 3px solid #e9ecef;
    transition: all 0.3s ease;
}

.step-item.completed {
    border-left-color: #24c17f;
    background: #eefaf4;
}

.step-item.in-progress {
    border-left-color: #ffc107;
    background: #fffdf7;
}

.step-item.pending {
    border-left-color: #6c757d;
    background: #f8f9fa;
}

.step-checkbox {
    width: 18px;
    height: 18px;
    margin-right: 10px;
    cursor: pointer;
}

.step-label {
    flex: 1;
    font-weight: 500;
    color: #495057;
    font-size: 0.85rem;
}

.step-item.completed .step-label {
    color: #28a745;
    text-decoration: line-through;
}

.step-date {
    font-size: 11px;
    color: #6c757d;
    margin-left: 8px;
}

.step-item.completed .step-date {
    color: #24c17f;
}

.done-badge {
    background: linear-gradient(135deg, #24c17f, #3bd69f);
    color: #fff;
    border-radius: 999px;
    padding: 3px 6px;
    font-size: 9px;
    margin-left: 6px;
    font-weight: 700;
}

/* Overall Progress */
.overall-progress {
    background: linear-gradient(135deg, #FF6B6B 0%, #4ECDC4 50%, #45B7D1 100%);
    color: white;
    border-radius: 12px;
    padding: 16px;
    text-align: center;
    margin-bottom: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.overall-progress .progress-circle {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 8px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.overall-progress p {
    font-size: 0.9rem;
    margin: 0;
    opacity: 0.95;
}

/* Notes Section */
.notes-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 16px;
    padding: 20px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.04);
    margin-bottom: 20px;
}

.notes-section h4 {
    color: #1d1d1f;
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 16px;
    text-align: center;
    letter-spacing: -0.01em;
}

.notes-section .section-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.1), transparent);
    margin: 20px 0;
}

/* Note Form */
.note-form {
    background: white;
    border-radius: 12px;
    padding: 16px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.03);
    margin-bottom: 20px;
}

.note-form textarea {
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    font-size: 0.9rem;
    resize: vertical;
    min-height: 100px;
    padding: 12px;
    transition: all 0.2s ease;
}

.note-form textarea:focus {
    border-color: #007AFF;
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
    outline: none;
}

.note-form .btn {
    border-radius: 10px;
    font-weight: 500;
    padding: 10px 20px;
    font-size: 0.9rem;
    background: #007AFF;
    border: none;
    transition: all 0.2s ease;
}

.note-form .btn:hover {
    background: #0056CC;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.3);
}

/* Activity Timeline */
.activity-timeline {
    background: white;
    border-radius: 12px;
    padding: 16px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.03);
}

.activity-timeline h4 {
    color: #1d1d1f;
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 16px;
    text-align: center;
    letter-spacing: -0.01em;
}

/* Timeline Styles */
.timeline {
    position: relative;
    padding-left: 25px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 12px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #e9ecef;
}

.timeline-item {
    position: relative;
    margin-bottom: 12px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -18px;
    top: 4px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #e9ecef;
}

.timeline-item.completed::before {
    background: #28a745;
}

.timeline-item.in-progress::before {
    background: #ffc107;
}

/* Note Items */
.note-item {
    background: #f8f9fa !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    border-radius: 10px !important;
    padding: 14px !important;
    margin-bottom: 12px;
    transition: all 0.2s ease;
}

.note-item:hover {
    background: #f1f3f4 !important;
    border-color: rgba(0, 0, 0, 0.12) !important;
    transform: translateY(-1px);
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.08);
}

.note-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.note-header strong {
    color: #007AFF;
    font-size: 0.9rem;
}

.note-date {
    color: #6c757d;
    font-size: 0.75rem;
    font-weight: 500;
}

.note-content {
    color: #1d1d1f;
    font-size: 0.9rem;
    line-height: 1.5;
    font-style: italic;
}

/* Info Cards */
.info-card {
    background: white;
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 12px;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.info-card h6 {
    font-size: 0.85rem;
    font-weight: 600;
    color: #007AFF;
    margin-bottom: 8px;
}

.info-card p {
    font-size: 0.8rem;
    margin-bottom: 4px;
    color: #495057;
}

.info-card p:last-child {
    margin-bottom: 0;
}

/* Compact Timeline */
.timeline.compact .timeline-item {
    margin-bottom: 8px;
}

.timeline.compact .timeline-item::before {
    left: -12px;
}

.timeline.compact .timeline-item.completed::before {
    background: #28a745;
}

.timeline.compact .timeline-item.in-progress::before {
    background: #ffc107;
}

.timeline.compact .step-item {
    padding: 6px 10px;
    border-radius: 6px;
    border-left: 2px solid #e9ecef;
}

.timeline.compact .step-item.completed {
    border-left-color: #24c17f;
    background: #eefaf4;
}

.timeline.compact .step-item.in-progress {
    border-left-color: #ffc107;
    background: #fffdf7;
}

.timeline.compact .step-item.pending {
    border-left-color: #6c757d;
    background: #f8f9fa;
}

.timeline.compact .step-checkbox {
    width: 16px;
    height: 16px;
    margin-right: 8px;
}

.timeline.compact .step-label {
    font-size: 0.8rem;
    font-weight: 400;
}

.timeline.compact .step-date {
    font-size: 0.75rem;
    color: #999;
}

.timeline.compact .done-badge {
    padding: 2px 5px;
    font-size: 7px;
    margin-left: 4px;
}

.timeline.compact .step-item.completed .step-label {
    color: #28a745;
    text-decoration: line-through;
}

.timeline.compact .step-item.in-progress .step-label {
    color: #ffc107;
}

.timeline.compact .step-item.pending .step-label {
    color: #6c757d;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 30px 20px;
    color: #6c757d;
    background: #f8f9fa;
    border-radius: 10px;
    border: 1px dashed rgba(0, 0, 0, 0.1);
}

.empty-state i {
    display: block;
    margin-bottom: 12px;
    opacity: 0.6;
}

.empty-state p {
    margin-bottom: 6px;
    font-weight: 500;
}

.empty-state small {
    opacity: 0.8;
}

/* Responsive Design */
@media (max-width: 991.98px) {
    .col-lg-4 {
        margin-top: 16px;
    }
}

@media (max-width: 768px) {
    .col-lg-4 {
        margin-top: 16px;
    }
    
    .notes-section .note-form {
        margin-bottom: 0;
        background: white;
        border-radius: 12px;
        padding: 16px;
        border: 1px solid rgba(0, 0, 0, 0.08);
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.03);
    }
    
    .notes-section .section-divider {
        margin: 20px 0;
        opacity: 0.6;
        height: 1px;
        background: linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.1), transparent);
    }
    
    .notes-section h4 {
        color: #1d1d1f;
        font-weight: 600;
        font-size: 1.2rem;
        margin-bottom: 20px;
        text-align: center;
        letter-spacing: -0.01em;
        position: relative;
        padding-bottom: 12px;
    }
    
    .notes-section h4::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 50%;
        transform: translateX(-50%);
        width: 40px;
        height: 2px;
        background: linear-gradient(90deg, #007AFF, #5856D6);
        border-radius: 1px;
    }
    
    .notes-section .timeline.compact {
        max-height: 350px;
        overflow-y: auto;
        padding-right: 8px;
        margin-top: 16px;
    }
    
    .notes-section .timeline.compact::-webkit-scrollbar {
        width: 4px;
    }
    
    .notes-section .timeline.compact::-webkit-scrollbar-track {
        background: #f1f1f1;
        border-radius: 2px;
    }
    
    .notes-section .timeline.compact::-webkit-scrollbar-thumb {
        background: #c1c1c1;
        border-radius: 2px;
    }
    
    .notes-section .timeline.compact::-webkit-scrollbar-thumb:hover {
        background: #a8a8a8;
    }
    
    .notes-section .note-form {
        margin-bottom: 0;
    }
    
    .notes-section .section-divider {
        margin: 20px 0;
        opacity: 0.6;
        height: 1px;
        background: linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.1), transparent);
    }
    
    .notes-section h4 {
        color: #1d1d1f;
        font-weight: 600;
        font-size: 1.2rem;
        margin-bottom: 20px;
        text-align: center;
        letter-spacing: -0.01em;
        position: relative;
        padding-bottom: 12px;
    }
    
    .notes-section h4::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 50%;
        transform: translateX(-50%);
        width: 40px;
        height: 2px;
        background: linear-gradient(90deg, #007AFF, #5856D6);
        border-radius: 1px;
    }
    
    .notes-section .note-item {
        background: #f8f9fa !important;
        border: 1px solid rgba(0, 0, 0, 0.08) !important;
        border-radius: 10px !important;
        padding: 14px !important;
        margin-bottom: 12px;
        transition: all 0.2s ease;
    }
    
    .notes-section .note-item:hover {
        background: #f1f3f4 !important;
        border-color: rgba(0, 0, 0, 0.12) !important;
        transform: translateY(-1px);
        box-shadow: 0 3px 12px rgba(0, 0, 0, 0.08);
    }
    
    .notes-section .note-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 8px;
        padding-bottom: 8px;
        border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    }
    
    .notes-section .note-header strong {
        color: #007AFF;
        font-size: 0.9rem;
    }
    
    .notes-section .note-date {
        color: #6c757d;
        font-size: 0.75rem;
        font-weight: 500;
    }
    
    .notes-section .note-content {
        color: #1d1d1f;
        font-size: 0.9rem;
        line-height: 1.5;
        font-style: italic;
    }
    
    .notes-section {
        margin-bottom: 24px;
    }
    
    .notes-section:last-child {
        margin-bottom: 0;
    }
    
    .notes-section .empty-state {
        text-align: center;
        padding: 20px;
        color: #6c757d;
        font-style: italic;
    }
    
    .notes-section .note-form textarea:focus {
        transform: translateY(-1px);
    }
    
    .notes-section .btn:hover {
        transform: translateY(-1px);
    }
    
    .col-lg-4 .notes-section {
        margin-bottom: 0;
    }
    
    .col-lg-8 .detail-container {
        margin-bottom: 20px;
    }
    
    .col-lg-8 .detail-container:last-child {
        margin-bottom: 0;
    }
    
    .funeral-view .container-fluid {
        max-width: 1400px;
        margin: 0 auto;
        padding: 0 20px;
    }
    
    .progress-section {
        margin-bottom: 10px;
    }
    
    .progress-section h5 {
        margin-bottom: 10px;
        font-size: 0.9rem;
    }
}

/* ========================================
   FUNERAL MANAGEMENT STYLES
   ======================================== */

/* Funeral Cards */
.funeral-management .funeral-card {
    background: white;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.funeral-management .funeral-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #007AFF, #5856D6, #FF2D92);
}

.funeral-management .funeral-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
}

.funeral-management .funeral-card h5 {
    color: #1d1d1f;
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 12px;
    letter-spacing: -0.01em;
}

.funeral-management .funeral-card .card-content {
    margin-bottom: 16px;
}

.funeral-management .funeral-card .info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

.funeral-management .funeral-card .info-row:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.funeral-management .funeral-card .info-label {
    color: #6c757d;
    font-size: 0.85rem;
    font-weight: 500;
}

.funeral-management .funeral-card .info-value {
    color: #1d1d1f;
    font-size: 0.9rem;
    font-weight: 600;
}

/* Status Badges */
.funeral-management .funeral-card .status-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.funeral-management .funeral-card .status-initial {
    background: #e3f2fd;
    color: #1976d2;
}

.funeral-management .funeral-card .status-progress {
    background: #fff3e0;
    color: #f57c00;
}

.funeral-management .funeral-card .status-completed {
    background: #e8f5e8;
    color: #388e3c;
}

.funeral-management .funeral-card .payment-badge {
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 0.7rem;
    font-weight: 600;
}

.funeral-management .funeral-card .payment-paid {
    background: #e8f5e8;
    color: #388e3c;
}

.funeral-management .funeral-card .payment-pending {
    background: #fff3e0;
    color: #f57c00;
}

/* Card Actions */
.funeral-management .funeral-card .card-actions {
    display: flex;
    gap: 10px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.funeral-management .funeral-card .btn {
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.funeral-management .funeral-card .btn:hover {
    transform: translateY(-1px);
}

/* Progress Indicator */
.funeral-management .progress-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
}

.funeral-management .progress-bar {
    flex: 1;
    height: 6px;
    background: #e9ecef;
    border-radius: 3px;
    overflow: hidden;
}

.funeral-management .progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #007AFF, #5856D6);
    border-radius: 3px;
    transition: width 0.3s ease;
}

.funeral-management .progress-text {
    font-size: 0.75rem;
    color: #6c757d;
    font-weight: 500;
    min-width: 60px;
    text-align: right;
}

/* Empty State */
.funeral-management .empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #6c757d;
    background: #f8f9fa;
    border-radius: 16px;
    border: 2px dashed rgba(0, 0, 0, 0.1);
    margin: 40px 0;
}

.funeral-management .empty-state i {
    font-size: 3rem;
    margin-bottom: 16px;
    opacity: 0.6;
    color: #007AFF;
}

.funeral-management .empty-state h3 {
    color: #1d1d1f;
    font-weight: 600;
    margin-bottom: 8px;
}

.funeral-management .empty-state p {
    margin-bottom: 20px;
    opacity: 0.8;
}

/* Dashboard Section */
.funeral-management .dashboard-section {
    background: #f8f9fa;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

/* Stats Cards */
.funeral-management .stats-card {
    display: flex;
    align-items: center;
    padding: 20px;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.funeral-management .stats-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
    border-color: rgba(0, 122, 255, 0.2);
}

.funeral-management .stats-icon {
    font-size: 2.5rem;
    color: #007AFF;
    margin-right: 20px;
    padding: 15px;
    background: rgba(0, 122, 255, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 70px;
    height: 70px;
}

.funeral-management .stats-icon i {
    font-family: "Font Awesome 5 Free" !important;
    font-weight: 900;
}

.funeral-management .stats-content h3 {
    font-size: 2rem;
    font-weight: 700;
    color: #1d1d1f;
    margin-bottom: 8px;
    line-height: 1;
}

.funeral-management .stats-content p {
    font-size: 0.95rem;
    color: #6c757d;
    margin: 0;
    font-weight: 500;
}

/* Progress Overview Card */
.funeral-management .progress-overview-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 20px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

.funeral-management .progress-overview-card h5 {
    margin-bottom: 20px;
    color: #1d1d1f;
    font-weight: 600;
    font-size: 1.1rem;
}

.funeral-management .progress-overview-card h5 i {
    font-family: "Font Awesome 5 Free" !important;
    font-weight: 900;
    color: #007AFF;
}

.funeral-management .progress-stats {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.funeral-management .progress-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

.funeral-management .progress-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.funeral-management .progress-label {
    font-size: 0.95rem;
    color: #1d1d1f;
    font-weight: 600;
    min-width: 140px;
    text-align: right;
}

.funeral-management .progress-bar-large {
    flex: 1;
    height: 12px;
    background: #e9ecef;
    border-radius: 6px;
    overflow: hidden;
    margin: 0 15px;
}

.funeral-management .progress-fill-large {
    height: 100%;
    background: linear-gradient(90deg, #007AFF, #5856D6);
    border-radius: 6px;
    transition: width 0.3s ease;
}

.funeral-management .progress-value {
    font-size: 1rem;
    color: #1d1d1f;
    font-weight: 700;
    min-width: 60px;
    text-align: left;
}

/* Status Breakdown */
.funeral-management .status-breakdown {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 15px;
}

.funeral-management .status-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
    color: #1d1d1f;
}

.funeral-management .status-dot.initial {
    background-color: #e3f2fd;
    border: 2px solid #1976d2;
}

.funeral-management .status-dot.progress {
    background-color: #fff3e0;
    border: 2px solid #f57c00;
}

.funeral-management .status-dot.completed {
    background-color: #e8f5e8;
    border: 2px solid #388e3c;
}

.funeral-management .status-legend {
    margin: 0 15px;
    text-align: center;
    font-size: 0.8rem;
    color: #6c757d;
}

/* Recent Activity Card */
.funeral-management .recent-activity-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 20px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

.funeral-management .recent-activity-card h5 {
    margin-bottom: 20px;
    color: #1d1d1f;
    font-weight: 600;
    font-size: 1.1rem;
}

.funeral-management .recent-activity-card h5 i {
    font-family: "Font Awesome 5 Free" !important;
    font-weight: 900;
    color: #007AFF;
}

.funeral-management .activity-list {
    max-height: 300px;
    overflow-y: auto;
    padding-right: 10px;
}

.funeral-management .activity-item {
    display: flex;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
    transition: all 0.2s ease;
}

.funeral-management .activity-item:hover {
    background: rgba(0, 122, 255, 0.02);
    border-radius: 8px;
    padding-left: 8px;
    padding-right: 8px;
}

.funeral-management .activity-item:last-child {
    border-bottom: none;
}

.funeral-management .activity-icon {
    font-size: 1.8rem;
    color: #007AFF;
    margin-right: 15px;
    padding: 10px;
    background: rgba(0, 122, 255, 0.08);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 50px;
    height: 50px;
}

.funeral-management .activity-icon i {
    font-family: "Font Awesome 5 Free" !important;
    font-weight: 900;
}

.funeral-management .activity-content {
    flex: 1;
}

.funeral-management .activity-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #1d1d1f;
    margin-bottom: 4px;
}

.funeral-management .activity-subtitle {
    font-size: 0.8rem;
    color: #6c757d;
}

.funeral-management .no-activity {
    text-align: center;
    padding: 40px 0;
    color: #6c757d;
}

.funeral-management .no-activity i {
    font-size: 3rem;
    margin-bottom: 10px;
    opacity: 0.6;
    color: #007AFF;
}

.funeral-management .no-activity p {
    margin-bottom: 0;
    font-weight: 500;
}

/* Arrangements Table */
.funeral-management .arrangements-table {
    border-collapse: separate;
    border-spacing: 0 10px;
    font-size: 0.9rem;
}

.funeral-management .arrangements-table th {
    background: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    color: #495057;
    padding: 12px 8px;
    text-align: center;
    vertical-align: middle;
}

.funeral-management .arrangements-table th:first-child {
    text-align: left;
}

.funeral-management .arrangements-table td {
    padding: 12px 8px;
    vertical-align: middle;
    border-bottom: 1px solid #f1f3f4;
    background-color: #ffffff;
}

.funeral-management .arrangements-table .progress-category {
    text-align: center;
}

.funeral-management .arrangements-table .progress-bar-small {
    width: 100%;
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 4px;
}

.funeral-management .arrangements-table .progress-fill-small {
    height: 100%;
    background: linear-gradient(90deg, #007AFF, #5856D6);
    transition: width 0.3s ease;
}

.funeral-management .arrangements-table .overall-progress {
    text-align: center;
}

.funeral-management .arrangements-table .progress-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 0.8rem;
    margin: 0 auto;
    background-color: #dc3545;
}

.funeral-management .arrangements-table .progress-circle.initial {
    background-color: #1976d2;
}

.funeral-management .arrangements-table .progress-circle.progress {
    background-color: #f57c00;
}

.funeral-management .arrangements-table .progress-circle.completed {
    background-color: #388e3c;
}

/* Filter Buttons */
.funeral-management .btn-group .btn {
    border-radius: 20px;
    margin-right: 8px;
    border: 1px solid #dee2e6;
    background: white;
    color: #6c757d;
    font-weight: 500;
    padding: 6px 16px;
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

.funeral-management .btn-group .btn:last-child {
    margin-right: 0;
}

.funeral-management .btn-group .btn:hover {
    background: #f8f9fa;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.funeral-management .btn-group .btn.active {
    background: #007AFF;
    border-color: #007AFF;
    color: white;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0, 122, 255, 0.3);
}

/* Specific Button Colors */
.funeral-management .btn-group .btn[onclick*="pending"] {
    color: #fd7e14;
    border-color: #fd7e14;
}

.funeral-management .btn-group .btn[onclick*="in-progress"] {
    color: #6f42c1;
    border-color: #6f42c1;
}

.funeral-management .btn-group .btn[onclick*="completed"] {
    color: #20c997;
    border-color: #20c997;
}

/* Status-based Row Highlighting */
.funeral-management .arrangement-row[data-status="completed"] {
    background-color: #f8fff9;
}

.funeral-management .arrangement-row[data-status="in-progress"] {
    background-color: #fffbf0;
}

.funeral-management .arrangement-row[data-status="initial"] {
    background-color: #f8f9fa;
}

/* Calendar Event Card */
.funeral-management .calendar-event-card {
    background: white;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    border-left: 4px solid #007AFF;
    transition: all 0.3s ease;
}

.funeral-management .calendar-event-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.funeral-management .event-date {
    text-align: center;
    margin-bottom: 12px;
    padding: 8px;
    background: #f8f9fa;
    border-radius: 8px;
}

.funeral-management .event-day {
    font-size: 1.5rem;
    font-weight: 700;
    color: #007AFF;
    line-height: 1;
}

.funeral-management .event-month {
    font-size: 0.9rem;
    color: #6c757d;
    text-transform: uppercase;
    font-weight: 600;
}

.funeral-management .event-details h6 {
    margin-bottom: 8px;
    color: #1d1d1f;
    font-weight: 600;
}

.funeral-management .event-details p {
    margin-bottom: 4px;
    font-size: 0.85rem;
    color: #6c757d;
}

.funeral-management .event-details i {
    width: 16px;
    color: #007AFF;
}

/* Checklist Styles */
.funeral-management .checklist-category {
    text-align: center;
}

.funeral-management .checklist-items {
    margin-bottom: 8px;
    text-align: left;
}

.funeral-management .checklist-item {
    display: flex;
    align-items: center;
    margin-bottom: 2px;
    font-size: 0.75rem;
    color: #6c757d;
}

.funeral-management .checklist-item i {
    margin-right: 6px;
    width: 12px;
}

.funeral-management .checklist-item.completed {
    color: #28a745;
}

.funeral-management .checklist-item.pending {
    color: #6c757d;
}

/* Weekly Calendar */
.funeral-management .weekly-calendar {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.funeral-management .calendar-header {
    display: grid;
    grid-template-columns: 80px repeat(7, 1fr);
    background: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
}

.funeral-management .time-column-header {
    padding: 16px 8px;
    text-align: center;
    font-weight: 600;
    color: #495057;
    background: #e9ecef;
    border-right: 1px solid #dee2e6;
}

.funeral-management .day-column-header {
    padding: 16px 8px;
    text-align: center;
    border-right: 1px solid #dee2e6;
    background: #f8f9fa;
}

.funeral-management .day-column-header:last-child {
    border-right: none;
}

.funeral-management .day-column-header.today {
    background: #e3f2fd;
    border-bottom: 3px solid #2196f3;
}

.funeral-management .day-name {
    font-weight: 600;
    color: #495057;
    font-size: 0.9rem;
    margin-bottom: 4px;
}

.funeral-management .day-date {
    color: #6c757d;
    font-size: 0.8rem;
}

.funeral-management .calendar-body {
    max-height: 600px;
    overflow-y: auto;
}

.funeral-management .time-row {
    display: grid;
    grid-template-columns: 80px repeat(7, 1fr);
    border-bottom: 1px solid #f1f3f4;
}

.funeral-management .time-row:hover {
    background: #f8f9fa;
}

.funeral-management .time-slot {
    padding: 12px 8px;
    text-align: center;
    font-weight: 600;
    color: #495057;
    background: #f8f9fa;
    border-right: 1px solid #dee2e6;
    font-size: 0.85rem;
}

.funeral-management .calendar-cell {
    padding: 8px;
    border-right: 1px solid #f1f3f4;
    min-height: 80px;
    cursor: default;
    transition: all 0.2s ease;
    position: relative;
}

.funeral-management .calendar-cell:last-child {
    border-right: none;
}

.funeral-management .calendar-cell.empty {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
}

.funeral-management .calendar-cell.booked {
    background: linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%);
    border: 2px solid #f44336;
    cursor: default;
    box-shadow: 0 2px 8px rgba(244, 67, 54, 0.2);
}

.funeral-management .calendar-cell.today {
    background: #e3f2fd;
}

.funeral-management .calendar-cell.today.empty {
    background: #e8f4fd;
}

.funeral-management .calendar-cell.today.booked {
    background: linear-gradient(135deg, #e8f4fd 0%, #ffebee 100%);
    border-color: #f44336;
}

.funeral-management .empty-slot {
    text-align: center;
    padding: 20px 0;
    color: #6c757d;
}

.funeral-management .empty-slot i {
    font-size: 1.2rem;
    margin-bottom: 4px;
    display: block;
    opacity: 0.6;
}

.funeral-management .booking-info {
    font-size: 0.7rem;
    line-height: 1.3;
    text-align: left;
    padding: 6px;
}

.funeral-management .booking-info > div {
    margin-bottom: 4px;
    display: flex;
    align-items: center;
}

.funeral-management .booking-info > div:last-child {
    margin-bottom: 0;
}

.funeral-management .deceased-name {
    font-weight: 600;
    color: #c62828;
    margin-bottom: 6px;
    font-size: 0.8rem;
    border-bottom: 1px solid rgba(198, 40, 40, 0.2);
    padding-bottom: 4px;
}

.funeral-management .deceased-name i {
    color: #c62828;
    margin-right: 6px;
}

.funeral-management .service-type,
.funeral-management .location,
.funeral-management .staff-assigned {
    color: #c62828;
    font-size: 0.65rem;
}

.funeral-management .service-type i,
.funeral-management .location i,
.funeral-management .staff-assigned i {
    width: 12px;
    margin-right: 6px;
    color: #c62828;
    opacity: 0.8;
}

.funeral-management .service-status {
    margin-top: 6px;
    text-align: center;
}

.funeral-management .service-status .badge {
    font-size: 0.6rem;
    padding: 4px 8px;
    border-radius: 12px;
    font-weight: 500;
}

.funeral-management .service-status .badge i {
    font-size: 0.5rem;
}

.funeral-management .slot-time {
    font-size: 0.6rem;
    color: #c62828;
    font-weight: 600;
    text-align: center;
    margin-bottom: 4px;
    background: rgba(198, 40, 40, 0.1);
    padding: 2px 4px;
    border-radius: 3px;
    border: 1px solid rgba(198, 40, 40, 0.2);
}

/* Funeral Management Responsive */
@media (max-width: 768px) {
    .funeral-management .funeral-card {
        padding: 16px;
    }
    
    .funeral-management .funeral-card .card-actions {
        flex-direction: column;
    }
    
    .funeral-management .funeral-card .btn {
        width: 100%;
    }
    
    .funeral-management .weekly-calendar {
        overflow-x: auto;
    }
    
    .funeral-management .calendar-header,
    .funeral-management .time-row {
        min-width: 800px;
    }
    
    .funeral-management .booking-info .service-status {
        margin-top: 3px;
    }
    
    .funeral-management .booking-info .badge {
        font-size: 0.6rem;
        padding: 2px 6px;
    }
    
    .funeral-management .booking-info i {
        width: 10px;
        font-size: 0.6rem;
    }
    
    /* Remove interactive behavior */
    .funeral-management .calendar-cell:hover,
    .funeral-management .calendar-cell:active,
    .funeral-management .calendar-cell:focus {
        transform: none !important;
        box-shadow: none !important;
        cursor: default !important;
        outline: none !important;
        border-color: inherit !important;
    }
    
    .funeral-management .calendar-cell * {
        pointer-events: none;
        user-select: none;
    }
}

@media (max-width: 1200px) {
    .funeral-management .weekly-calendar {
        font-size: 0.8rem;
    }
    
    .funeral-management .calendar-cell {
        padding: 4px;
        min-height: 70px;
    }
    
    .funeral-management .booking-info {
        font-size: 0.65rem;
    }
}

/* ========================================
   FUNERAL DASHBOARD STYLES
   ======================================== */

/* Dashboard Container */
.dashboard-container {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

/* Statistics Cards */
.stats-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 20px;
    text-align: center;
}

.stats-card h3 {
    color: white;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.stats-number {
    font-size: 3rem;
    font-weight: bold;
    margin-bottom: 10px;
}

.stats-card.blue { 
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%); 
}

.stats-card.green { 
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%); 
}

.stats-card.orange { 
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%); 
}

.stats-card.purple { 
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%); 
}

/* Upcoming Services Card */
.upcoming-card {
    background: white;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    border-left: 4px solid #667eea;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.upcoming-card h5 {
    color: #667eea;
    margin-bottom: 15px;
}

.upcoming-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    margin-bottom: 10px;
}

.upcoming-item:last-child {
    margin-bottom: 0;
}

.upcoming-info h6 {
    margin-bottom: 5px;
    color: #495057;
}

.upcoming-info p {
    margin-bottom: 0;
    color: #6c757d;
    font-size: 0.9rem;
}

.upcoming-date {
    text-align: right;
    color: #667eea;
    font-weight: 600;
}

/* Recent Services Card */
.recent-card {
    background: white;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    border-left: 4px solid #28a745;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.recent-card h5 {
    color: #28a745;
    margin-bottom: 15px;
}

.recent-item {
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    margin-bottom: 10px;
    border-left: 3px solid #28a745;
}

.recent-item:last-child {
    margin-bottom: 0;
}

.recent-item h6 {
    margin-bottom: 5px;
    color: #495057;
}

.recent-item p {
    margin-bottom: 5px;
    color: #6c757d;
    font-size: 0.9rem;
}

/* Status Badges */
.status-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
}

.status-initial { 
    background-color: #e3f2fd; 
    color: #1976d2; 
}

.status-progress { 
    background-color: #fff3e0; 
    color: #f57c00; 
}

.status-completed { 
    background-color: #e8f5e8; 
    color: #388e3c; 
}

/* Quick Actions */
.quick-actions {
    margin-top: 20px;
    text-align: center;
}

.btn-dashboard {
    border-radius: 25px;
    padding: 12px 25px;
    font-weight: 600;
    margin: 0 10px;
    transition: all 0.3s ease;
}

.btn-dashboard:hover {
    transform: translateY(-2px);
}

/* Funeral Dashboard Responsive */
@media (max-width: 768px) {
    .dashboard-container {
        padding: 20px;
        margin-bottom: 20px;
    }
    
    .stats-card {
        padding: 20px;
        margin-bottom: 15px;
    }
    
    .stats-number {
        font-size: 2.5rem;
    }
    
    .upcoming-card,
    .recent-card {
        padding: 15px;
        margin-bottom: 15px;
    }
    
    .btn-dashboard {
        display: block;
        width: 100%;
        margin: 10px 0;
    }
    
    .quick-actions {
        text-align: center;
    }
}

/* Overtime Management Styles */
/* View Container */
.view-container {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    margin: 20px 0;
}

/* Form Container */
.form-container {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    margin: 20px 0;
}

/* Info Cards */
.info-card {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 25px;
    border: 1px solid #e9ecef;
    height: 100%;
}

.card-title {
    color: #1d1d1f;
    font-weight: 600;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #007AFF;
}

/* Info Rows */
.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #dee2e6;
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    font-weight: 600;
    color: #6e6e73;
    font-size: 14px;
}

.info-value {
    color: #1d1d1f;
    font-weight: 500;
    font-size: 14px;
}

/* Overtime Types */
.overtime-type {
    text-align: center;
    padding: 20px;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.overtime-type.active {
    background: rgba(0,122,255,0.1);
    border: 2px solid #007AFF;
}

.overtime-type.inactive {
    background: #f8f9fa;
    border: 2px solid #dee2e6;
}

.overtime-type i {
    color: #6e6e73;
}

.overtime-type.active i {
    color: #007AFF;
}

/* Status Badges */
.status-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

/* Total Section */
.total-section {
    text-align: center;
    padding: 20px;
    background: rgba(52,199,89,0.1);
    border-radius: 12px;
    border: 2px solid #34C759;
}

.count-display, .cost-display {
    text-align: center;
}

.count-number, .cost-number {
    font-size: 32px;
    font-weight: 700;
    color: #34C759;
}

.cost-display .cost-number {
    color: #007AFF;
}

/* Notes */
.notes-text {
    background: white;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #007AFF;
    font-style: italic;
    color: #1d1d1f;
}

/* Form Elements */
.form-label {
    font-weight: 600;
    color: #1d1d1f;
    margin-bottom: 8px;
}

.form-control {
    border-radius: 12px;
    border: 2px solid #e9ecef;
    padding: 12px 16px;
    transition: all 0.2s ease;
}

.form-control:focus {
    border-color: #007AFF;
    box-shadow: 0 0 0 0.2rem rgba(0,122,255,0.25);
}

.form-check-input:checked {
    background-color: #007AFF;
    border-color: #007AFF;
}

/* Buttons */
.btn {
    border-radius: 12px;
    padding: 12px 24px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-primary {
    background: #007AFF;
    border-color: #007AFF;
}

.btn-primary:hover {
    background: #0056CC;
    border-color: #0056CC;
}

.btn-warning {
    background: #ffc107;
    border-color: #ffc107;
    color: #000;
}

.btn-warning:hover {
    background: #e0a800;
    border-color: #d39e00;
}

/* Cards */
.card {
    border-radius: 15px;
    transition: transform 0.2s ease;
}

.card:hover {
    transform: translateY(-2px);
}

.bg-gradient-success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
}

/* Badges */
.badge {
    font-size: 0.75rem;
    padding: 0.5em 0.75em;
}

/* Tables */
.table th {
    border-top: none;
    font-weight: 600;
    color: #6e6e73;
    font-size: 0.875rem;
}

.table td {
    vertical-align: middle;
    font-size: 0.875rem;
}

.btn-group-sm .btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
}

/* Code Elements */
code {
    background: #e9ecef;
    padding: 4px 8px;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    font-size: 13px;
}

/* Avatar */
.avatar-sm {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.avatar-sm i {
    font-size: 24px;
}

/* Apple-style Overtime Management Design */
/* Header Styling */
.header-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #007AFF 0%, #5856D6 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    box-shadow: 0 8px 32px rgba(0, 122, 255, 0.3);
}

.header-icon i {
    font-size: 36px;
    color: white;
}

.display-4 {
    font-weight: 700;
    letter-spacing: -0.02em;
}

.lead {
    font-size: 1.25rem;
    font-weight: 400;
    color: #6e6e73;
}

/* Empty State */
.empty-state-icon {
    width: 120px;
    height: 120px;
    background: #f2f2f7;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

.empty-state-icon i {
    font-size: 48px;
    color: #8e8e93;
}

/* Summary Cards */
.summary-card {
    background: white;
    border-radius: 20px;
    padding: 30px 20px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #f2f2f7;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100%;
}

.summary-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.card-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    font-size: 24px;
}

.saturday-card .card-icon {
    background: rgba(255, 193, 7, 0.15);
    color: #ff9500;
}

.sunday-card .card-icon {
    background: rgba(0, 122, 255, 0.15);
    color: #007AFF;
}

.after-hours-card .card-icon {
    background: rgba(88, 86, 214, 0.15);
    color: #5856D6;
}

.total-count-card .card-icon {
    background: rgba(52, 199, 89, 0.15);
    color: #34C759;
}

.total-cost-card .card-icon {
    background: linear-gradient(135deg, #34C759 0%, #30D158 100%);
    color: white;
}

.card-title {
    font-size: 14px;
    font-weight: 600;
    color: #6e6e73;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.card-number {
    font-size: 32px;
    font-weight: 700;
    color: #1d1d1f;
    margin-bottom: 8px;
    line-height: 1;
}

.card-subtitle {
    color: #8e8e93;
    font-size: 12px;
    font-weight: 500;
}

/* Section Headers */
.section-header {
    margin-bottom: 30px;
}

.section-title {
    font-size: 28px;
    font-weight: 700;
    color: #1d1d1f;
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

.section-subtitle {
    color: #6e6e73;
    font-size: 16px;
    margin: 0;
}

/* Export Section */
.export-section {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #f2f2f7;
}

.export-form .form-label {
    font-weight: 600;
    color: #1d1d1f;
    margin-bottom: 8px;
    font-size: 14px;
}

.export-form .form-control,
.export-form .form-select {
    border-radius: 12px;
    border: 2px solid #f2f2f7;
    padding: 12px 16px;
    transition: all 0.2s ease;
    background: #f9f9f9;
}

.export-form .form-control:focus,
.export-form .form-select:focus {
    border-color: #007AFF;
    background: white;
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

/* Records Section */
.records-section {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #f2f2f7;
}

.table-container {
    background: #f9f9f9;
    border-radius: 16px;
    padding: 20px;
}

.table {
    margin: 0;
    background: white;
    border-radius: 12px;
    overflow: hidden;
}

.table th {
    background: #f2f2f7;
    border: none;
    font-weight: 600;
    color: #6e6e73;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 20px 16px;
}

.table td {
    padding: 20px 16px;
    border-bottom: 1px solid #f2f2f7;
    vertical-align: middle;
    font-size: 14px;
}

.table tbody tr:hover {
    background: #f9f9f9;
}

/* Badges */
.badge {
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.saturday-badge {
    background: rgba(255, 193, 7, 0.15);
    color: #ff9500;
    border: 1px solid rgba(255, 193, 7, 0.3);
}

.sunday-badge {
    background: rgba(0, 122, 255, 0.15);
    color: #007AFF;
    border: 1px solid rgba(0, 122, 255, 0.3);
}

.after-hours-badge {
    background: rgba(88, 86, 214, 0.15);
    color: #5856D6;
    border: 1px solid rgba(88, 86, 214, 0.3);
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.btn-action {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    transition: all 0.2s ease;
    font-size: 14px;
}

.btn-view {
    background: rgba(0, 122, 255, 0.15);
    color: #007AFF;
}

.btn-view:hover {
    background: #007AFF;
    color: white;
    transform: scale(1.1);
}

.btn-edit {
    background: rgba(255, 193, 7, 0.15);
    color: #ff9500;
}

.btn-edit:hover {
    background: #ff9500;
    color: white;
    transform: scale(1.1);
}

.btn-delete {
    background: rgba(255, 59, 48, 0.15);
    color: #ff3b30;
}

.btn-delete:hover {
    background: #ff3b30;
    color: white;
    transform: scale(1.1);
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-icon {
        width: 60px;
        height: 60px;
    }
    
    .header-icon i {
        font-size: 28px;
    }
    
    .display-4 {
        font-size: 2rem;
    }
    
    .summary-card {
        padding: 20px 15px;
    }
    
    .card-number {
        font-size: 24px;
    }
    
    .export-section,
    .records-section {
        padding: 20px;
    }
    
    .action-buttons {
        flex-direction: column;
        gap: 4px;
    }
    
    .btn-action {
        width: 32px;
        height: 32px;
        font-size: 12px;
    }
}

/* Purchase Orders Styles */
/* Back Button */
.back-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5em;
    padding: 0.6em 1.2em;
    background: #7b1fa2;
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(123, 31, 162, 0.2);
    margin-bottom: 1.5em;
    border: none;
    cursor: pointer;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.back-button:hover {
    background: #6a1b9a;
    color: #fff;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(123, 31, 162, 0.3);
    transform: translateY(-1px);
}

.back-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(123, 31, 162, 0.2);
}

.back-button i {
    font-size: 0.9em;
}

/* Dashboard Container */
.dashboard-container {
    max-width: 1200px;
    margin: 3.5em auto 0 auto;
    padding: 2em 1em;
    background: #f8f9fb;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(123, 31, 162, 0.04);
}

/* Export Section Styling */
.export-section {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 20px;
    padding: 24px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    margin-bottom: 24px;
}

.export-section-header {
    margin-bottom: 20px;
    text-align: center;
}

.export-title {
    font-size: 20px;
    font-weight: 600;
    color: #1d1d1f;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.export-subtitle {
    color: #64748b;
    font-size: 14px;
    margin: 0;
}

.export-form-container {
    background: #fff;
    border-radius: 16px;
    padding: 20px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.export-form {
    margin: 0;
}

.export-form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    align-items: end;
}

.form-group {
    margin: 0;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 12px;
    font-weight: 600;
    color: #374151;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.2s ease;
    background: #fff;
    color: #1d1d1f;
}

.form-control:focus {
    outline: none;
    border-color: #7b1fa2;
    box-shadow: 0 0 0 3px rgba(123, 31, 162, 0.1);
}

.export-btn-group {
    display: flex;
    align-items: end;
}

.export-btn {
    background: linear-gradient(135deg, #7b1fa2 0%, #6a1b9a 100%);
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 160px;
    box-shadow: 0 4px 12px rgba(123, 31, 162, 0.3);
}

.export-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(123, 31, 162, 0.4);
}

.export-btn:active {
    transform: translateY(0);
}

.export-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* PO Toolbar */
.po-toolbar {
    display: flex;
    align-items: center;
    gap: 1em;
    margin-bottom: 1.2em;
    flex-wrap: wrap;
}

/* PO Search Bar */
.po-search-bar {
    display: flex;
    align-items: center;
    gap: 0.7em;
    background: #fff;
    border-radius: 8px;
    padding: 0.4em 1em;
    font-size: 0.97rem;
    border: 1px solid #ececec;
    box-shadow: 0 1px 4px rgba(123, 31, 162, 0.02);
    width: 100%;
    max-width: 350px;
    margin-bottom: 1.1em;
}

.po-search-bar input[type="text"] {
    border: none;
    background: transparent;
    outline: none;
    font-size: 0.97rem;
    flex: 1;
    color: #1d1d1f;
}

/* PO Table Report */
.po-table-report {
    width: 100%;
    border-collapse: separate;
    background: #fff;
    font-size: 1rem;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(123, 31, 162, 0.04);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.po-table-report thead th {
    background: #f7f7fa;
    color: #86868b;
    font-weight: 600;
    font-size: 0.93rem;
    padding: 0.75rem 0.6rem;
    border-bottom: 1.5px solid #ececec;
    text-align: left;
    letter-spacing: 0.01em;
    user-select: none;
}

.po-table-report tbody tr {
    background: #fff;
    transition: background 0.18s;
}

.po-table-report tbody tr:nth-child(even) {
    background: #f8f9fb;
}

.po-table-report tbody tr:hover {
    background: #f0f4fa;
}

.po-table-report td {
    padding: 0.85rem 0.6rem;
    font-size: 1rem;
    color: #222;
    border-bottom: 1px solid #ececec;
    vertical-align: middle;
    text-align: left;
    max-width: 200px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.po-table-report td.line-items-cell {
    max-width: 260px;
    background: #f5f5f7;
    border-radius: 8px;
    padding: 0.7em 1em;
    white-space: normal;
    color: #444;
    font-size: 0.97em;
}

/* PO Actions */
.po-actions-flex {
    display: flex;
    gap: 0.4em;
    align-items: center;
}

.po-action-btn {
    min-width: 80px;
    padding: 0.38em 0.7em;
    font-size: 0.97em;
    font-weight: 500;
    border: 1px solid #ececec;
    background: #f7f7fa;
    color: #7b1fa2;
    margin-right: 0.2em;
    transition: background 0.18s, color 0.18s, box-shadow 0.18s;
    cursor: pointer;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    box-shadow: 0 1px 4px rgba(123, 31, 162, 0.03);
}

.po-action-btn.approve {
    color: #34c759;
    border-color: #b2f7ef;
    background: #e6f9ed;
}

.po-action-btn.decline {
    color: #ff3b30;
    border-color: #ffd6e0;
    background: #ffeaea;
}

.po-action-btn:active {
    background: #f5f5f7;
}

.po-action-btn.view-pdf {
    color: #007aff;
    border-color: #b3d9ff;
    background: #e6f3ff;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.po-action-btn.view-pdf:hover {
    background: #d1e7ff;
    color: #0056b3;
    text-decoration: none;
}

.po-action-btn.view-pdf:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(76, 175, 80, 0.2);
}

.po-action-btn.delete {
    color: #ff3b30;
    border-color: #ffd6e0;
    background: #ffeaea;
}

.po-action-btn.delete:hover {
    background: #ffd6e0;
}

/* PO Cards */
.po-po-card {
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 2px 12px rgba(123, 31, 162, 0.06);
    margin-bottom: 2.2em;
    border: 1.5px solid #ececec;
    overflow: hidden;
    transition: box-shadow 0.18s;
}

.po-po-card:hover {
    box-shadow: 0 6px 24px rgba(123, 31, 162, 0.10);
}

.po-po-card .po-table-report {
    box-shadow: none;
    border-radius: 0;
    margin-bottom: 0;
}

/* PO Line Items */
.po-line-items-list {
    background: #f7f7fa;
    border-radius: 0 0 14px 14px;
    padding: 1.1em 2em 1.1em 2.5em;
    font-size: 0.97em;
    color: #444;
    border-top: 1px solid #ececec;
    margin: 0;
}

.po-line-items-list ul {
    margin: 0;
    padding-left: 1.2em;
}

/* Purchase Orders Responsive Design */
@media (max-width: 768px) {
    .export-form-row {
        grid-template-columns: 1fr;
    }
    
    .export-btn-group {
        grid-column: 1 / -1;
    }
}

@media (max-width: 900px) {
    .dashboard-container {
        padding: 1em 0.2em;
    }
    
    .po-table-report thead th, 
    .po-table-report td {
        font-size: 0.93em;
        padding: 0.6em 0.3em;
    }
    
    .po-line-items-list {
        font-size: 1em;
        padding: 1em 1em 1em 1.2em;
    }
}

@media (max-width: 600px) {
    .dashboard-container {
        padding: 0.5em 0.1em;
    }
    
    .po-search-bar {
        max-width: 100%;
        font-size: 1em;
        margin-bottom: 1em;
        border-radius: 8px;
        padding: 0.6em 0.7em;
    }
    
    .po-table-report {
        font-size: 0.93em;
        min-width: 600px;
    }
    
    .po-table-report thead th, 
    .po-table-report td {
        font-size: 0.93em;
        padding: 0.6em 0.3em;
    }
    
    .po-table-report td.line-items-cell {
        padding: 0.7em 0.5em;
    }
    
    .po-po-card {
        border-radius: 14px;
        margin-bottom: 1.2em;
    }
    
    .po-line-items-list {
        font-size: 1.08em;
        padding: 1em 0.7em 1em 1.1em;
        border-radius: 0 0 10px 10px;
    }
}

/* Funeral Add Form - Apple Style Design */
.funeral-form-container {
    background: white;
    border-radius: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #f2f2f7;
    overflow: hidden;
    margin-bottom: 2rem;
}

/* Form Header */
.funeral-form-header {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    padding: 2.5rem;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.header-content {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.header-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 32px rgba(102, 126, 234, 0.3);
}

.header-icon i {
    font-size: 24px;
    color: white;
}

.header-text {
    flex: 1;
}

.form-title {
    font-size: 2rem;
    font-weight: 700;
    color: #1d1d1f;
    margin: 0 0 0.5rem 0;
    letter-spacing: -0.02em;
}

.form-subtitle {
    color: #6e6e73;
    font-size: 1rem;
    margin: 0;
    line-height: 1.5;
}

.header-actions {
    display: flex;
    align-items: center;
}

.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: white;
    color: #667eea;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.9rem;
    border: 2px solid #e2e8f0;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.btn-back:hover {
    background: #f8fafc;
    border-color: #667eea;
    color: #667eea;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.15);
    text-decoration: none;
}

/* Form Sections */
.funeral-form {
    padding: 2rem 2.5rem;
}

.form-section {
    margin-bottom: 2.5rem;
    padding: 2rem;
    background: #fafbfc;
    border-radius: 16px;
    border: 1px solid #f1f5f9;
    transition: all 0.2s ease;
}

.form-section:hover {
    background: #f8fafc;
    border-color: #e2e8f0;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

.section-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e2e8f0;
}

.section-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.2);
}

.section-icon i {
    font-size: 16px;
    color: white;
}

.section-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1d1d1f;
    margin: 0;
}

/* Form Grid */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.form-field {
    display: flex;
    flex-direction: column;
}

.form-field.full-width {
    grid-column: 1 / -1;
}

.field-label {
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.field-label.required::after {
    content: ' *';
    color: #ef4444;
}

/* Form Inputs */
.field-input,
.field-select,
.field-textarea {
    padding: 0.875rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 0.95rem;
    background: white;
    color: #1d1d1f;
    transition: all 0.2s ease;
    font-family: inherit;
}

.field-input:focus,
.field-select:focus,
.field-textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    background: white;
}

.field-input:hover,
.field-select:hover,
.field-textarea:hover {
    border-color: #d1d5db;
}

.field-textarea {
    resize: vertical;
    min-height: 80px;
}

/* Input Group */
.input-group {
    display: flex;
    align-items: center;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.2s ease;
}

.input-group:focus-within {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.input-prefix {
    padding: 0.875rem 1rem;
    background: #f9fafb;
    color: #6b7280;
    font-weight: 600;
    border-right: 1px solid #e5e7eb;
    font-size: 0.9rem;
}

.input-group .field-input {
    border: none;
    border-radius: 0;
    box-shadow: none;
    flex: 1;
}

.input-group .field-input:focus {
    box-shadow: none;
}

/* Form Actions */
.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    padding-top: 2rem;
    border-top: 1px solid #e2e8f0;
    margin-top: 2rem;
}

.btn-cancel {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    background: white;
    color: #6b7280;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.9rem;
    border: 2px solid #e5e7eb;
    transition: all 0.2s ease;
}

.btn-cancel:hover {
    background: #f9fafb;
    border-color: #d1d5db;
    color: #374151;
    transform: translateY(-1px);
    text-decoration: none;
}

.btn-submit {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.3);
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.4);
}

.btn-submit:active {
    transform: translateY(0);
}

/* Field Error States */
.field-error {
    border-color: #ef4444 !important;
    background: #fef2f2 !important;
}

.field-error:focus {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1) !important;
}

/* Apple-Style Toast Notifications (global) */
.apple-notification-container {
    position: fixed;
    top: 18px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 99999;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    width: min(520px, calc(100vw - 24px));
    padding: 0 8px;
}

.apple-notification {
    background: #1c1c1e;
    border-radius: 999px;
    padding: 11px 12px 11px 14px;
    width: fit-content;
    max-width: 100%;
    min-width: 220px;
    box-shadow:
        0 10px 28px rgba(15, 23, 42, 0.22),
        0 2px 8px rgba(15, 23, 42, 0.12);
    transform: translateY(-24px) scale(0.96);
    opacity: 0;
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.28s ease;
    pointer-events: auto;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #ffffff;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: -0.01em;
    line-height: 1.3;
    z-index: 99999;
    position: relative;
}

.apple-notification.show {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.apple-notification.hide {
    transform: translateY(-18px) scale(0.96);
    opacity: 0;
}

.apple-notification-icon {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.apple-notification-badge {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #ffffff;
    color: #1c1c1e;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 800;
    line-height: 1;
}

.apple-notification-content {
    flex: 1 1 auto;
    word-wrap: break-word;
    padding-right: 2px;
}

.apple-notification-close {
    flex-shrink: 0;
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.18);
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.18s ease, transform 0.18s ease;
    border: none;
    color: #ffffff;
    font-size: 12px;
    padding: 0;
    line-height: 1;
}

.apple-notification-close:hover {
    background: rgba(255, 255, 255, 0.28);
}

.apple-notification-close:active {
    transform: scale(0.94);
}

.apple-notification.apple-notification-success {
    background: #34c759;
}
.apple-notification.apple-notification-success .apple-notification-badge {
    color: #34c759;
}

.apple-notification.apple-notification-error {
    background: #ff3b30;
    padding: 11px 12px 11px 14px;
    text-align: left;
    color: #ffffff;
    font-size: 14px;
}
.apple-notification.apple-notification-error .apple-notification-badge {
    color: #ff3b30;
}

.apple-notification.apple-notification-warning {
    background: #ff9500;
}
.apple-notification.apple-notification-warning .apple-notification-badge {
    color: #ff9500;
}

.apple-notification.apple-notification-info {
    background: #007aff;
}
.apple-notification.apple-notification-info .apple-notification-badge {
    color: #007aff;
}

@media (max-width: 640px) {
    .apple-notification-container {
        top: 12px;
        width: calc(100vw - 16px);
    }

    .apple-notification {
        width: 100%;
        max-width: 100%;
        font-size: 13px;
        padding: 10px 10px 10px 12px;
    }
}

/* Apple-Style Confirmation Dialog */
.apple-confirm {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border-radius: 20px;
    padding: 24px 28px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.2);
    min-width: 300px;
    max-width: 400px;
    z-index: 99999;
    opacity: 0;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.apple-confirm.show {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
}

.apple-confirm-content {
    text-align: center;
}

.apple-confirm-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    background: linear-gradient(135deg, #ff3b30 0%, #d32f2f 100%);
    color: white;
}

.apple-confirm-message {
    font-size: 15px;
    color: #86868b;
    line-height: 1.4;
    margin-bottom: 24px;
    text-align: left;
}

.apple-confirm-buttons {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.apple-confirm-button {
    border: none;
    border-radius: 12px;
    padding: 10px 24px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    letter-spacing: -0.2px;
    min-width: 80px;
}

.apple-confirm-button.cancel {
    background: rgba(0, 0, 0, 0.05);
    color: #1d1d1f;
}

.apple-confirm-button.cancel:hover {
    background: rgba(0, 0, 0, 0.1);
    transform: scale(1.02);
}

.apple-confirm-button.delete {
    background: #ff3b30;
    color: white;
}

.apple-confirm-button.delete:hover {
    background: #d32f2f;
    transform: scale(1.02);
}

.apple-confirm-button.confirm {
    background: #007aff;
    color: white;
}

.apple-confirm-button.confirm:hover {
    background: #0066d6;
    transform: scale(1.02);
}

.apple-confirm-neutral .apple-confirm-icon {
    background: linear-gradient(135deg, #007aff 0%, #5856d6 100%);
}

.apple-confirm-title {
    font-size: 17px;
    font-weight: 700;
    color: #1d1d1f;
    letter-spacing: -0.02em;
    margin: 0 0 8px;
    text-align: center;
}

.apple-confirm-button:active {
    transform: scale(0.98);
}

.apple-confirm-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 99998;
    opacity: 0;
    transition: opacity 0.3s;
}

.apple-confirm-backdrop.show {
    opacity: 1;
}

/* Responsive Design */
@media (max-width: 768px) {
    .funeral-form-header {
        padding: 1.5rem;
        flex-direction: column;
        text-align: center;
    }
    
    .header-content {
        flex-direction: column;
        text-align: center;
    }
    
    .form-title {
        font-size: 1.5rem;
    }
    
    .funeral-form {
        padding: 1.5rem;
    }
    
    .form-section {
        padding: 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .btn-cancel,
    .btn-submit {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .funeral-form-header {
        padding: 1rem;
    }
    
    .header-icon {
        width: 48px;
        height: 48px;
    }
    
    .header-icon i {
        font-size: 20px;
    }
    
    .form-title {
        font-size: 1.25rem;
    }
    
    .funeral-form {
        padding: 1rem;
    }
    
    .form-section {
        padding: 1rem;
    }
}

/* ... existing code ... */

/* Apple-Style Admin Design - Mobile Optimized & Compact */
.admin-container {
    display: flex;
    min-height: 100vh;
    background: transparent;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    padding: 1rem;
    gap: 1.5rem;
}

/* Enhanced Sidebar */
.admin-sidebar {
    width: 260px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(25px);
    border-radius: 20px;
    padding: 1.5rem;
    height: fit-content;
    position: sticky;
    top: 1rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.sidebar-header {
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    margin-bottom: 1.5rem;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.profile-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.3);
}

.profile-info .username {
    font-size: 1rem;
    font-weight: 700;
    color: #1d1d1f;
    margin: 0 0 0.375rem 0;
    letter-spacing: -0.01em;
}

.role-badge {
    background: rgba(0, 113, 227, 0.15);
    color: #0071e3;
    padding: 0.25rem 0.75rem;
    border-radius: 16px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: capitalize;
    border: 1px solid rgba(0, 113, 227, 0.2);
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.25rem;
    text-decoration: none;
    color: #86868b;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 14px;
    font-weight: 500;
    font-size: 0.9rem;
}

.nav-item:hover {
    background: rgba(0, 113, 227, 0.08);
    color: #0071e3;
    transform: translateX(3px);
}

.nav-item.active {
    background: rgba(0, 113, 227, 0.12);
    color: #0071e3;
    box-shadow: 0 4px 16px rgba(0, 113, 227, 0.15);
}

.nav-icon {
    width: 18px;
    text-align: center;
    font-size: 0.9rem;
}

/* Main Content Area */
.admin-main {
    flex: 1;
    max-width: 1100px;
}

/* Dashboard Content - Compact Design */
.dashboard-content {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(25px);
    border-radius: 24px;
    padding: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.content-header {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.main-title {
    font-size: 2rem;
    font-weight: 700;
    color: #1d1d1f;
    margin: 0 0 0.5rem 0;
    letter-spacing: -0.02em;
}

.subtitle {
    color: #86868b;
    margin: 0;
    font-size: 1rem;
    font-weight: 500;
}

/* Compact Stats Container */
.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    border-radius: 18px;
    padding: 1.25rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.4);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.1);
}

.stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: white;
    margin-bottom: 0.75rem;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.15);
}

.users-card .stat-icon { 
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 3px 12px rgba(102, 126, 234, 0.3);
}

.applications-card .stat-icon { 
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    box-shadow: 0 3px 12px rgba(240, 147, 251, 0.3);
}

.system-card .stat-icon { 
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    box-shadow: 0 3px 12px rgba(79, 172, 254, 0.3);
}

.activity-card .stat-icon { 
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    box-shadow: 0 3px 12px rgba(67, 233, 123, 0.3);
}

.stat-content .stat-number {
    font-size: 1.875rem;
    font-weight: 700;
    color: #1d1d1f;
    margin: 0 0 0.375rem 0;
    line-height: 1;
}

.stat-content .stat-label {
    color: #86868b;
    margin: 0;
    font-weight: 500;
    font-size: 0.875rem;
}

/* Compact Recent Activity Section */
.recent-activity {
    margin-top: 1.5rem;
}

.section-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1d1d1f;
    margin-bottom: 1rem;
}

.activity-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.activity-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    transition: all 0.3s ease;
}

.activity-item:hover {
    background: rgba(255, 255, 255, 0.8);
    transform: translateX(3px);
}

.activity-icon {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.875rem;
    flex-shrink: 0;
}

.activity-content h4 {
    font-size: 0.875rem;
    font-weight: 600;
    color: #1d1d1f;
    margin: 0 0 0.125rem 0;
}

.activity-content p {
    color: #86868b;
    margin: 0 0 0.375rem 0;
    font-size: 0.8rem;
    line-height: 1.3;
}

.activity-time {
    font-size: 0.75rem;
    color: #8e8e93;
    font-weight: 500;
}

/* Users Content */
.users-content {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(25px);
    border-radius: 24px;
    padding: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Applications Content */
.applications-content {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(25px);
    border-radius: 24px;
    padding: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Content Header for Users and Applications */
.content-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.header-left .main-title {
    font-size: 2rem;
    font-weight: 700;
    color: #1d1d1f;
    margin: 0 0 0.5rem 0;
    letter-spacing: -0.02em;
}

.header-right .btn-primary {
    background: linear-gradient(135deg, #0071e3 0%, #0077ed 100%);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 16px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(0, 113, 227, 0.3);
}

.header-right .btn-primary:hover {
    background: linear-gradient(135deg, #0077ed 0%, #0071e3 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 113, 227, 0.4);
    text-decoration: none;
    color: white;
}

/* Notice Styles */
.admin-notice {
    background: rgba(0, 113, 227, 0.05);
    border: 1px solid rgba(0, 113, 227, 0.2);
    border-radius: 16px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.notice-icon {
    width: 20px;
    height: 20px;
    border-radius: 6px;
    background: #0071e3;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.75rem;
    flex-shrink: 0;
}

.notice-content h4 {
    font-size: 0.875rem;
    font-weight: 600;
    color: #0071e3;
    margin: 0 0 0.375rem 0;
}

.notice-content p {
    color: #1d1d1f;
    margin: 0;
    font-size: 0.8rem;
    line-height: 1.4;
}

/* Search Styles */
.search-section {
    margin-bottom: 1.5rem;
}

.search-form {
    max-width: 450px;
}

.search-input-group {
    position: relative;
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.4);
}

.search-icon {
    padding: 0 1rem;
    color: #86868b;
}

.search-input {
    flex: 1;
    border: none;
    padding: 0.875rem;
    font-size: 0.9rem;
    outline: none;
    background: transparent;
}

.search-button {
    background: #0071e3;
    color: white;
    border: none;
    padding: 0.875rem 1.25rem;
    cursor: pointer;
    transition: background 0.2s ease;
}

.search-button:hover {
    background: #0077ed;
}

/* Table Styles */
.table-container {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.4);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.data-table th {
    background: rgba(245, 245, 247, 0.8);
    padding: 1rem 0.875rem;
    text-align: left;
    font-weight: 600;
    color: #1d1d1f;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

.data-table td {
    padding: 1rem 0.875rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    vertical-align: middle;
}

.data-table tbody tr:hover {
    background: rgba(0, 113, 227, 0.02);
}

.data-table tbody tr.completed {
    background: rgba(52, 199, 89, 0.05);
    opacity: 0.8;
}

.data-table tbody tr.disabled {
    background: rgba(255, 59, 48, 0.05);
    opacity: 0.8;
}

/* Profile Avatar */
.profile-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    overflow: hidden;
    background: #f5f5f7;
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-avatar i {
    color: #86868b;
    font-size: 0.8rem;
}

/* Role Badge */
.role-badge {
    padding: 0.25rem 0.625rem;
    border-radius: 16px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: capitalize;
    border: 1px solid;
}

.role-badge.admin {
    background: rgba(255, 59, 48, 0.15);
    color: #ff3b30;
    border-color: rgba(255, 59, 48, 0.2);
}

.role-badge.staff {
    background: rgba(0, 113, 227, 0.15);
    color: #0071e3;
    border-color: rgba(0, 113, 227, 0.2);
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 0.375rem;
    flex-wrap: wrap;
}

.btn-secondary, .btn-danger, .btn-success, .btn-warning {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.75rem;
    font-weight: 500;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    letter-spacing: -0.01em;
}

.btn-secondary { 
    background: linear-gradient(135deg, #86868b 0%, #6e6e73 100%);
    box-shadow: 0 2px 6px rgba(134, 134, 139, 0.2);
}
.btn-danger { 
    background: linear-gradient(135deg, #ff3b30 0%, #dc2626 100%);
    box-shadow: 0 2px 6px rgba(255, 59, 48, 0.25);
}
.btn-success { 
    background: linear-gradient(135deg, #34c759 0%, #28a745 100%);
    box-shadow: 0 2px 6px rgba(52, 199, 89, 0.25);
}
.btn-warning { 
    background: linear-gradient(135deg, #ff9500 0%, #ff8800 100%);
    box-shadow: 0 2px 6px rgba(255, 149, 0, 0.25);
}

.btn-secondary:hover, .btn-danger:hover, .btn-success:hover, .btn-warning:hover {
    transform: translateY(-2px) scale(1.02);
    text-decoration: none;
    color: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-secondary:active, .btn-danger:active, .btn-success:active, .btn-warning:active {
    transform: translateY(0) scale(0.98);
}

.btn-secondary:focus, .btn-danger:focus, .btn-success:focus, .btn-warning:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(123, 31, 162, 0.2), 0 2px 6px rgba(0, 0, 0, 0.08);
}

/* Apple-style btn-secondary for text buttons (not just icon buttons) */
.btn-secondary.btn-sm,
.btn-secondary:not([style*="width"]):not([style*="height"]) {
    width: auto;
    height: auto;
    min-width: auto;
    min-height: auto;
    padding: 0.625rem 1.25rem;
    background: linear-gradient(135deg, #f3f0fa 0%, #f5f5f7 100%);
    color: #7b1fa2;
    border: 1.5px solid rgba(123, 31, 162, 0.15);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.btn-secondary.btn-sm:hover,
.btn-secondary:not([style*="width"]):not([style*="height"]):hover {
    background: linear-gradient(135deg, #f5e9fe 0%, #f3f0fa 100%);
    color: #6a1b9a;
    border-color: rgba(123, 31, 162, 0.25);
    box-shadow: 0 4px 12px rgba(123, 31, 162, 0.12);
    transform: translateY(-2px) scale(1.01);
}

.btn-secondary.btn-sm:active,
.btn-secondary:not([style*="width"]):not([style*="height"]):active {
    transform: translateY(0) scale(0.99);
}

.btn-secondary.btn-sm:focus,
.btn-secondary:not([style*="width"]):not([style*="height"]):focus {
    box-shadow: 0 0 0 3px rgba(123, 31, 162, 0.2), 0 2px 6px rgba(0, 0, 0, 0.06);
}

.protected-badge {
    background: rgba(0, 0, 0, 0.1);
    color: #86868b;
    padding: 0.25rem 0.625rem;
    border-radius: 16px;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.status-badge.completed {
    background: rgba(52, 199, 89, 0.15);
    color: #34c759;
    padding: 0.25rem 0.625rem;
    border-radius: 16px;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* Bottom Actions */
.bottom-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-export {
    background: #0071e3;
    color: white;
    border: none;
    padding: 0.625rem 1.25rem;
    border-radius: 16px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.btn-export:hover {
    background: #0077ed;
    transform: translateY(-1px);
    text-decoration: none;
    color: white;
}

/* Pagination Styles */
.pagination-wrapper {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

/* Enhanced Mobile Responsive Design */
@media (max-width: 1200px) {
    .admin-container {
        flex-direction: column;
        padding: 1rem;
        gap: 1rem;
    }
    
    .admin-sidebar {
        width: 100%;
        position: static;
        margin-bottom: 0;
    }
    
    .stats-container {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
        gap: 0.875rem;
    }
    
    .dashboard-content,
    .users-content,
    .applications-content {
        padding: 1.5rem;
    }
}

@media (max-width: 768px) {
    .admin-container {
        padding: 0.5rem;
        gap: 0.75rem;
    }
    
    .admin-sidebar {
        padding: 1rem;
        border-radius: 16px;
    }
    
    .sidebar-header {
        padding-bottom: 1rem;
        margin-bottom: 1rem;
    }
    
    .user-profile {
        gap: 0.5rem;
    }
    
    .profile-avatar {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .profile-info .username {
        font-size: 0.9rem;
        margin-bottom: 0.25rem;
    }
    
    .role-badge {
        padding: 0.125rem 0.5rem;
        font-size: 0.7rem;
    }
    
    .nav-item {
        padding: 0.75rem 1rem;
        font-size: 0.85rem;
    }
    
    .dashboard-content,
    .users-content,
    .applications-content {
        padding: 1rem;
        border-radius: 16px;
    }
    
    .content-header {
        margin-bottom: 1.5rem;
        padding-bottom: 1rem;
    }
    
    .main-title {
        font-size: 1.5rem;
        margin-bottom: 0.375rem;
    }
    
    .subtitle {
        font-size: 0.9rem;
    }
    
    .stats-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
        margin-bottom: 1.5rem;
    }
    
    .stat-card {
        padding: 1rem;
        border-radius: 14px;
    }
    
    .stat-icon {
        width: 36px;
        height: 36px;
        font-size: 1rem;
        margin-bottom: 0.5rem;
    }
    
    .stat-content .stat-number {
        font-size: 1.5rem;
        margin-bottom: 0.25rem;
    }
    
    .stat-content .stat-label {
        font-size: 0.8rem;
    }
    
    .recent-activity {
        margin-top: 1rem;
    }
    
    .section-title {
        font-size: 1.125rem;
        margin-bottom: 0.75rem;
    }
    
    .activity-list {
        gap: 0.5rem;
    }
    
    .activity-item {
        padding: 0.75rem;
        border-radius: 12px;
    }
    
    .activity-icon {
        width: 28px;
        height: 28px;
        font-size: 0.75rem;
    }
    
    .activity-content h4 {
        font-size: 0.8rem;
    }
    
    .activity-content p {
        font-size: 0.75rem;
    }
    
    .activity-time {
        font-size: 0.7rem;
    }
    
    .content-header {
        flex-direction: column;
        gap: 0.75rem;
        text-align: center;
    }
    
    .header-right .btn-primary {
        padding: 0.625rem 1.25rem;
        font-size: 0.85rem;
    }
    
    .admin-notice {
        padding: 1rem;
        border-radius: 14px;
    }
    
    .notice-icon {
        width: 18px;
        height: 18px;
        font-size: 0.7rem;
    }
    
    .notice-content h4 {
        font-size: 0.8rem;
    }
    
    .notice-content p {
        font-size: 0.75rem;
    }
    
    .search-form {
        max-width: 100%;
    }
    
    .search-input-group {
        border-radius: 14px;
    }
    
    .search-input {
        padding: 0.75rem;
        font-size: 0.85rem;
    }
    
    .search-button {
        padding: 0.75rem 1rem;
    }
    
    .table-container {
        border-radius: 14px;
    }
    
    .data-table th,
    .data-table td {
        padding: 0.75rem 0.625rem;
        font-size: 0.8rem;
    }
    
    .btn-secondary, .btn-danger, .btn-success, .btn-warning {
        width: 28px;
        height: 28px;
        font-size: 0.7rem;
    }
    
    .protected-badge,
    .status-badge.completed {
        padding: 0.125rem 0.5rem;
        font-size: 0.7rem;
        border-radius: 12px;
    }
    
    .bottom-actions {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
        gap: 0.75rem;
        padding-top: 1rem;
    }
    
    .btn-export {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .admin-container {
        padding: 0.25rem;
    }
    
    .stats-container {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .stat-card {
        padding: 0.875rem;
    }
    
    .content-header {
        text-align: left;
    }
    
    .main-title {
        font-size: 1.25rem;
    }
}

/* Animation Classes */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(16px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.stat-card, .activity-item {
    animation: fadeIn 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
    opacity: 0;
}

.stat-card:nth-child(1) { animation-delay: 0.06s; }
.stat-card:nth-child(2) { animation-delay: 0.12s; }
.stat-card:nth-child(3) { animation-delay: 0.18s; }
.stat-card:nth-child(4) { animation-delay: 0.24s; }

.activity-item:nth-child(1) { animation-delay: 0.06s; }
.activity-item:nth-child(2) { animation-delay: 0.12s; }
.activity-item:nth-child(3) { animation-delay: 0.18s; }

/* iOS 26 Navigation Styles */
.ios26-nav-container {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(32px);
    -webkit-backdrop-filter: blur(32px);
    border-radius: 32px;
    padding: 2.5rem 3rem;
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.06),
        0 10px 20px rgba(0, 0, 0, 0.03),
        0 4px 8px rgba(0, 0, 0, 0.02),
        inset 0 1px 0 rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.5);
    margin-bottom: 2.5rem;
    position: relative;
    overflow: hidden;
    animation: slideInUp 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.ios26-nav-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.8), transparent);
}

.ios26-nav-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 80%, rgba(0, 122, 255, 0.03) 0%, transparent 50%),
                radial-gradient(circle at 80% 20%, rgba(88, 86, 214, 0.03) 0%, transparent 50%);
    pointer-events: none;
}

.ios26-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    flex-wrap: nowrap;
}

.ios26-nav-brand {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    flex-shrink: 0;
    position: relative;
}

.ios26-brand-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #007AFF 0%, #5856D6 50%, #AF52DE 100%);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    box-shadow: 
        0 8px 24px rgba(0, 122, 255, 0.25),
        0 4px 12px rgba(88, 86, 214, 0.2),
        0 2px 6px rgba(175, 82, 222, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.ios26-brand-icon::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.25) 0%, transparent 60%);
    border-radius: 18px;
}

.ios26-brand-icon::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    border-radius: 18px;
}

.ios26-nav-brand:hover .ios26-brand-icon {
    transform: scale(1.05);
    box-shadow: 
        0 12px 32px rgba(0, 122, 255, 0.3),
        0 6px 16px rgba(88, 86, 214, 0.25),
        0 3px 8px rgba(175, 82, 222, 0.2);
}

.ios26-brand-text {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.ios26-brand-title {
    font-size: 1.375rem;
    font-weight: 800;
    color: #1D1D1F;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.ios26-brand-subtitle {
    font-size: 0.875rem;
    font-weight: 500;
    color: #86868B;
    letter-spacing: 0.01em;
    text-transform: none;
}

.ios26-nav-tabs {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(248, 248, 250, 0.7);
    border-radius: 28px;
    padding: 0.75rem;
    border: 1px solid rgba(142, 142, 147, 0.15);
    flex-grow: 1;
    justify-content: center;
    flex-wrap: nowrap;
    overflow-x: auto;
    position: relative;
    backdrop-filter: blur(12px);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.ios26-nav-tabs::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), transparent);
    border-radius: 24px;
    pointer-events: none;
}

.ios26-nav-tab {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.875rem 1.25rem;
    border-radius: 20px;
    text-decoration: none;
    color: #86868B;
    font-size: 0.9375rem;
    font-weight: 600;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    white-space: nowrap;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
    min-width: 110px;
    justify-content: center;
    letter-spacing: 0.01em;
}

.ios26-nav-tab::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.ios26-nav-tab:hover {
    color: #1D1D1F;
    background: rgba(255, 255, 255, 0.98);
    transform: translateY(-3px);
    box-shadow: 
        0 12px 32px rgba(0, 0, 0, 0.1),
        0 6px 18px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(142, 142, 147, 0.2);
}

.ios26-nav-tab:hover::before {
    opacity: 1;
}

.ios26-nav-tab.active {
    background: linear-gradient(135deg, #007AFF 0%, #5856D6 100%);
    color: white;
    box-shadow: 
        0 10px 30px rgba(0, 122, 255, 0.35),
        0 6px 18px rgba(88, 86, 214, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    font-weight: 700;
}

.ios26-nav-tab.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, transparent 100%);
    border-radius: 18px;
}

.ios26-nav-tab.active::after {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    background: linear-gradient(135deg, #007AFF, #5856D6);
    border-radius: 21px;
    z-index: -1;
    opacity: 0.3;
    filter: blur(8px);
}

.ios26-tab-icon {
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.ios26-nav-tab:hover .ios26-tab-icon {
    transform: scale(1.15) rotate(5deg);
}

.ios26-nav-tab.active .ios26-tab-icon {
    transform: scale(1.1);
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.ios26-tab-text {
    font-weight: 600;
    letter-spacing: -0.01em;
    transition: all 0.3s ease;
}

.ios26-nav-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-shrink: 0;
}

.ios26-nav-actions .profile-section {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 0.75rem 1rem;
    background: rgba(248, 248, 250, 0.8);
    border-radius: 16px;
    border: 1px solid rgba(142, 142, 147, 0.12);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.ios26-nav-actions .profile-section:hover {
    background: rgba(255, 255, 255, 0.95);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.ios26-nav-actions .profile-image {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.ios26-nav-actions .profile-info {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.ios26-nav-actions .profile-info h4 {
    font-size: 0.875rem;
    font-weight: 700;
    color: #1D1D1F;
    margin: 0;
    line-height: 1.2;
}

.ios26-nav-actions .profile-info p {
    font-size: 0.75rem;
    color: #86868B;
    margin: 0;
    line-height: 1.2;
    font-weight: 500;
}

.ios26-action-btn {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: rgba(248, 248, 250, 0.8);
    border: 1px solid rgba(142, 142, 147, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #86868B;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    box-shadow: 
        0 2px 8px rgba(0, 0, 0, 0.04),
        0 1px 3px rgba(0, 0, 0, 0.02);
    overflow: hidden;
}

.ios26-action-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.ios26-action-btn:hover {
    background: linear-gradient(135deg, #007AFF 0%, #5856D6 100%);
    color: white;
    transform: translateY(-3px) scale(1.05);
    box-shadow: 
        0 12px 32px rgba(0, 122, 255, 0.4),
        0 6px 16px rgba(88, 86, 214, 0.3);
    border-color: transparent;
}

.ios26-action-btn:hover::before {
    opacity: 1;
}

.ios26-action-icon {
    font-size: 1.125rem;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.ios26-action-btn:hover .ios26-action-icon {
    transform: scale(1.15) rotate(5deg);
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

/* Responsive Design for iOS 26 Nav */
@media (max-width: 1200px) {
    .ios26-nav {
        gap: 1rem;
    }
    
    .ios26-nav-tabs {
        gap: 0.375rem;
    }
    
    .ios26-nav-tab {
        padding: 0.625rem 0.875rem;
        font-size: 0.8125rem;
    }
}

@media (max-width: 992px) {
    .ios26-nav {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .ios26-nav-tabs {
        justify-content: center;
        flex-wrap: wrap;
        overflow-x: visible;
    }
    
    .ios26-nav-tab {
        padding: 0.625rem 0.875rem;
        font-size: 0.8125rem;
    }
}

@media (max-width: 768px) {
    .ios26-nav-container {
        padding: 1rem;
        border-radius: 20px;
    }
    
    .ios26-nav {
        flex-direction: column;
        gap: 1rem;
    }
    
    .ios26-nav-tabs {
        flex-direction: column;
        background: transparent;
        padding: 0;
        gap: 0.375rem;
    }
    
    .ios26-nav-tab {
        justify-content: center;
        background: rgba(248, 248, 250, 0.6);
        border: 1px solid rgba(0, 0, 0, 0.04);
    }
    
    .profile-section {
        width: 100%;
        justify-content: center;
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .ios26-nav-brand {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
    
    .ios26-brand-title {
        font-size: 0.875rem;
    }
    
    .ios26-nav-tab {
        padding: 0.75rem 1rem;
        font-size: 0.8125rem;
    }
    
    .ios26-tab-text {
        display: none;
    }
    
    .ios26-tab-icon {
        font-size: 1.125rem;
    }
}

/* Simplified Profile Section Styles */
.profile-section {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    background: rgba(248, 248, 250, 0.9);
    border-radius: 20px;
    border: 1px solid rgba(142, 142, 147, 0.15);
    backdrop-filter: blur(12px);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.ios26-nav-actions .profile-section:hover {
    background: rgba(255, 255, 255, 0.95);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.ios26-nav-actions .profile-image {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.ios26-nav-actions .profile-info {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.ios26-nav-actions .profile-info h4 {
    font-size: 0.875rem;
    font-weight: 700;
    color: #1D1D1F;
    margin: 0;
    line-height: 1.2;
}

.ios26-nav-actions .profile-info p {
    font-size: 0.75rem;
    color: #86868B;
    margin: 0;
    line-height: 1.2;
    font-weight: 500;
}

/* iOS 26 Navigation Animations */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.ios26-nav-container {
    animation: slideInUp 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.ios26-nav-tab {
    animation: fadeInScale 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
    animation-delay: calc(var(--tab-index, 0) * 0.1s);
}

.ios26-nav-tab:nth-child(1) { --tab-index: 1; }
.ios26-nav-tab:nth-child(2) { --tab-index: 2; }
.ios26-nav-tab:nth-child(3) { --tab-index: 3; }
.ios26-nav-tab:nth-child(4) { --tab-index: 4; }
.ios26-nav-tab:nth-child(5) { --tab-index: 5; }

/* Enhanced Apple-Style Design System for Documents View */

/* Container Layout */
.apple-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  /* Ensure proper layout */
  display: block;
  width: 100%;
  box-sizing: border-box;
}

/* Header Section */
.apple-header-section {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 248, 250, 0.95) 100%);
  border-radius: 28px;
  padding: 3rem;
  margin-bottom: 3rem;
  box-shadow: 
    0 12px 40px rgba(0, 0, 0, 0.08),
    0 6px 20px rgba(0, 0, 0, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(142, 142, 147, 0.18);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  position: relative;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.apple-header-section:hover {
  transform: translateY(-2px);
  box-shadow: 
    0 16px 48px rgba(0, 0, 0, 0.12),
    0 8px 24px rgba(0, 0, 0, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.98);
}

.apple-header-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(0, 122, 255, 0.4), rgba(88, 86, 214, 0.4), transparent);
}

.apple-header-section::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, #007AFF, #5856D6);
  border-radius: 2px;
  opacity: 0.6;
}

.apple-header-content {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  flex-wrap: wrap;
  position: relative;
  z-index: 2;
}

.apple-header-text {
  flex: 1;
}

.apple-main-title {
  font-size: 2.125rem;
  font-weight: 600;
  color: #1d1d1f;
  margin: 0 0 0.75rem 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  letter-spacing: -0.015em;
  line-height: 1.2;
}

.apple-subtitle {
  font-size: 1rem;
  color: #86868b;
  margin: 0;
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: 0.01em;
}

/* Enhanced Apple-Style Back Button */
.apple-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  padding: 1.125rem 2rem;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 248, 250, 0.95) 100%);
  border: 1px solid rgba(142, 142, 147, 0.2);
  border-radius: 24px;
  color: #1d1d1f;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: 
    0 6px 20px rgba(0, 0, 0, 0.08),
    0 3px 10px rgba(0, 0, 0, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  max-width: fit-content;
  position: relative;
  overflow: hidden;
}

.apple-back-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(0, 122, 255, 0.08) 0%, rgba(88, 86, 214, 0.05) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
  border-radius: 24px;
}

.apple-back-btn:hover {
  background: linear-gradient(135deg, rgba(255, 255, 255, 1) 0%, rgba(248, 248, 250, 0.98) 100%);
  transform: translateY(-4px);
  box-shadow: 
    0 12px 36px rgba(0, 0, 0, 0.15),
    0 6px 20px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
  border-color: rgba(0, 122, 255, 0.4);
  color: #1d1d1f;
  text-decoration: none;
}

.apple-back-btn:hover::before {
  opacity: 1;
}

.apple-back-btn i {
  font-size: 1.125rem;
  color: #007AFF;
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  position: relative;
  z-index: 1;
}

.apple-back-btn:hover i {
  transform: translateX(-6px);
  color: #0056b3;
  filter: drop-shadow(0 3px 6px rgba(0, 122, 255, 0.4));
}

/* Section Cards */
.apple-section-card {
  background: rgba(255, 255, 255, 0.98);
  border-radius: 28px;
  padding: 3rem;
  margin-bottom: 3rem;
  box-shadow: 
    0 12px 40px rgba(0, 0, 0, 0.1),
    0 6px 20px rgba(0, 0, 0, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(142, 142, 147, 0.15);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  position: relative;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  /* Ensure grid layout works properly */
  display: block;
  /* Force block display and prevent flexbox interference */
  flex-direction: unset !important;
  flex-wrap: unset !important;
  align-items: unset !important;
  justify-content: unset !important;
}

.apple-section-card:hover {
  transform: translateY(-3px);
  box-shadow: 
    0 16px 48px rgba(0, 0, 0, 0.15),
    0 8px 24px rgba(0, 0, 0, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.98);
}

.apple-section-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #007AFF, #5856D6, #007AFF);
  opacity: 0.9;
}

.apple-section-header {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(142, 142, 147, 0.12);
}

.apple-section-icon {
  width: 72px;
  height: 72px;
  background: linear-gradient(135deg, #007AFF 0%, #5856D6 100%);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 2rem;
  box-shadow: 0 8px 24px rgba(0, 122, 255, 0.4);
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.apple-section-card:hover .apple-section-icon {
  transform: scale(1.05) rotate(2deg);
  box-shadow: 0 12px 32px rgba(0, 122, 255, 0.5);
}

.apple-section-icon::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.25) 0%, transparent 50%);
  border-radius: 20px;
}

.apple-section-title {
  font-size: 1.375rem;
  font-weight: 600;
  color: #1d1d1f;
  margin: 0 0 0.75rem 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.apple-section-subtitle {
  font-size: 0.9375rem;
  color: #86868b;
  margin: 0;
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: 0.02em;
}

/* Document List Section - Consolidated */

/* Document Cards - Consolidated */

/* Empty State */
.apple-empty-state {
  text-align: center;
  padding: 4rem 2rem;
}

.apple-empty-icon {
  width: 96px;
  height: 96px;
  background: linear-gradient(135deg, #86868b 0%, #a1a1a6 100%);
  border-radius: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 2.5rem;
  margin: 0 auto 2rem;
  box-shadow: 0 8px 24px rgba(134, 134, 139, 0.4);
  transition: all 0.3s ease;
}

.apple-empty-state:hover .apple-empty-icon {
  transform: scale(1.05);
  box-shadow: 0 12px 32px rgba(134, 134, 139, 0.5);
}

.apple-empty-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: #1d1d1f;
  margin: 0 0 1rem 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  letter-spacing: -0.02em;
}

.apple-empty-desc {
  font-size: 1.125rem;
  color: #86868b;
  margin: 0 0 2.5rem 0;
  font-weight: 500;
  line-height: 1.5;
}

/* Enhanced Button Styles */
.apple-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 12px;
  font-size: 0.875rem;
  font-weight: 600;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  letter-spacing: -0.01em;
  min-height: 36px;
}

.apple-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.08) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
  border-radius: 12px;
}

.apple-btn:hover::before {
  opacity: 1;
}

.apple-btn-primary {
  background: linear-gradient(135deg, #007AFF 0%, #5856D6 100%);
  color: white;
  box-shadow: 0 6px 20px rgba(0, 122, 255, 0.35);
}

.apple-btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(0, 122, 255, 0.45);
}

.apple-btn-secondary {
  background: rgba(142, 142, 147, 0.12);
  color: #1d1d1f;
  border: 1px solid rgba(142, 142, 147, 0.25);
}

.apple-btn-secondary:hover {
  background: rgba(142, 142, 147, 0.18);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.apple-btn-danger {
  background: linear-gradient(135deg, #FF3B30 0%, #DC2626 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(255, 59, 48, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.apple-btn-danger:hover {
  background: linear-gradient(135deg, #DC2626 0%, #B91C1C 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(255, 59, 48, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.apple-btn-success {
  background: linear-gradient(135deg, #34C759 0%, #10B981 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(52, 199, 89, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.apple-btn-success:hover {
  background: linear-gradient(135deg, #10B981 0%, #059669 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(52, 199, 89, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.apple-btn i {
  font-size: 0.875rem;
  transition: transform 0.3s ease;
}

.apple-btn:hover i {
  transform: scale(1.1);
}

/* EFT Action Buttons - Compact Style */
.eft-action-btn {
  background: #f8f9fa;
  color: #495057;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 90px;
  white-space: nowrap;
  text-decoration: none;
}

.eft-action-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.eft-btn-success {
  background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
  color: #155724;
  border-color: #c3e6cb;
}

.eft-btn-success:hover {
  background: linear-gradient(135deg, #c3e6cb 0%, #b1dfb9 100%);
  color: #155724;
  border-color: #b1dfb9;
}

.eft-btn-danger {
  background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
  color: #721c24;
  border-color: #f5c6cb;
}

.eft-btn-danger:hover {
  background: linear-gradient(135deg, #f5c6cb 0%, #f1b0b7 100%);
  color: #721c24;
  border-color: #f1b0b7;
}

.eft-action-btn i {
  font-size: 12px;
}

/* Modal Styles */
.apple-modal-content {
  background: rgba(255, 255, 255, 0.98);
  border-radius: 28px;
  border: none;
  box-shadow: 
    0 24px 72px rgba(0, 0, 0, 0.18),
    0 12px 40px rgba(0, 0, 0, 0.12);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}

.apple-modal-header {
  border-bottom: 1px solid rgba(142, 142, 147, 0.12);
  padding: 2rem 2.5rem;
  background: rgba(248, 248, 250, 0.6);
  border-radius: 28px 28px 0 0;
}

.apple-modal-title {
  font-size: 1.375rem;
  font-weight: 700;
  color: #1d1d1f;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  letter-spacing: -0.02em;
}

.apple-modal-close {
  background: rgba(142, 142, 147, 0.12);
  border: none;
  border-radius: 14px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #86868b;
  transition: all 0.3s ease;
}

.apple-modal-close:hover {
  background: rgba(142, 142, 147, 0.2);
  color: #1d1d1f;
  transform: scale(1.1);
}

.apple-modal-body {
  padding: 2.5rem;
}

.apple-modal-footer {
  border-top: 1px solid rgba(142, 142, 147, 0.12);
  padding: 2rem 2.5rem;
  background: rgba(248, 248, 250, 0.6);
  border-radius: 0 0 28px 28px;
  display: flex;
  gap: 1.25rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Responsive Design */
@media (max-width: 1200px) {
  .apple-container {
    max-width: 1000px;
    padding: 0 1.5rem;
  }
}

@media (max-width: 768px) {
  .apple-container {
    padding: 0 1rem;
  }
  
  .apple-header-section {
    padding: 2.5rem;
    margin-bottom: 2.5rem;
    border-radius: 24px;
  }
  
  .apple-header-content {
    flex-direction: column;
    text-align: center;
    gap: 2rem;
  }
  
  .apple-main-title {
    font-size: 1.875rem;
  }
  
  .apple-section-card {
    padding: 2.5rem;
    margin-bottom: 2.5rem;
    border-radius: 24px;
  }
  
  .apple-section-header {
    flex-direction: column;
    text-align: center;
    gap: 1.25rem;
  }
  
  .document-list-section {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)) !important;
    gap: 0.75rem !important;
  }
  
  .document-card {
    padding: 0.875rem;
    min-height: 110px;
  }
  
  .document-icon {
    width: 40px;
    height: 40px;
    font-size: 1.5rem;
  }
  
  .document-card .document-icon i {
    font-size: 1rem;
  }
  
  .document-card h5 {
    font-size: 0.8125rem;
  }
  
  .apple-back-btn {
    padding: 1rem 1.75rem;
    font-size: 1rem;
  }
  
  .apple-back-btn i {
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .apple-header-section {
    padding: 2rem;
    border-radius: 20px;
  }
  
  .apple-main-title {
    font-size: 1.75rem;
  }
  
  .apple-section-card {
    padding: 2rem;
    border-radius: 20px;
  }
  
  .apple-section-icon {
    width: 64px;
    height: 64px;
    font-size: 1.75rem;
  }
  
  .document-list-section {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)) !important;
    gap: 0.625rem !important;
  }
  
  .document-card {
    padding: 0.75rem;
    min-height: 100px;
  }
  
  .document-icon {
    width: 36px;
    height: 36px;
    font-size: 1.25rem;
  }
  
  .document-card .document-icon i {
    font-size: 0.875rem;
  }
  
  .document-card h5 {
    font-size: 0.75rem;
  }
  
  .apple-back-btn {
    padding: 0.875rem 1.5rem;
    font-size: 0.95rem;
    border-radius: 20px;
  }
  
  .apple-back-btn i {
    font-size: 0.95rem;
  }
}

/* Form Actions Styling */
.form-actions {
  margin-top: 2rem;
  padding: 1.5rem;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.form-actions .btn {
  padding: 0.75rem 1.5rem;
  font-weight: 500;
  border-radius: 8px;
  transition: all 0.3s ease;
  min-width: 140px;
}

.form-actions .btn-outline-secondary {
  border-color: #6c757d;
  color: #6c757d;
}

.form-actions .btn-outline-secondary:hover {
  background-color: #6c757d;
  border-color: #6c757d;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(108, 117, 125, 0.3);
}

.form-actions .btn-primary {
  background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
  border: none;
  box-shadow: 0 2px 8px rgba(0, 123, 255, 0.3);
}

.form-actions .btn-primary:hover {
  background: linear-gradient(135deg, #0056b3 0%, #004085 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 123, 255, 0.4);
}

.form-actions .btn:active {
  transform: translateY(0);
}

@media (max-width: 768px) {
  .form-actions {
    padding: 1rem;
  }
  
  .form-actions .d-flex {
  flex-direction: column;
  gap: 1rem;
}

@media (min-width: 769px) {
  .form-actions .d-flex {
    flex-direction: row;
    gap: 2rem;
  }
}

.form-actions .d-flex {
  gap: 2rem;
}
  
  .form-actions .btn {
    width: 100%;
    min-width: auto;
  }
}

/* Apple Events Header */
.apple-events-header {
    margin-bottom: 1.5rem;
    padding: 0 0.5rem;
}

.apple-events-header-content {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.apple-events-header-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #007AFF, #5856D6);
    border-radius: 14px;
    color: white;
    font-size: 1.25rem;
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.3);
}

.apple-events-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1d1d1f;
    margin: 0 0 0.25rem 0;
    line-height: 1.2;
}

.apple-events-subtitle {
    font-size: 0.875rem;
    color: #86868b;
    margin: 0;
    font-weight: 500;
}

/* Apple Events Grid */
.apple-events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    padding: 0.5rem 0;
}

.apple-event-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1.25rem 1rem;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 20px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    backdrop-filter: blur(20px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    min-height: 200px;
    justify-content: space-between;
}

.apple-event-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #007AFF, #5856D6, #FF2D92);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.apple-event-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
    border-color: rgba(0, 122, 255, 0.2);
}

.apple-event-card:hover::before {
    opacity: 1;
}

.apple-event-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #007AFF, #5856D6);
    border-radius: 12px;
    color: white;
    font-size: 1.125rem;
    margin-bottom: 0.75rem;
    box-shadow: 0 2px 8px rgba(0, 122, 255, 0.3);
}

.apple-event-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 0;
    width: 100%;
}

.apple-event-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #1d1d1f;
    margin: 0 0 0.5rem 0;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: center;
    width: 100%;
}

.apple-event-date {
    font-size: 0.75rem;
    color: #86868b;
    margin: 0 0 0.75rem 0;
    font-weight: 500;
    text-align: center;
}

.apple-event-note {
    font-size: 0.75rem;
    color: #6e6e73;
    margin: 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.apple-event-delete-btn {
    background: none;
    border: none;
    color: #ff3b30;
    padding: 0.5rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    opacity: 0.7;
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
}

.apple-event-delete-btn:hover {
    background: rgba(255, 59, 48, 0.1);
    opacity: 1;
    transform: scale(1.05);
}

.apple-events-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    color: #86868b;
    text-align: center;
    grid-column: 1 / -1;
}

.apple-events-empty i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    opacity: 0.5;
}

.apple-events-empty p {
    margin: 0;
    font-size: 0.875rem;
    font-weight: 500;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .apple-events-header {
        margin-bottom: 1rem;
    }
    
    .apple-events-header-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .apple-events-title {
        font-size: 1.25rem;
    }
    
    .apple-events-subtitle {
        font-size: 0.8125rem;
    }
    
    .apple-events-grid {
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
        gap: 0.75rem;
    }
    
    .apple-event-card {
        padding: 1rem 0.75rem;
        min-height: 180px;
    }
    
    .apple-event-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
        margin-bottom: 0.5rem;
    }
    
    .apple-event-title {
        font-size: 0.8125rem;
        margin-bottom: 0.375rem;
    }
    
    .apple-event-date {
        font-size: 0.6875rem;
        margin-bottom: 0.5rem;
    }
    
    .apple-event-note {
        font-size: 0.6875rem;
    }
    
    .apple-event-delete-btn {
        top: 0.5rem;
        right: 0.5rem;
        padding: 0.375rem;
    }
}

/* DHA1663 Card Button - Simple Minimalistic Design */
.dha1663-card-button {
    background: #f5f5f7;
    border: 1px solid #e5e5e7;
    border-radius: 8px;
    padding: 1rem 1.25rem;
    color: #1d1d1f;
    font-size: 0.9375rem;
    font-weight: 500;
    transition: all 0.2s ease;
    cursor: pointer;
    width: 100%;
    text-align: center;
    position: relative;
    min-height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dha1663-card-button:hover {
    background: #ffffff;
    border-color: #d2d2d7;
    color: #1d1d1f;
}

.dha1663-card-button:active {
    background: #e8e8ed;
}

.dha1663-card-button i {
    font-size: 1.125rem;
    color: #007AFF;
    margin-right: 0.625rem;
}

.dha1663-card-button span {
    color: #1d1d1f;
}

.dha1663-card-button .d-flex {
    align-items: center;
}

/* DHA1663 Input Field - Simple Minimalistic Design */
.dha1663-input-field {
    background: #ffffff;
    border: 1px solid #e5e5e7;
    border-radius: 8px;
    padding: 0.875rem 1rem;
    font-size: 1rem;
    color: #1d1d1f;
    transition: all 0.2s ease;
    width: 100%;
}

.dha1663-input-field:focus {
    outline: none;
    border-color: #007AFF;
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
    background: #ffffff;
}

.dha1663-input-field::placeholder {
    color: #86868b;
    font-weight: 400;
}

/* DHA1663 Process Modal - Simple Minimalistic Design */
.dha1663-process-modal {
    max-width: 1200px;
    width: auto;
    margin: 0 auto;
}

.dha1663-process-content {
    border-radius: 12px;
    border: 1px solid #e5e5e7;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    background: #ffffff;
}

.dha1663-card-body {
    padding: 1.5rem;
    background: #ffffff;
    text-align: center;
    position: relative;
}

.dha1663-card-body .btn-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 10;
    opacity: 0.6;
}

.dha1663-card-body .btn-close:hover {
    opacity: 1;
}

.dha1663-card-content {
    background: #ffffff;
    border-radius: 8px;
    padding: 1.5rem 1.25rem;
    border: 1px solid #e5e5e7;
}

.dha1663-icon-container {
    margin-bottom: 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0.75rem;
    background: #f5f5f7;
    border-radius: 10px;
    width: 56px;
    height: 56px;
    margin: 0 auto 1rem auto;
}

.dha1663-main-icon {
    color: #1d1d1f;
    font-size: 1.25rem;
    display: block;
}

.dha1663-card-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1d1d1f;
    margin-bottom: 0.375rem;
    letter-spacing: -0.01em;
}

.dha1663-card-description {
    font-size: 0.8125rem;
    color: #86868b;
    margin-bottom: 0;
    line-height: 1.4;
}

.dha1663-card-footer {
    border-top: none;
    padding: 1rem 2rem 1.5rem 2rem;
    background: #f5f5f7;
    justify-content: center;
}

.dha1663-close-btn {
    color: #86868b !important;
    text-decoration: none;
    font-size: 0.9375rem;
    padding: 0.5rem 1rem;
    border: none;
    background: none;
}

.dha1663-close-btn:hover {
    color: #1d1d1f !important;
    background: none;
}

/* ============================================
   APPLE LOGIN PAGE DESIGN
   ============================================ */
.apple-login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f5f5f7 0%, #ffffff 50%, #f5f5f7 100%);
    padding: 2rem 1rem;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.apple-login-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    max-width: 1200px;
    width: 100%;
    gap: 4rem;
    align-items: center;
}

.apple-login-left {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.apple-login-illustration {
    width: 100%;
    max-width: 500px;
}

.apple-login-image {
    width: 100%;
    height: auto;
    filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.08));
}

.apple-login-right {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.apple-login-card {
    width: 100%;
    max-width: 420px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border-radius: 24px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08), 0 2px 8px rgba(0, 0, 0, 0.04);
    padding: 3rem 2.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.apple-login-card:hover {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12), 0 4px 12px rgba(0, 0, 0, 0.06);
    transform: translateY(-2px);
}

.apple-login-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.apple-login-logo {
    width: 64px;
    height: 64px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, #007AFF 0%, #0051D5 100%);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    color: white;
    box-shadow: 0 6px 20px rgba(0, 122, 255, 0.3);
}

.apple-login-title {
    font-size: 2rem;
    font-weight: 700;
    color: #1d1d1f;
    margin: 0 0 0.5rem 0;
    letter-spacing: -0.03em;
    line-height: 1.2;
}

.apple-login-subtitle {
    font-size: 1rem;
    color: #86868b;
    margin: 0;
    font-weight: 400;
    letter-spacing: -0.01em;
}

.apple-login-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.apple-form-group {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.apple-form-label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #1d1d1f;
    letter-spacing: -0.01em;
    margin-bottom: 0.125rem;
}

.apple-input {
    width: 100%;
    padding: 0.75rem 0.875rem;
    font-size: 0.9375rem;
    font-family: inherit;
    color: #1d1d1f;
    background: rgba(255, 255, 255, 0.9);
    border: 1.5px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.apple-input:hover {
    border-color: rgba(0, 122, 255, 0.3);
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.apple-input:focus {
    background: rgba(255, 255, 255, 1);
    border-color: #007AFF;
    box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.12), 0 2px 8px rgba(0, 122, 255, 0.15);
    transform: translateY(-1px);
}

.apple-input::placeholder {
    color: #86868b;
    opacity: 0.7;
}

.apple-input-error {
    border-color: #FF3B30;
    background: rgba(255, 59, 48, 0.05);
}

.apple-input-error:focus {
    border-color: #FF3B30;
    box-shadow: 0 0 0 4px rgba(255, 59, 48, 0.12);
}

.apple-error-message {
    font-size: 0.75rem;
    color: #FF3B30;
    margin-top: 0.125rem;
    display: block;
}

.apple-alert {
    padding: 0.875rem 1rem;
    border-radius: 12px;
    font-size: 0.9375rem;
    font-weight: 500;
    border: 1px solid;
}

.apple-alert-error {
    background: rgba(255, 59, 48, 0.1);
    border-color: rgba(255, 59, 48, 0.3);
    color: #FF3B30;
}

.apple-btn-login {
    width: 100%;
    padding: 1rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.apple-btn-login i {
    transition: transform 0.2s ease;
}

.apple-btn-login:hover i {
    transform: translateX(4px);
}

.apple-login-footer {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.apple-link {
    color: #007AFF;
    text-decoration: none;
    font-size: 0.9375rem;
    font-weight: 500;
    transition: color 0.2s ease;
}

.apple-link:hover {
    color: #0051D5;
    text-decoration: underline;
}

.apple-btn-full {
    width: 100%;
}

.apple-form-help {
    font-size: 0.75rem;
    color: #86868b;
    margin-top: 0.25rem;
    display: block;
    line-height: 1.4;
}

/* Login Modal Styles */
.apple-modal-reset {
    max-width: 420px;
}

.apple-modal-reset .apple-modal-content {
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
    background: #fff;
    border: none;
    padding: 0;
}

.apple-modal-reset .apple-modal-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    padding: 1.5rem 2rem;
    border-radius: 20px 20px 0 0;
}

.apple-modal-reset .apple-modal-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1d1d1f;
    letter-spacing: -0.01em;
    margin: 0;
}

.apple-modal-reset .apple-modal-body {
    padding: 2rem;
}

.apple-modal-close {
    position: absolute;
    right: 1.25rem;
    top: 1.25rem;
    background: none;
    opacity: 0.6;
    border: none;
    padding: 0.5rem;
}

.apple-modal-close:hover {
    opacity: 1;
}

.apple-modal-close:focus {
    box-shadow: none;
    opacity: 1;
}

/* Responsive Login */
@media (max-width: 968px) {
    .apple-login-wrapper {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .apple-login-left {
        display: none;
    }
    
    .apple-login-card {
        max-width: 100%;
        padding: 2.5rem 2rem;
    }
}

@media (max-width: 576px) {
    .apple-login-container {
        padding: 1rem;
    }
    
    .apple-login-card {
        padding: 2rem 1.5rem;
        border-radius: 20px;
    }
    
    .apple-login-title {
        font-size: 1.75rem;
    }
    
    .apple-login-logo {
        width: 56px;
        height: 56px;
        font-size: 1.5rem;
    }
}

/* ============================================
   APPLE SIGNUP PAGE DESIGN
   ============================================ */
.apple-signup-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f5f5f7 0%, #ffffff 50%, #f5f5f7 100%);
    padding: 1.5rem 1rem;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.apple-signup-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    max-width: 1200px;
    width: 100%;
    gap: 3rem;
    align-items: center;
}

.apple-signup-left {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.apple-signup-illustration {
    width: 100%;
    max-width: 500px;
}

.apple-signup-image {
    width: 100%;
    height: auto;
    filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.08));
}

.apple-signup-right {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.apple-signup-card {
    width: 100%;
    max-width: 500px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border-radius: 20px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08), 0 2px 8px rgba(0, 0, 0, 0.04);
    padding: 2rem 2rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.apple-signup-card:hover {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12), 0 4px 12px rgba(0, 0, 0, 0.06);
    transform: translateY(-2px);
}

.apple-signup-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.apple-signup-logo {
    width: 52px;
    height: 52px;
    margin: 0 auto 1rem;
    background: linear-gradient(135deg, #007AFF 0%, #0051D5 100%);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    box-shadow: 0 4px 16px rgba(0, 122, 255, 0.25);
}

.apple-signup-title {
    font-size: 1.625rem;
    font-weight: 700;
    color: #1d1d1f;
    margin: 0 0 0.375rem 0;
    letter-spacing: -0.03em;
    line-height: 1.2;
}

.apple-signup-subtitle {
    font-size: 0.875rem;
    color: #86868b;
    margin: 0;
    font-weight: 400;
    letter-spacing: -0.01em;
}

.apple-signup-form {
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
}

.apple-signup-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 0.75rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.apple-signup-actions .apple-btn {
    flex: 1;
    justify-content: center;
}

.apple-select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Cpath fill='%236e6e73' d='M7 10L2 5h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
    background-size: 14px;
}

/* Responsive Signup */
@media (max-width: 968px) {
    .apple-signup-wrapper {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .apple-signup-left {
        display: none;
    }
    
    .apple-signup-card {
        max-width: 100%;
        padding: 2.5rem 2rem;
    }
}

@media (max-width: 576px) {
    .apple-signup-container {
        padding: 1rem;
    }
    
    .apple-signup-card {
        padding: 2rem 1.5rem;
        border-radius: 20px;
    }
    
    .apple-signup-title {
        font-size: 1.75rem;
    }
    
    .apple-signup-logo {
        width: 56px;
        height: 56px;
        font-size: 1.5rem;
    }
    
    .apple-signup-actions {
        flex-direction: column;
    }
    
    .apple-signup-actions .apple-btn {
        width: 100%;
    }
}

/* ============================================
   EXTRACTED INLINE STYLES - DHA1663 Timeline
   ============================================ */
.dha1663-timeline-column {
    max-height: 70vh;
    overflow-y: auto;
    padding-right: 1rem !important;
    border-right: 1px solid #e5e5e7;
}

.dha1663-timeline-header {
    position: sticky;
    top: 0;
    background: linear-gradient(180deg, #ffffff 0%, #ffffff 80%, rgba(255,255,255,0) 100%);
    padding-bottom: 0.75rem;
    margin-bottom: 0.75rem;
    z-index: 10;
}

.dha1663-timeline-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #1d1d1f;
    margin-bottom: 0;
    letter-spacing: -0.01em;
}

.dha1663-timeline-title i {
    color: #007AFF;
    font-size: 0.8125rem;
}

.dha1663-timeline-content {
    padding-right: 0.5rem;
}

.dha1663-documents-section {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e5e5e7;
}

.dha1663-documents-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #1d1d1f;
    margin-bottom: 0.75rem;
    letter-spacing: -0.01em;
}

.dha1663-documents-title i {
    color: #FF3B30;
    font-size: 0.8125rem;
}

.dha1663-documents-list {
    margin-bottom: 0.75rem;
    max-height: 150px;
    overflow-y: auto;
}

.dha1663-document-upload {
    font-size: 0.75rem;
}

.dha1663-document-help {
    font-size: 0.7rem;
}

.dha1663-upload-btn {
    font-size: 0.75rem;
    padding: 0.25rem 0.75rem;
}

.dha1663-input-uppercase {
    text-transform: uppercase;
}

.dha1663-label {
    color: #1d1d1f;
    font-size: 0.875rem;
}

.dha1663-select-padding {
    padding: 1rem 1.25rem;
}

/* Timeline Styles */
.timeline {
    position: relative;
    padding-left: 1.5rem;
}

.timeline-item {
    position: relative;
    padding-bottom: 1.75rem;
    margin-left: -0.75rem;
    padding-left: 1.5rem;
    border-left: 2px solid #e5e5e7;
}

.timeline-item.declined {
    padding-bottom: 2.25rem;
}

.timeline-item:last-child {
    border-left: none;
}

.timeline-icon {
    position: absolute;
    left: -0.625rem;
    top: 0.125rem;
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 50%;
    border: 3px solid white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1), 0 0 0 1px rgba(0,0,0,0.1);
    z-index: 2;
}

.timeline-content {
    margin-left: 0.75rem;
    padding-top: 0.125rem;
}

.timeline-title {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #1d1d1f;
    margin-bottom: 0.5rem;
    line-height: 1.4;
    letter-spacing: -0.01em;
}

.timeline-title i {
    font-size: 0.75rem;
}

.timeline-details {
    font-size: 0.75rem;
    color: #86868b;
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

.timeline-date {
    font-size: 0.6875rem;
    color: #8E8E93;
    font-weight: 500;
    letter-spacing: 0.01em;
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.timeline-date i {
    font-size: 0.625rem;
}

.timeline-declined-box {
    font-size: 0.8125rem;
    color: #1d1d1f;
    margin-bottom: 0.625rem;
    line-height: 1.6;
    background: linear-gradient(135deg, #fff5f5 0%, #fff9f9 100%);
    padding: 0.875rem 1rem;
    border-radius: 10px;
    border-left: 3px solid #FF3B30;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.timeline-declined-date {
    font-size: 0.6875rem;
    color: #8E8E93;
    font-weight: 500;
    letter-spacing: 0.01em;
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(255,59,48,0.1);
}

.timeline-declined-date i {
    font-size: 0.625rem;
}

/* ============================================
   EXTRACTED INLINE STYLES - Funeral Management
   ============================================ */
.funeral-card-clickable {
    cursor: pointer;
}

.table-row-clickable {
    cursor: pointer;
}

.mortuary-action-btn {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

/* Bodies in Mortuary + FM register tables — calmer layout */
.bodies-mortuary-table-wrap,
.fm-reg-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 12px;
    border: 1px solid #e8eaef;
    background: #fff;
}

/* Row hover uses transform elsewhere — breaks overlays / menus */
.table-bodies-mortuary.table-row-clickable:hover,
.table-fm-reg.table-row-clickable:hover {
    transform: none !important;
}

.table-bodies-mortuary.table-modern th,
.table-fm-reg.table-modern th {
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
    color: #64748b;
    padding: 1.1rem 1.35rem 1rem;
    white-space: nowrap;
    border-bottom-color: #e2e8f0;
    line-height: 1.45;
    vertical-align: bottom;
}

.table-bodies-mortuary.table-modern td,
.table-fm-reg.table-modern td {
    padding: 0.85rem 0.85rem;
    vertical-align: middle;
    font-size: 0.8125rem;
    line-height: 1.45;
    border-bottom-color: #eef2f7;
}

.table-bodies-mortuary.table-modern tbody tr.bodies-mortuary-data-row:hover td,
.table-fm-reg.table-modern tbody tr.fm-reg-data-row:hover td {
    background: #f8fafc;
}

/* DHA1663 register: wrap headers/cells so the full header row fits without horizontal scroll */
.fm-reg-table-wrap--dha .table-fm-reg-dha1663 {
    table-layout: fixed;
    width: 100%;
}

.fm-reg-table-wrap--dha .table-fm-reg-dha1663.table-modern thead th {
    white-space: normal;
    overflow-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
    line-height: 1.25;
    padding: 0.55rem 0.3rem 0.65rem;
    font-size: 0.62rem;
    letter-spacing: 0.05em;
    vertical-align: bottom;
}

.fm-reg-table-wrap--dha .table-fm-reg-dha1663.table-modern tbody td {
    white-space: normal;
    overflow-wrap: break-word;
    word-break: break-word;
    vertical-align: middle;
}

.fm-reg-table-wrap--dha .table-fm-reg-dha1663 .fm-reg-actions-cell {
    white-space: nowrap;
    width: 4.5rem;
    max-width: 5.5rem;
    overflow: visible;
}

.bodies-mortuary-branch-row td {
    padding: 0 !important;
    border-bottom: none !important;
    background: #f1f5f9;
}

.bodies-mortuary-branch-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    padding: 0.55rem 0.85rem;
    border-bottom: 1px solid #e2e8f0;
}

.bodies-mortuary-branch-label {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: #0f172a;
}

.bodies-mortuary-branch-meta,
.bodies-mortuary-branch-count {
    font-size: 0.75rem;
    color: #64748b;
    margin-left: 0.5rem;
}

.bodies-mortuary-mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: 0.78rem;
    color: #334155;
}

.bodies-mortuary-cell-id {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.3rem;
}

.bodies-mortuary-file-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.18rem 0.55rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    color: #0f172a;
    background: rgba(99, 102, 241, 0.12);
    border: 1px solid rgba(99, 102, 241, 0.28);
}

.bodies-mortuary-money-meta,
.bodies-mortuary-claim-meta {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.25rem;
    max-width: 14rem;
    font-size: 0.68rem;
    font-weight: 650;
    line-height: 1.25;
    letter-spacing: 0.01em;
}

.bodies-mortuary-money-meta {
    color: #166534;
}

.bodies-mortuary-claim-meta {
    color: #9a3412;
}

.bodies-mortuary-claim-no {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-weight: 700;
    color: #7c2d12;
}

.bodies-mortuary-id {
    font-size: 0.75rem;
}

.bodies-mortuary-name {
    display: flex;
    flex-direction: column;
    gap: 0.12rem;
}

.bodies-mortuary-surname {
    font-weight: 600;
    color: #0f172a;
    letter-spacing: 0.02em;
}

.bodies-mortuary-given {
    font-size: 0.75rem;
    color: #64748b;
    line-height: 1.35;
}

.bodies-mortuary-text-soft {
    color: #94a3b8;
    font-size: 0.8125rem;
}

.bodies-mortuary-admitted {
    display: flex;
    flex-direction: column;
    gap: 0.12rem;
}

.bodies-mortuary-time {
    font-size: 0.75rem;
    color: #64748b;
    font-variant-numeric: tabular-nums;
}

.bodies-mortuary-collected {
    display: block;
    max-width: 12rem;
    font-size: 0.78rem;
    color: #475569;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bodies-mortuary-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
    border-radius: 999px;
    padding: 0.22rem 0.65rem;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    background: #fff;
    cursor: pointer;
    line-height: 1.2;
    max-width: 100%;
}

.bodies-mortuary-status--in {
    border-color: #bbf7d0;
    background: #f0fdf4;
    color: #166534;
}

.bodies-mortuary-status--pending,
.bodies-mortuary-status--transit {
    border-color: #fde68a;
    background: #fffbeb;
    color: #92400e;
}

.bodies-mortuary-status--returnable {
    border-color: #fed7aa;
    background: #fff7ed;
    color: #9a3412;
}

.bodies-mortuary-status--neutral {
    border-color: #e2e8f0;
    color: #475569;
}

.bodies-mortuary-dha {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.15rem;
    max-width: 16rem;
    padding: 0.35rem 0.55rem 0.4rem;
    margin: 0;
    border: none;
    text-align: left;
    cursor: pointer;
    border-radius: 0.375rem;
    background: var(--dha-accent, #64748b);
    color: #fff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.12);
}

.bodies-mortuary-dha:hover {
    filter: brightness(1.08);
    color: #fff;
}

.bodies-mortuary-dha:focus-visible {
    outline: 2px solid rgba(59, 130, 246, 0.65);
    outline-offset: 2px;
}

.bodies-mortuary-dha__label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #fff;
    line-height: 1.25;
}

.bodies-mortuary-dha__date {
    font-size: 0.6875rem;
    color: rgba(255, 255, 255, 0.88);
    font-variant-numeric: tabular-nums;
}

.fm-reg-actions-btn {
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.28rem 0.65rem;
    border-color: #cbd5e1;
    color: #475569;
}

.fm-reg-action-wrap {
    position: relative;
    display: block;
    width: 100%;
    text-align: right;
}

.fm-reg-action-panel {
    position: fixed;
    z-index: 2147483000;
    min-width: 12rem;
    padding: 0.35rem 0;
    margin: 0;
    font-size: 0.8125rem;
    list-style: none;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    box-shadow: 0 16px 48px rgba(15, 23, 42, 0.14);
}

.fm-reg-action-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    width: 100%;
    padding: 0.5rem 1rem;
    border: 0;
    background: transparent;
    text-align: left;
    color: #1e293b;
    cursor: pointer;
    font-size: 0.8125rem;
    line-height: 1.35;
}

.fm-reg-action-item:hover {
    background: #f1f5f9;
}

.fm-reg-action-item--danger {
    color: #b91c1c;
}

.fm-reg-action-item--danger:hover {
    background: #fef2f2;
}

.fm-reg-action-heading {
    padding: 0.4rem 1rem 0.15rem;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #64748b;
    line-height: 1.3;
    user-select: none;
}

.fm-reg-action-divider {
    height: 1px;
    margin: 0.35rem 0;
    background: #e2e8f0;
}

/* Cremation / DHA group header — match mortuary branch strip */
.fm-reg-group-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    padding: 0.55rem 0.85rem;
    margin-bottom: 0.5rem;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
}

.fm-reg-group-header__title {
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: #0f172a;
}

.fm-reg-group-header__count {
    font-size: 0.75rem;
    font-weight: 600;
    color: #475569;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    background: #fff;
    border: 1px solid #e2e8f0;
}

.bodies-mortuary-id-copy {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    max-width: 100%;
    padding: 0.15rem 0.25rem;
    margin: -0.15rem -0.25rem;
    border: 0;
    border-radius: 0.35rem;
    background: transparent;
    cursor: pointer;
    text-align: left;
    color: inherit;
    font: inherit;
}

.bodies-mortuary-id-copy:hover:not(:disabled) {
    background: #f1f5f9;
}

.bodies-mortuary-id-copy--disabled,
.bodies-mortuary-id-copy:disabled {
    cursor: default;
    opacity: 0.65;
}

.bodies-mortuary-id-copy__icon {
    font-size: 0.7rem;
    color: #94a3b8;
    flex-shrink: 0;
}

.bodies-mortuary-toast {
    position: fixed;
    bottom: 1.5rem;
    left: 50%;
    transform: translate(-50%, 12px);
    z-index: 10050;
    padding: 0.55rem 1.15rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #fff;
    background: #0f172a;
    border-radius: 999px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.25);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.bodies-mortuary-toast--show {
    opacity: 1;
    transform: translate(-50%, 0);
}

.mortuary-section-card {
    cursor: pointer;
}

.mortuary-section-icon-blue {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
}

.mortuary-section-icon-blue i {
    color: #1976d2;
}

.mortuary-section-icon-orange {
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
}

.mortuary-section-icon-orange i {
    color: #f57c00;
}

.readonly-input {
    background-color: #f5f5f7;
    cursor: not-allowed;
}

.specific-cause-container {
    display: none;
}

.personal-effects-label {
    font-size: 0.875rem;
    font-weight: 600;
}

.personal-effects-label i {
    color: #007AFF;
}

.personal-effects-input {
    font-size: 0.875rem;
}

.personal-effects-help {
    font-size: 0.75rem;
}

.personal-effects-upload-btn {
    font-size: 0.75rem;
    padding: 0.25rem 0.75rem;
}

.personal-effects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 0.75rem;
}

.delivery-overtime-note {
    display: none;
}

.remove-assistant-btn {
    display: none;
}

.external-delivery-section {
    display: none;
    opacity: 0.5;
}

/* Document List Styles */
.document-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem;
    background: #f5f5f7;
    border-radius: 0.5rem;
    font-size: 0.75rem;
}

.document-item-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.document-item-info i {
    color: #FF3B30;
}

.document-item-name {
    color: #1d1d1f;
}

.document-item-actions {
    display: flex;
    gap: 0.5rem;
}

.document-action-btn {
    padding: 0.125rem 0.5rem;
    font-size: 0.7rem;
}

.document-empty {
    font-size: 0.75rem;
    color: #86868b;
    margin: 0;
}

.document-error {
    font-size: 0.75rem;
    color: #FF3B30;
    margin: 0;
}

/* Image List Styles */
.image-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    background: #f5f5f7;
    aspect-ratio: 1;
}

.image-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
}

.image-delete-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    padding: 0.125rem 0.375rem;
    font-size: 0.7rem;
    border-radius: 4px;
}

.image-empty {
    font-size: 0.75rem;
    color: #86868b;
    margin: 0;
    grid-column: 1 / -1;
}

/* ============================================
   COMPREHENSIVE MOBILE RESPONSIVE STYLES
   Optimized for iPhone and Mobile Devices
   ============================================ */

/* Base Mobile Styles - iPhone and Small Devices */
@media (max-width: 768px) {
    /* Ensure proper viewport and prevent zoom on input focus */
    html {
        -webkit-text-size-adjust: 100%;
        -ms-text-size-adjust: 100%;
    }
    
    body {
        font-size: 16px; /* Prevent iOS zoom on input focus */
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
    
    /* Container adjustments */
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .container-fluid {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    /* Tables - Make horizontally scrollable */
    .table-responsive {
        -webkit-overflow-scrolling: touch;
        overflow-x: auto;
        display: block;
        width: 100%;
    }
    
    .table {
        font-size: 0.875rem;
        min-width: 600px; /* Ensure table doesn't get too compressed */
    }
    
    .table th,
    .table td {
        padding: 0.75rem 0.5rem;
        white-space: nowrap;
    }
    
    /* Buttons - Ensure minimum touch target size (44x44px) */
    .btn,
    .apple-btn,
    button {
        min-height: 44px;
        min-width: 44px;
        padding: 0.75rem 1.25rem;
        font-size: 1rem;
        touch-action: manipulation; /* Prevent double-tap zoom */
    }
    
    .btn-sm {
        min-height: 40px;
        padding: 0.5rem 1rem;
        font-size: 0.9375rem;
    }
    
    /* Form inputs - Prevent zoom on iOS */
    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="number"],
    input[type="date"],
    input[type="time"],
    input[type="tel"],
    textarea,
    select {
        font-size: 16px !important; /* Prevents iOS zoom */
        min-height: 44px;
        padding: 0.75rem 1rem;
        -webkit-appearance: none;
        appearance: none;
        border-radius: 12px;
    }
    
    .form-control,
    .apple-input {
        font-size: 16px !important;
        min-height: 44px;
        padding: 0.75rem 1rem;
    }
    
    .form-control-sm {
        font-size: 16px !important;
        min-height: 40px;
        padding: 0.625rem 0.875rem;
    }
    
    /* Modals - Full width on mobile */
    .modal-dialog {
        margin: 0.5rem;
        max-width: calc(100% - 1rem);
        pointer-events: auto !important;
        touch-action: auto !important;
    }
    
    .modal.show .modal-dialog {
        pointer-events: auto !important;
        touch-action: auto !important;
    }
    
    .modal-content {
        border-radius: 16px;
        pointer-events: auto !important;
        touch-action: auto !important;
    }
    
    .modal-body {
        padding: 1.5rem 1rem;
        max-height: calc(100vh - 200px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        pointer-events: auto !important;
        touch-action: pan-y !important;
    }
    
    /* Ensure all form elements in modals are touchable on mobile */
    .modal input,
    .modal select,
    .modal textarea,
    .modal button,
    .modal label {
        pointer-events: auto !important;
        touch-action: manipulation !important;
        -webkit-tap-highlight-color: rgba(0, 122, 255, 0.1);
    }
    
    /* Fix modal backdrop on mobile - reduce opacity */
    .modal-backdrop {
        pointer-events: none !important;
        touch-action: none !important;
        opacity: 0.1 !important;
        background-color: rgba(0, 0, 0, 0.1) !important;
    }
    
    .modal-backdrop.show {
        opacity: 0.1 !important;
        background-color: rgba(0, 0, 0, 0.1) !important;
    }
    
    /* Ensure modal content is above backdrop + apple-navbar */
    .modal.show {
        pointer-events: auto !important;
        z-index: 20050 !important;
    }
    
    .modal.show .modal-dialog {
        z-index: 20051 !important;
    }
    
    .modal.show .modal-content {
        z-index: 20052 !important;
        pointer-events: auto !important;
        touch-action: auto !important;
    }
    
    /* CRITICAL: Override Bootstrap's pointer-events: none on modal-dialog for mobile */
    .modal-dialog {
        pointer-events: auto !important;
        touch-action: auto !important;
        position: relative !important;
    }
    
    .modal.show .modal-dialog {
        pointer-events: auto !important;
        touch-action: auto !important;
        position: relative !important;
    }
    
    /* Ensure all interactive elements in modals work on mobile */
    .modal input,
    .modal select,
    .modal textarea,
    .modal button,
    .modal label,
    .modal .form-control,
    .modal .form-select,
    .modal .apple-input {
        pointer-events: auto !important;
        touch-action: manipulation !important;
        -webkit-tap-highlight-color: rgba(0, 122, 255, 0.1);
        position: relative !important;
        z-index: 2 !important;
    }
    
    /* CRITICAL: Ensure removalOrderModal is fully touchable and above navbar */
    #removalOrderModal.modal.show .modal-dialog,
    #removalOrderModal.modal .modal-dialog,
    #removalOrderModal .modal-dialog {
        pointer-events: auto !important;
        touch-action: auto !important;
        position: relative !important;
        z-index: 20051 !important;
    }
    
    #removalOrderModal.modal.show .apple-modal-content,
    #removalOrderModal.modal .apple-modal-content,
    #removalOrderModal .apple-modal-content {
        pointer-events: auto !important;
        touch-action: auto !important;
        position: relative !important;
        z-index: 20052 !important;
    }
    
    #removalOrderModal.modal.show,
    #removalOrderModal.modal {
        pointer-events: auto !important;
        z-index: 20050 !important;
        position: fixed !important;
    }
    
    /* Backdrop below modal, above navbar */
    body.modal-open .modal-backdrop {
        pointer-events: auto !important;
        touch-action: auto !important;
        z-index: 20040 !important;
        opacity: 0.45 !important;
        background-color: rgba(0, 0, 0, 0.45) !important;
    }
    
    body.modal-open .modal-backdrop.show {
        opacity: 0.45 !important;
        background-color: rgba(0, 0, 0, 0.45) !important;
    }
    
    .modal-header {
        padding: 1.25rem 1rem;
    }
    
    .modal-footer {
        padding: 1rem;
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .modal-footer .btn {
        width: 100%;
        margin: 0;
    }
    
    /* Apple Modal adjustments */
    .apple-modal-content {
        border-radius: 16px;
        padding: 0;
    }
    
    .apple-modal-body {
        padding: 1.5rem 1rem;
    }
    
    .apple-modal-header {
        padding: 1.25rem 1rem;
    }
    
    .apple-modal-footer {
        padding: 1rem !important;
        flex-direction: column !important;
        display: flex !important;
        flex-shrink: 0 !important;
        overflow: visible !important;
        min-height: auto !important;
        max-height: none !important;
    }
    
    .apple-modal-footer .apple-btn {
        width: 100% !important;
        min-height: 44px !important;
        white-space: nowrap !important;
        flex-shrink: 0 !important;
    }
    
    /* Landscape Mode Fixes for Mobile Modals */
    @media (max-width: 768px) and (orientation: landscape) {
        .modal-dialog {
            max-height: 98vh !important;
            margin: 0.25rem auto !important;
            max-width: calc(100% - 0.5rem) !important;
        }
        
        .modal-content,
        .apple-modal-content {
            max-height: 98vh !important;
        }
        
        .modal-header,
        .apple-modal-header {
            padding: 1rem 1.5rem 0.75rem 1.5rem !important;
            flex-shrink: 0;
        }
        
        .modal-title,
        .apple-modal-title {
            font-size: 1.125rem !important;
        }
        
        .modal-body,
        .apple-modal-body {
            padding: 1.25rem 1.5rem !important;
            max-height: calc(98vh - 200px) !important;
            overflow-y: auto !important;
            -webkit-overflow-scrolling: touch !important;
        }
        
        .modal-footer,
        .apple-modal-footer {
            padding: 0.75rem 1.5rem 1rem 1.5rem !important;
            flex-shrink: 0 !important;
            overflow: visible !important;
            min-height: auto !important;
            max-height: none !important;
            display: flex !important;
        }
        
        .modal-footer .btn,
        .apple-modal-footer .apple-btn {
            flex-shrink: 0 !important;
            white-space: nowrap !important;
            min-height: 44px !important;
        }
        
        /* Ensure all elements remain touchable in landscape */
        .modal.show .modal-dialog,
        .modal .modal-dialog {
            pointer-events: auto !important;
            touch-action: auto !important;
        }
        
        .modal.show .modal-content,
        .modal.show .apple-modal-content,
        .modal .modal-content,
        .modal .apple-modal-content {
            pointer-events: auto !important;
            touch-action: auto !important;
        }
        
        .modal input,
        .modal select,
        .modal textarea,
        .modal button,
        .modal label {
            pointer-events: auto !important;
            touch-action: manipulation !important;
        }
        
        /* Specific fixes for removalOrderModal in landscape */
        #removalOrderModal .modal-dialog {
            max-height: 98vh !important;
            margin: 0.25rem auto !important;
        }
        
        #removalOrderModal .apple-modal-body {
            max-height: calc(98vh - 120px) !important;
        }
        
        #removalOrderModal .mortuary-section {
            padding: 1.25rem !important;
        }
        
        #removalOrderModal .row.g-2,
        #removalOrderModal .row.g-3 {
            margin-bottom: 1rem !important;
        }
    }
    
    /* DHA1663 Modal - Stack columns on mobile */
    .dha1663-process-modal .modal-dialog {
        margin: 0.5rem;
        max-width: calc(100% - 1rem);
    }
    
    .dha1663-process-modal .row {
        flex-direction: column;
    }
    
    .dha1663-timeline-column {
        max-height: 300px;
        border-right: none;
        border-bottom: 1px solid #e5e5e7;
        padding-bottom: 1rem;
        margin-bottom: 1rem;
        padding-right: 0 !important;
    }
    
    .dha1663-card-body {
        padding: 1rem;
    }
    
    .dha1663-card-content {
        padding: 1.25rem 1rem;
    }
    
    /* Cards - Better spacing on mobile */
    .apple-request-card,
    .apple-section-card,
    .dashboard-card {
        padding: 1rem 0.85rem;
        margin-bottom: 0.75rem;
    }

    .apple-request-card {
        min-height: 112px;
    }
    
    .apple-card-icon {
        width: auto;
        height: auto;
        font-size: 1.35rem;
        margin-bottom: 0.4rem;
    }
    
    .apple-card-title {
        font-size: 0.9rem;
    }
    
    .apple-card-desc {
        font-size: 0.875rem;
    }
    
    /* Form sections - Stack on mobile */
    .apple-form-grid,
    .form-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .apple-form-section {
        padding: 1.5rem 1.25rem;
        margin-bottom: 1.25rem;
    }
    
    .apple-section-header {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .apple-section-icon {
        width: 48px;
        height: 48px;
        font-size: 1.25rem;
        margin: 0 auto;
    }
    
    /* Service Planning - Mobile adjustments */
    .apple-service-planning {
        padding: 1rem 0.75rem;
    }
    
    .apple-container {
        padding: 0;
    }
    
    .apple-header {
        padding: 1.5rem 1.25rem;
        margin-bottom: 1.5rem;
    }
    
    .apple-header-content {
        flex-direction: column;
        gap: 1.25rem;
    }
    
    .apple-title {
        font-size: 1.75rem;
    }
    
    .apple-subtitle {
        font-size: 0.9375rem;
    }
    
    .apple-form-actions {
        flex-direction: column;
        padding: 1.5rem 1.25rem;
        position: relative;
        bottom: auto;
    }
    
    .apple-form-actions .apple-btn {
        width: 100%;
    }
    
    /* Login Page - Mobile adjustments */
    .apple-login-wrapper {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 1rem;
    }
    
    .apple-login-left {
        display: none; /* Hide illustration on mobile */
    }
    
    .apple-login-card {
        max-width: 100%;
        padding: 2rem 1.5rem;
    }
    
    .apple-login-title {
        font-size: 1.75rem;
    }
    
    .apple-login-logo {
        width: 56px;
        height: 56px;
        font-size: 1.5rem;
    }
    
    /* Funeral Management - Mobile adjustments */
    .funeral-card-clickable {
        margin-bottom: 1rem;
    }
    
    /* Mortuary forms - Better mobile layout */
    .mortuary-section-card {
        margin-bottom: 1rem;
    }
    
    /* Timeline - Better mobile display */
    .timeline {
        padding-left: 1rem;
    }
    
    .timeline-item {
        padding-left: 1rem;
        margin-left: -0.5rem;
    }
    
    .timeline-icon {
        left: -0.5rem;
        width: 1rem;
        height: 1rem;
    }
    
    .timeline-content {
        margin-left: 0.5rem;
    }
    
    /* Document and Image Lists - Better mobile grid */
    .personal-effects-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }
    
    .document-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
        padding: 0.75rem;
    }
    
    .document-item-actions {
        width: 100%;
        justify-content: flex-end;
    }
    
    /* Badges and Labels - Readable on mobile */
    .badge {
        font-size: 0.75rem;
        padding: 0.375rem 0.625rem;
    }
    
    /* Navigation - Mobile friendly */
    .nav-link {
        min-height: 44px;
        display: flex;
        align-items: center;
        padding: 0.75rem 1rem;
    }
    
    /* Alerts and Notifications */
    .alert {
        padding: 1rem;
        font-size: 0.9375rem;
        border-radius: 12px;
    }
    
    .apple-alert {
        padding: 1rem;
        font-size: 0.9375rem;
    }
    
    /* Dropdowns - Better mobile experience */
    .dropdown-menu {
        max-height: 50vh;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    /* Select dropdowns - Prevent zoom */
    select.form-control,
    select.apple-input,
    select.form-select {
        font-size: 16px !important;
        padding-right: 2.5rem;
    }
}

/* Extra Small Devices - iPhone SE and smaller */
@media (max-width: 375px) {
    body {
        font-size: 15px;
    }
    
    .container,
    .container-fluid {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
    
    .apple-login-card {
        padding: 1.5rem 1.25rem;
    }
    
    .apple-login-title {
        font-size: 1.5rem;
    }
    
    .apple-title {
        font-size: 1.5rem;
    }
    
    .modal-dialog {
        margin: 0.25rem;
        max-width: calc(100% - 0.5rem);
    }
    
    .modal-body {
        padding: 1.25rem 0.75rem;
    }
    
    .apple-form-section {
        padding: 1.25rem 1rem;
    }
    
    .table {
        font-size: 0.8125rem;
    }
    
    .table th,
    .table td {
        padding: 0.5rem 0.375rem;
    }
}

/* Landscape Orientation - iPhone */
@media (max-width: 896px) and (orientation: landscape) {
    .modal-body {
        max-height: calc(100vh - 150px);
    }
    
    .dha1663-timeline-column {
        max-height: 250px;
    }
    
    .apple-login-wrapper {
        grid-template-columns: 1fr 1fr;
    }
    
    .apple-login-left {
        display: flex;
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    /* Remove hover effects on touch devices */
    .btn:hover,
    .apple-btn:hover,
    .apple-request-card:hover,
    .apple-section-card:hover {
        transform: none;
    }
    
    /* Increase touch targets */
    a,
    button,
    .btn,
    .apple-btn,
    input[type="checkbox"],
    input[type="radio"] {
        min-height: 44px;
        min-width: 44px;
    }
    
    /* Better tap feedback */
    .btn:active,
    .apple-btn:active {
        opacity: 0.7;
        transform: scale(0.98);
    }
}

/* Prevent text selection on buttons and interactive elements */
.btn,
.apple-btn,
button,
.nav-link,
.apple-request-card {
    -webkit-tap-highlight-color: rgba(0, 122, 255, 0.1);
    -webkit-touch-callout: none;
    user-select: none;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

/* Prevent pull-to-refresh on iOS (if needed) */
body {
    overscroll-behavior-y: contain;
}

/* Safe area insets for iPhone X and newer */
@supports (padding: max(0px)) {
    .container,
    .container-fluid,
    .modal-body,
    .apple-modal-body {
        padding-left: max(1rem, env(safe-area-inset-left));
        padding-right: max(1rem, env(safe-area-inset-right));
    }
    
    .modal-footer,
    .apple-modal-footer {
        padding-bottom: max(1rem, env(safe-area-inset-bottom));
    }
}

/* Mortuary Modals Footer Fix - Ensure both buttons are visible */
#mortuaryRegisterInModal .apple-modal-footer,
#mortuaryRegisterOutModal .apple-modal-footer {
    display: flex !important;
    flex-direction: row !important;
    justify-content: flex-end !important;
    gap: 1rem !important;
    flex-shrink: 0 !important;
    overflow: visible !important;
    min-height: auto !important;
    max-height: none !important;
    padding: 1.5rem 2rem 2rem 2rem !important;
}

#mortuaryRegisterInModal .apple-modal-footer .apple-btn,
#mortuaryRegisterOutModal .apple-modal-footer .apple-btn {
    flex-shrink: 0 !important;
    white-space: nowrap !important;
    min-height: 44px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

#mortuaryRegisterInModal .apple-modal-body,
#mortuaryRegisterOutModal .apple-modal-body {
    max-height: calc(85vh - 200px) !important;
    overflow-y: auto !important;
}

@media (max-width: 768px) {
    #mortuaryRegisterInModal .apple-modal-footer,
    #mortuaryRegisterOutModal .apple-modal-footer {
        flex-direction: column !important;
        padding: 1rem !important;
    }
    
    #mortuaryRegisterInModal .apple-modal-footer .apple-btn,
    #mortuaryRegisterOutModal .apple-modal-footer .apple-btn {
        width: 100% !important;
    }
    
    #mortuaryRegisterInModal .apple-modal-body,
    #mortuaryRegisterOutModal .apple-modal-body {
        max-height: calc(85vh - 150px) !important;
    }
}

/* ============================================
   STAFF MEMBERS TABLE - COMPACT APPLE DESIGN
   ============================================ */
.staff-members-table-container {
    overflow-x: visible;
    width: 100%;
}

.staff-members-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.875rem;
}

.staff-members-table thead {
    background: #f5f5f7;
    position: sticky;
    top: 0;
    z-index: 10;
}

.staff-members-table thead th {
    padding: 0.875rem 0.75rem;
    font-weight: 600;
    font-size: 0.8125rem;
    color: #1d1d1f;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    border-bottom: 2px solid #e5e5e7;
    white-space: nowrap;
}

.staff-members-table tbody tr {
    border-bottom: 1px solid #f5f5f7;
    transition: background-color 0.2s ease;
}

.staff-members-table tbody tr:hover {
    background-color: #fafafa;
}

.staff-members-table tbody td {
    padding: 0.875rem 0.75rem;
    vertical-align: middle;
}

/* Column Widths - Optimized for no scrolling */
.staff-col-name {
    width: 18%;
    min-width: 180px;
}

.staff-col-branch {
    width: 15%;
    min-width: 140px;
}

.staff-col-contact {
    width: 25%;
    min-width: 200px;
}

.staff-col-employed {
    width: 10%;
    min-width: 100px;
}

.staff-col-login {
    width: 12%;
    min-width: 120px;
}

.staff-col-docs {
    width: 20%;
    min-width: 150px;
}

/* Staff Member Name */
.staff-member-name {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.staff-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.staff-avatar-placeholder {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1976d2;
    font-size: 1rem;
    flex-shrink: 0;
}

.staff-name-text {
    min-width: 0;
}

.staff-name-text strong {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #1d1d1f;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Branch Info */
.staff-branch-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.staff-branch-name {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #1d1d1f;
}

.staff-branch-name i {
    color: #007AFF;
    font-size: 0.75rem;
}

.staff-job-title {
    font-size: 0.75rem;
    color: #86868b;
    display: block;
}

/* Contact Info */
.staff-contact-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.staff-email {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #007AFF;
    text-decoration: none;
    font-size: 0.8125rem;
    transition: color 0.2s ease;
}

.staff-email:hover {
    color: #0051D5;
    text-decoration: underline;
}

.staff-email i {
    font-size: 0.75rem;
    flex-shrink: 0;
}

.staff-email span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}

.staff-phone {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
    color: #1d1d1f;
}

.staff-phone i {
    color: #34C759;
    font-size: 0.75rem;
    flex-shrink: 0;
}

/* Date Info */
.staff-date {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
    color: #1d1d1f;
}

.staff-date i {
    color: #FF9500;
    font-size: 0.75rem;
    flex-shrink: 0;
}

/* Login Info */
.staff-login {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
    color: #1d1d1f;
}

.staff-login i {
    color: #8E8E93;
    font-size: 0.75rem;
    flex-shrink: 0;
}

.staff-login span {
    white-space: nowrap;
}

/* Documents */
.staff-documents {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.staff-doc-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f7;
    color: #007AFF;
    text-decoration: none;
    transition: all 0.2s ease;
    border: 1px solid #e5e5e7;
    font-size: 0.875rem;
    flex-shrink: 0;
}

.staff-doc-btn:hover {
    background: #007AFF;
    color: white;
    border-color: #007AFF;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 122, 255, 0.2);
}

/* Mobile Responsive */
@media (max-width: 1200px) {
    .staff-members-table {
        font-size: 0.8125rem;
    }
    
    .staff-members-table thead th,
    .staff-members-table tbody td {
        padding: 0.75rem 0.5rem;
    }
    
    .staff-avatar,
    .staff-avatar-placeholder {
        width: 36px;
        height: 36px;
        font-size: 0.875rem;
    }
    
    .staff-name-text strong {
        font-size: 0.875rem;
    }
    
    .staff-email span {
        max-width: 150px;
    }
}

@media (max-width: 768px) {
    .staff-members-table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .staff-members-table {
        min-width: 800px;
        font-size: 0.8125rem;
    }
    
    .staff-members-table thead th,
    .staff-members-table tbody td {
        padding: 0.625rem 0.5rem;
    }
    
    .staff-avatar,
    .staff-avatar-placeholder {
        width: 32px;
        height: 32px;
        font-size: 0.75rem;
    }
    
    .staff-name-text strong {
        font-size: 0.8125rem;
    }
    
    .staff-email span {
        max-width: 120px;
    }
    
    .staff-doc-btn {
        width: 28px;
        height: 28px;
        font-size: 0.75rem;
    }
}

/* Apple Edit User Page Styles */
.apple-edit-user-container {
    min-height: 100vh;
    background: linear-gradient(180deg, #f5f5f7 0%, #ffffff 100%);
    padding: 0;
    position: relative;
}

.apple-edit-user-header {
    background: transparent;
    border-bottom: none;
    padding: 4rem 0 3rem 0;
    margin-bottom: 0;
    position: relative;
}

.apple-edit-user-header-content {
    max-width: 1200px !important;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.apple-edit-user-header .apple-header-text,
.apple-delete-user-header .apple-header-text {
    flex: 1;
}

.apple-edit-user-header .apple-main-title,
.apple-delete-user-header .apple-main-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1d1d1f;
    margin: 0 0 0.5rem 0;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, sans-serif;
    letter-spacing: -0.03em;
    line-height: 1.1;
}

.apple-edit-user-header .apple-subtitle,
.apple-delete-user-header .apple-subtitle {
    font-size: 1.0625rem;
    color: #86868b;
    margin: 0;
    font-weight: 400;
    line-height: 1.5;
    letter-spacing: -0.011em;
}

/* Improved Apple Back Button for Edit/Delete User Pages */
.apple-back-btn-icon {
    display: inline-flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.75rem 1.25rem;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 248, 250, 0.9) 100%);
    border: 1px solid rgba(142, 142, 147, 0.25);
    border-radius: 20px;
    color: #1d1d1f;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9375rem;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    transition: all 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 
        0 4px 16px rgba(0, 0, 0, 0.06),
        0 2px 8px rgba(0, 0, 0, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
    letter-spacing: -0.01em;
}

.apple-back-btn-icon::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 122, 255, 0.1) 0%, rgba(88, 86, 214, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 20px;
}

.apple-back-btn-icon::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(0, 122, 255, 0.15);
    transform: translate(-50%, -50%);
    transition: width 0.4s ease, height 0.4s ease;
}

.apple-back-btn-icon:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 1) 0%, rgba(248, 248, 250, 0.98) 100%);
    transform: translateY(-3px) translateX(-2px);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.12),
        0 4px 16px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.95);
    border-color: rgba(0, 122, 255, 0.35);
    color: #1d1d1f;
    text-decoration: none;
}

.apple-back-btn-icon:hover::before {
    opacity: 1;
}

.apple-back-btn-icon:hover::after {
    width: 200px;
    height: 200px;
}

.apple-back-btn-icon:active {
    transform: translateY(-1px) translateX(-1px);
    box-shadow: 
        0 4px 16px rgba(0, 0, 0, 0.08),
        0 2px 8px rgba(0, 0, 0, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.apple-back-btn-icon i {
    font-size: 0.875rem;
    color: #007AFF;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.apple-back-btn-icon:hover i {
    transform: translateX(-4px);
    color: #0051d5;
    filter: drop-shadow(0 2px 4px rgba(0, 122, 255, 0.3));
}

.apple-back-btn-icon span {
    position: relative;
    z-index: 1;
    font-weight: 600;
    letter-spacing: -0.01em;
    transition: color 0.3s ease;
}

.apple-back-btn-icon:hover span {
    color: #007AFF;
}

/* Responsive adjustments for back button */
@media (max-width: 768px) {
    .apple-back-btn-icon {
        padding: 0.625rem 1rem;
        font-size: 0.875rem;
        gap: 0.5rem;
    }
    
    .apple-back-btn-icon i {
        font-size: 0.8125rem;
    }
}

@media (max-width: 480px) {
    .apple-back-btn-icon {
        padding: 0.5625rem 0.875rem;
        font-size: 0.8125rem;
        border-radius: 18px;
        gap: 0.4375rem;
    }
    
    .apple-back-btn-icon i {
        font-size: 0.75rem;
    }
    
    .apple-back-btn-icon span {
        display: none; /* Hide text on very small screens, show only icon */
    }
    
    .apple-back-btn-icon {
        width: 40px;
        height: 40px;
        padding: 0;
        justify-content: center;
        border-radius: 50%;
    }
}

.apple-edit-user-content {
    max-width: 1200px !important;
    width: 100% !important;
    margin: 0 auto !important;
    padding: 0 2rem 4rem 2rem !important;
    background: transparent !important;
}

.apple-edit-user-form {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.apple-edit-user-form .apple-form-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 0 !important;
    width: 100% !important;
}

.apple-edit-user-container .apple-form-section {
    background: #ffffff !important;
    border-radius: 24px !important;
    padding: 3.5rem !important;
    margin-bottom: 0 !important;
    border: 0.5px solid rgba(0, 0, 0, 0.08) !important;
    overflow: hidden !important;
    box-shadow: 
        0 24px 72px rgba(0, 0, 0, 0.1),
        0 12px 40px rgba(0, 0, 0, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.9) !important;
    display: flex !important;
    flex-direction: column !important;
    height: fit-content !important;
    backdrop-filter: blur(40px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(40px) saturate(180%) !important;
    width: 100% !important;
    max-width: 100% !important;
    position: relative !important;
}

.apple-edit-user-container .apple-form-section::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    height: 3px !important;
    background: linear-gradient(90deg, 
        rgba(99, 102, 241, 0.4) 0%, 
        rgba(168, 85, 247, 0.5) 25%,
        rgba(236, 72, 153, 0.4) 50%,
        rgba(251, 146, 60, 0.3) 75%,
        transparent 100%) !important;
    border-radius: 24px 24px 0 0 !important;
}

/* Enhanced Edit User Styles */
.apple-edit-user-container .apple-section-header {
    display: flex !important;
    align-items: center !important;
    gap: 1.5rem !important;
    margin-bottom: 2.5rem !important;
    padding-bottom: 2rem !important;
    border-bottom: 0.5px solid rgba(0, 0, 0, 0.08) !important;
    position: relative !important;
}

.apple-edit-user-container .apple-section-icon {
    width: 64px !important;
    height: 64px !important;
    border-radius: 18px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: linear-gradient(135deg, 
        rgba(99, 102, 241, 0.2) 0%, 
        rgba(168, 85, 247, 0.18) 50%,
        rgba(236, 72, 153, 0.15) 100%) !important;
    color: #6366f1 !important;
    font-size: 1.75rem !important;
    flex-shrink: 0 !important;
    box-shadow: 
        0 6px 16px rgba(99, 102, 241, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.5) !important;
}

.apple-edit-user-container .apple-section-title {
    font-size: 2rem !important;
    font-weight: 700 !important;
    color: #1d1d1f !important;
    margin: 0 0 0.25rem 0 !important;
    letter-spacing: -0.02em !important;
    background: linear-gradient(135deg, #6366f1 0%, #a855f7 50%, #ec4899 100%) !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
}

.apple-edit-user-container .apple-form-row {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 2rem !important;
    margin-bottom: 1.75rem !important;
}

.apple-edit-user-container .apple-input {
    width: 100% !important;
    padding: 1rem 1.375rem !important;
    font-size: 0.9375rem !important;
    border: 1.5px solid rgba(0, 0, 0, 0.1) !important;
    border-radius: 14px !important;
    background: #ffffff !important;
    color: #1d1d1f !important;
    transition: all 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
    font-family: inherit !important;
    box-shadow: 
        0 2px 6px rgba(0, 0, 0, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.8) !important;
}

.apple-edit-user-container .apple-input:hover {
    border-color: rgba(99, 102, 241, 0.4) !important;
    box-shadow: 
        0 4px 12px rgba(99, 102, 241, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.9) !important;
    transform: translateY(-1px) !important;
}

.apple-edit-user-container .apple-input:focus {
    outline: none !important;
    border-color: #6366f1 !important;
    box-shadow: 
        0 0 0 4px rgba(99, 102, 241, 0.15),
        0 4px 12px rgba(99, 102, 241, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.9) !important;
    transform: translateY(-1px) !important;
}

.apple-section-header {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin-bottom: 2.5rem;
    padding-bottom: 2rem;
    border-bottom: 0.5px solid rgba(0, 0, 0, 0.08);
    position: relative;
    background: transparent;
}

.apple-section-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent 0%,
        rgba(99, 102, 241, 0.15) 50%,
        transparent 100%);
}

.apple-section-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: linear-gradient(135deg, 
        rgba(99, 102, 241, 0.15) 0%, 
        rgba(168, 85, 247, 0.12) 50%,
        rgba(236, 72, 153, 0.1) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6366f1;
    font-size: 1.5rem;
    flex-shrink: 0;
    box-shadow: 
        0 4px 12px rgba(99, 102, 241, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.apple-section-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1d1d1f;
    margin: 0;
    letter-spacing: -0.025em;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, sans-serif;
}

.apple-section-subtitle {
    font-size: 0.9375rem;
    color: #86868b;
    margin: 0.375rem 0 0 0;
    font-weight: 400;
    letter-spacing: -0.01em;
}

.apple-form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-bottom: 2rem;
    border-top: none;
}

.apple-form-row .apple-form-group {
    padding: 0;
    border-right: none;
}

.apple-form-group {
    display: flex;
    flex-direction: column;
    padding: 0;
    border-top: none;
}

.apple-form-group.full-width {
    grid-column: 1 / -1;
}

.apple-form-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #1d1d1f;
    margin-bottom: 0.625rem;
    letter-spacing: -0.01em;
    text-transform: none;
}

.apple-input {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 0.5px solid rgba(0, 0, 0, 0.12);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    font-size: 0.9375rem;
    color: #1d1d1f;
    transition: all 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    outline: none;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, sans-serif;
    box-shadow: 
        0 1px 3px rgba(0, 0, 0, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.apple-input:hover {
    border-color: rgba(99, 102, 241, 0.3);
    background: rgba(255, 255, 255, 1);
    box-shadow: 
        0 2px 6px rgba(0, 0, 0, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.apple-input:focus {
    border-color: #6366f1;
    background: rgba(255, 255, 255, 1);
    box-shadow: 
        0 0 0 4px rgba(99, 102, 241, 0.12),
        0 4px 12px rgba(99, 102, 241, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.95);
    outline: none;
}

.apple-input::placeholder {
    color: #86868b;
}

.apple-input-error {
    border-color: #ff3b30;
}

.apple-input-error:focus {
    box-shadow: 0 0 0 3px rgba(255, 59, 48, 0.1);
}

.apple-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%231d1d1f' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
    cursor: pointer;
}

.apple-error-message {
    display: block;
    color: #ff3b30;
    font-size: 0.8125rem;
    margin-top: 0.375rem;
}

.apple-form-help {
    font-size: 0.8125rem;
    color: #86868b;
    margin-top: 0.5rem;
}

.apple-file-preview {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: none;
}

.apple-image-preview {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    margin-top: 0.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.apple-pdf-link {
    display: inline-block;
    color: #007aff;
    text-decoration: none;
    font-size: 0.875rem;
    margin-top: 0.5rem;
    transition: color 0.2s ease;
}

.apple-pdf-link:hover {
    color: #0051d5;
    text-decoration: underline;
}

.apple-profile-section {
    text-align: center;
}

.apple-profile-upload {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.apple-profile-image-container {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid rgba(123, 31, 162, 0.2);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.apple-profile-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Enhanced Profile Image Upload Section */
.apple-edit-user-container .apple-profile-upload-section {
    margin-bottom: 2.5rem;
    padding-bottom: 2.5rem;
    border-bottom: 0.5px solid rgba(0, 0, 0, 0.08);
    position: relative;
}

.apple-edit-user-container .apple-profile-upload-section::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent 0%,
        rgba(99, 102, 241, 0.15) 50%,
        transparent 100%);
}

.apple-profile-upload-container {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-top: 1rem;
}

.apple-profile-image-wrapper {
    position: relative;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    background: linear-gradient(135deg, 
        rgba(99, 102, 241, 0.1) 0%, 
        rgba(168, 85, 247, 0.08) 50%,
        rgba(236, 72, 153, 0.06) 100%);
    border: 3px solid rgba(99, 102, 241, 0.2);
    box-shadow: 
        0 8px 24px rgba(99, 102, 241, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.apple-profile-image-wrapper:hover {
    transform: scale(1.05);
    box-shadow: 
        0 12px 32px rgba(99, 102, 241, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
    border-color: rgba(99, 102, 241, 0.3);
}

.apple-profile-image-wrapper .apple-profile-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.apple-profile-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, 
        rgba(99, 102, 241, 0.15) 0%, 
        rgba(168, 85, 247, 0.12) 50%,
        rgba(236, 72, 153, 0.1) 100%);
    color: #6366f1;
    font-size: 2.5rem;
    font-weight: 700;
    gap: 0.25rem;
}

.apple-profile-placeholder i {
    font-size: 3rem;
    opacity: 0.6;
}

.apple-profile-placeholder span {
    font-size: 2rem;
    font-weight: 700;
    color: #6366f1;
}

.apple-profile-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 50%;
}

.apple-profile-image-wrapper:hover .apple-profile-overlay {
    opacity: 1;
}

.apple-profile-input {
    display: none;
}

.apple-profile-upload-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: #ffffff;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 600;
    text-align: center;
    padding: 0.5rem;
    transition: transform 0.2s ease;
}

.apple-profile-upload-btn:hover {
    transform: scale(1.1);
}

.apple-profile-upload-btn i {
    font-size: 1.25rem;
}

.apple-profile-info {
    flex: 1;
}

.apple-profile-hint {
    font-size: 0.9375rem;
    color: #1d1d1f;
    margin: 0 0 0.25rem 0;
    font-weight: 500;
}

.apple-profile-format {
    font-size: 0.8125rem;
    color: #86868b;
    margin: 0;
}

/* Apple-Style Activity Log Section */
.apple-activity-section {
    margin-top: 2rem !important;
    padding-top: 2rem !important;
    border-top: 0.5px solid rgba(0, 0, 0, 0.08) !important;
    position: relative !important;
}

.apple-activity-section::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    height: 1px !important;
    background: linear-gradient(90deg, 
        transparent 0%,
        rgba(99, 102, 241, 0.15) 50%,
        transparent 100%) !important;
}

.apple-activity-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: flex-start !important;
    margin-bottom: 2rem !important;
    gap: 1rem !important;
}

.apple-activity-title-label {
    font-size: 1.125rem !important;
    font-weight: 700 !important;
    color: #1d1d1f !important;
    margin-bottom: 0.375rem !important;
    text-transform: none !important;
    letter-spacing: -0.01em !important;
}

.apple-activity-subtitle {
    font-size: 0.875rem !important;
    color: #86868b !important;
    margin: 0 !important;
    font-weight: 400 !important;
}

.apple-btn-sm {
    padding: 0.625rem 1.25rem !important;
    font-size: 0.875rem !important;
    border-radius: 12px !important;
}

.apple-document-activity {
    margin-top: 0 !important;
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    min-height: 0 !important;
}

/* Apple-Style Timeline */
.apple-activity-timeline {
    position: relative !important;
    padding-left: 2rem !important;
    max-height: 600px !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
}

.apple-timeline-item {
    position: relative !important;
    padding-bottom: 2rem !important;
    padding-left: 2.5rem !important;
}

.apple-timeline-item:last-child {
    padding-bottom: 0 !important;
}

.apple-timeline-item:last-child .apple-timeline-line {
    display: none !important;
}

.apple-timeline-line {
    position: absolute !important;
    left: 0.75rem !important;
    top: 2rem !important;
    bottom: -2rem !important;
    width: 2px !important;
    background: linear-gradient(180deg, 
        rgba(0, 0, 0, 0.08) 0%,
        rgba(0, 0, 0, 0.04) 50%,
        transparent 100%) !important;
}

.apple-timeline-dot {
    position: absolute !important;
    left: 0 !important;
    top: 0.25rem !important;
    width: 1.5rem !important;
    height: 1.5rem !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 2 !important;
    transition: all 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
}

.apple-timeline-dot i {
    font-size: 0.625rem !important;
    color: #ffffff !important;
    font-weight: 600 !important;
}

.apple-timeline-item:hover .apple-timeline-dot {
    transform: scale(1.15) !important;
}

.apple-timeline-content {
    background: transparent !important;
    border-radius: 0 !important;
    padding: 0 !important;
    transition: all 0.2s ease !important;
}

.apple-timeline-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: baseline !important;
    gap: 1rem !important;
    margin-bottom: 0.375rem !important;
}

.apple-timeline-title {
    font-size: 0.9375rem !important;
    font-weight: 600 !important;
    color: #1d1d1f !important;
    letter-spacing: -0.01em !important;
    line-height: 1.4 !important;
}

.apple-timeline-time {
    font-size: 0.8125rem !important;
    color: #86868b !important;
    font-weight: 400 !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
}

.apple-timeline-body {
    display: flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
    flex-wrap: wrap !important;
    margin-bottom: 0.25rem !important;
}

.apple-timeline-type {
    font-size: 0.75rem !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    padding: 0.25rem 0.625rem !important;
    border-radius: 6px !important;
    display: inline-block !important;
}

.apple-timeline-type-acknowledgment {
    background: rgba(52, 199, 89, 0.1) !important;
    color: #34c759 !important;
}

.apple-timeline-type-upload {
    background: rgba(0, 122, 255, 0.1) !important;
    color: #007AFF !important;
}

.apple-timeline-type-update {
    background: rgba(255, 149, 0, 0.1) !important;
    color: #ff9500 !important;
}

.apple-timeline-meta {
    font-size: 0.8125rem !important;
    color: #86868b !important;
    font-weight: 400 !important;
}

.apple-timeline-footer {
    margin-top: 0.25rem !important;
}

.apple-timeline-time-small {
    font-size: 0.75rem !important;
    color: #86868b !important;
    font-weight: 400 !important;
    font-family: 'SF Mono', 'Monaco', 'Courier New', monospace !important;
}

.apple-empty-state {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 3rem 2rem !important;
    text-align: center !important;
    min-height: 300px !important;
}

.apple-empty-icon {
    width: 80px !important;
    height: 80px !important;
    border-radius: 20px !important;
    background: linear-gradient(135deg, 
        rgba(99, 102, 241, 0.1) 0%, 
        rgba(168, 85, 247, 0.08) 50%,
        rgba(236, 72, 153, 0.06) 100%) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin-bottom: 1.5rem !important;
    border: 1px solid rgba(99, 102, 241, 0.1) !important;
}

.apple-empty-icon i {
    font-size: 2rem !important;
    color: #6366f1 !important;
    opacity: 0.6 !important;
}

.apple-empty-title {
    font-size: 1.125rem !important;
    font-weight: 600 !important;
    color: #1d1d1f !important;
    margin: 0 0 0.5rem 0 !important;
}

.apple-empty-description {
    font-size: 0.875rem !important;
    color: #86868b !important;
    margin: 0 !important;
    max-width: 400px !important;
}

.apple-activity-actions {
    display: flex;
    justify-content: center;
    margin-top: 1.5rem;
    padding: 0;
    border-top: none;
}

.apple-form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    padding: 2.5rem 0 0 0;
    margin-top: 3rem;
    border-top: 0.5px solid rgba(0, 0, 0, 0.08);
    position: relative;
    grid-column: 1 / -1;
}

.apple-form-actions::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent 0%,
        rgba(99, 102, 241, 0.15) 50%,
        transparent 100%);
}

.apple-empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: #86868b;
}

.apple-empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.apple-empty-state h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1d1d1f;
    margin: 0.5rem 0;
}

.apple-empty-state p {
    font-size: 0.9375rem;
    margin: 0.5rem 0 1.5rem 0;
}

/* Apple Disable User Page Styles */
.apple-disable-user-container {
    min-height: 100vh;
    background: #ffffff;
    padding: 0;
}

.apple-disable-user-header {
    background: #ffffff;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    padding: 2rem 2rem 1.75rem 2rem;
    margin-bottom: 0;
    box-shadow: none;
}

.apple-disable-user-header-content {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.apple-disable-user-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 2rem 4rem 2rem;
    background: #ffffff;
}

.apple-disable-warning {
    background: #ffffff;
    border-radius: 20px;
    padding: 3rem;
    text-align: center;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.06);
    margin-bottom: 2rem;
}

.apple-disable-user-info {
    background: #ffffff;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.06);
    margin-bottom: 2rem;
}

.apple-disable-form {
    margin-top: 2rem;
}

.apple-disable-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.apple-disable-error {
    background: #ffffff;
    border-radius: 20px;
    padding: 3rem;
    text-align: center;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.apple-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.875rem;
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 600;
}

.apple-status-badge.status-enabled {
    background: rgba(52, 199, 89, 0.1);
    color: #34c759;
}

.apple-status-badge.status-disabled {
    background: rgba(255, 59, 48, 0.1);
    color: #ff3b30;
}

.apple-status-badge i {
    font-size: 0.75rem;
}

/* Apple Loading Spinner */
.apple-spinner {
    width: 18px;
    height: 18px;
    border: 2.5px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: apple-spin 0.7s cubic-bezier(0.5, 0, 0.5, 1) infinite;
    display: inline-block;
    flex-shrink: 0;
}

@keyframes apple-spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.apple-btn.loading {
    position: relative;
    cursor: not-allowed;
    opacity: 0.85;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.apple-btn.loading .btn-loader {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.apple-btn.loading .btn-text {
    display: none !important;
}

.apple-btn-primary .apple-spinner {
    border-color: rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
}

.apple-btn-secondary .apple-spinner {
    border-color: rgba(29, 29, 31, 0.3);
    border-top-color: #1d1d1f;
}

/* EFT Form Loading State */
.eft-form.loading {
    position: relative;
}

.eft-form.loading::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    z-index: 5;
    border-radius: 0 0 20px 20px;
    pointer-events: none;
    animation: apple-fade-in 0.2s ease;
}

@keyframes apple-fade-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.eft-form.loading input,
.eft-form.loading select,
.eft-form.loading textarea {
    pointer-events: none;
    opacity: 0.6;
}

/* Purchase Order Form Loading State */
.po-form.loading {
    position: relative;
}

.po-form.loading::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    z-index: 5;
    border-radius: 0 0 20px 20px;
    pointer-events: none;
    animation: apple-fade-in 0.2s ease;
}

.po-form.loading input,
.po-form.loading select,
.po-form.loading textarea,
.po-form.loading button {
    pointer-events: none;
    opacity: 0.6;
}

/* Apple Delete User Page Styles */
.apple-delete-user-container {
    min-height: 100vh;
    background: #ffffff;
    padding: 0;
}

.apple-delete-user-header {
    background: #ffffff;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    padding: 2rem 2rem 1.75rem 2rem;
    margin-bottom: 0;
    box-shadow: none;
}

.apple-delete-user-header-content {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.apple-delete-user-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 2rem 4rem 2rem;
    background: #ffffff;
}

.apple-delete-warning {
    background: #ffffff;
    border-radius: 20px;
    padding: 3rem;
    text-align: center;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.06);
    margin-bottom: 2rem;
}

.apple-warning-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(255, 149, 0, 0.15) 0%, rgba(255, 149, 0, 0.05) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: #ff9500;
    font-size: 2.5rem;
}

.apple-warning-title {
    font-size: 1.75rem;
    font-weight: 600;
    color: #1d1d1f;
    margin: 0 0 1rem 0;
    letter-spacing: -0.3px;
}

.apple-warning-message {
    font-size: 1rem;
    color: #86868b;
    line-height: 1.6;
    margin: 0;
}

.apple-delete-user-info {
    background: #ffffff;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.06);
    margin-bottom: 2rem;
}

.apple-info-card {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.apple-info-item {
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.apple-info-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.apple-info-label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #86868b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.apple-info-value {
    font-size: 1.125rem;
    font-weight: 500;
    color: #1d1d1f;
}

.apple-delete-form {
    margin-top: 2rem;
}

.apple-delete-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.apple-delete-error {
    background: #ffffff;
    border-radius: 20px;
    padding: 3rem;
    text-align: center;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.apple-error-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(255, 59, 48, 0.15) 0%, rgba(255, 59, 48, 0.05) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: #ff3b30;
    font-size: 2.5rem;
}

.apple-error-title {
    font-size: 1.75rem;
    font-weight: 600;
    color: #1d1d1f;
    margin: 0 0 1rem 0;
    letter-spacing: -0.3px;
}

.apple-error-message {
    font-size: 1rem;
    color: #86868b;
    line-height: 1.6;
    margin: 0 0 2rem 0;
}

.apple-alert {
    background: #ffffff;
    border-radius: 16px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.apple-alert i {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.apple-alert-error {
    border-left: 4px solid #ff3b30;
}

.apple-alert-error i {
    color: #ff3b30;
}

.apple-alert p {
    margin: 0;
    font-size: 0.9375rem;
    color: #1d1d1f;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .apple-edit-user-header,
    .apple-delete-user-header,
    .apple-disable-user-header {
        padding: 1.5rem 1.5rem 1.25rem 1.5rem;
    }

    .apple-edit-user-header .apple-main-title,
    .apple-delete-user-header .apple-main-title,
    .apple-disable-user-header .apple-main-title {
        font-size: 2rem;
    }

    .apple-edit-user-content,
    .apple-delete-user-content,
    .apple-disable-user-content {
        padding: 1.5rem 1.5rem 3rem 1.5rem;
    }

    .apple-form-section {
        padding: 1.5rem;
    }

    .apple-form-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .apple-section-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .apple-section-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .apple-section-title {
        font-size: 1.25rem;
    }

    .apple-form-actions,
    .apple-delete-actions {
        flex-direction: column;
    }

    .apple-form-actions .apple-btn,
    .apple-delete-actions .apple-btn {
        width: 100%;
    }

    .apple-delete-warning,
    .apple-delete-error {
        padding: 2rem 1.5rem;
    }

    .apple-warning-icon,
    .apple-error-icon {
        width: 60px;
        height: 60px;
        font-size: 2rem;
    }

    .apple-warning-title,
    .apple-error-title {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .apple-edit-user-header-content,
    .apple-delete-user-header-content {
        gap: 1rem;
    }

    .apple-edit-user-header .apple-main-title,
    .apple-delete-user-header .apple-main-title,
    .apple-disable-user-header .apple-main-title {
        font-size: 1.75rem;
    }

    .apple-edit-user-header .apple-subtitle,
    .apple-delete-user-header .apple-subtitle,
    .apple-disable-user-header .apple-subtitle {
        font-size: 0.9375rem;
    }

    .apple-form-section {
        padding: 1.25rem;
    }

    .apple-delete-warning,
    .apple-delete-error {
        padding: 1.5rem 1rem;
    }
}

/* ============================================
   Service Planning Styles
   ============================================ */

/* Service Planning Container */
.apple-service-planning {
    position: relative;
    padding: 2rem 1rem;
    min-height: 100vh;
    background: #ffffff;
    color: #1d1d1f;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

/* Container */
.apple-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
}

/* Header */
.apple-header {
    position: relative;
    z-index: 1;
    margin-bottom: 2rem;
    padding: 2rem 2.5rem;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border-radius: 24px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06), 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.apple-header:hover {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08), 0 4px 12px rgba(0, 0, 0, 0.06);
    transform: translateY(-2px);
}

.apple-header-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 2rem;
}

.apple-header-text {
    flex: 1;
}

.apple-title {
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -0.04em;
    margin: 0 0 0.5rem 0;
    line-height: 1.1;
    color: #1d1d1f;
}

.apple-title-main {
    color: #1d1d1f;
    display: block;
    position: relative;
}

.apple-subtitle {
    font-size: 1rem;
    color: #6e6e73;
    margin: 0;
    font-weight: 400;
    letter-spacing: -0.01em;
    line-height: 1.5;
}

.apple-header-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

/* Buttons */
.apple-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-size: 0.9375rem;
    font-weight: 600;
    border-radius: 16px;
    border: none;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    letter-spacing: -0.01em;
    position: relative;
    overflow: hidden;
}

.apple-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.apple-btn:active::before {
    width: 300px;
    height: 300px;
}

.apple-btn-primary {
    background: linear-gradient(135deg, #007AFF 0%, #0051D5 100%);
    color: white;
    box-shadow: 0 4px 16px rgba(0, 122, 255, 0.35), 0 2px 8px rgba(0, 122, 255, 0.2);
}

.apple-btn-primary:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 24px rgba(0, 122, 255, 0.45), 0 4px 12px rgba(0, 122, 255, 0.3);
    color: white;
    text-decoration: none;
}

.apple-btn-primary:active {
    transform: translateY(0) scale(0.98);
}

.apple-btn-secondary {
    background: rgba(255, 255, 255, 0.95);
    color: #1d1d1f;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    backdrop-filter: blur(10px);
}

.apple-btn-secondary:hover {
    background: rgba(255, 255, 255, 1);
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    border-color: rgba(0, 0, 0, 0.12);
    color: #1d1d1f;
    text-decoration: none;
}

.apple-btn-secondary:active {
    transform: translateY(0) scale(0.98);
}

.apple-btn.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

/* Service Form */
.apple-service-form {
    position: relative;
}

/* Form Sections */
.apple-form-section {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 24px;
    padding: 2rem 2.5rem;
    margin-bottom: 1.75rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05), 0 2px 8px rgba(0, 0, 0, 0.03);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.apple-form-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, rgba(0, 122, 255, 0.1), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.apple-form-section:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08), 0 4px 12px rgba(0, 0, 0, 0.04);
    transform: translateY(-2px);
    border-color: rgba(0, 0, 0, 0.08);
}

.apple-form-section:hover::before {
    opacity: 1;
}

.apple-section-header {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid rgba(0, 0, 0, 0.04);
    position: relative;
}

.apple-section-header::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, #007AFF, rgba(0, 122, 255, 0.4));
    border-radius: 3px;
    transition: width 0.3s ease;
}

.apple-form-section:hover .apple-section-header::after {
    width: 120px;
}

.apple-section-icon {
    width: 52px;
    height: 52px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2), 0 3px 8px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.apple-section-icon::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 22px;
    opacity: 0;
    background: inherit;
    filter: blur(12px);
    transition: opacity 0.3s ease;
    z-index: -1;
}

.apple-form-section:hover .apple-section-icon {
    transform: scale(1.08) rotate(3deg);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3), 0 4px 12px rgba(0, 0, 0, 0.2);
}

.apple-form-section:hover .apple-section-icon::before {
    opacity: 0.4;
}

.apple-icon-purple {
    background: linear-gradient(135deg, #AF52DE 0%, #8E44AD 100%);
}

.apple-icon-blue {
    background: linear-gradient(135deg, #007AFF 0%, #0051D5 100%);
}

.apple-icon-orange {
    background: linear-gradient(135deg, #FF9500 0%, #FF8C00 100%);
}

.apple-icon-pink {
    background: linear-gradient(135deg, #FF2D55 0%, #E91E63 100%);
}

.apple-icon-teal {
    background: linear-gradient(135deg, #30D158 0%, #00C896 100%);
}

.apple-icon-green {
    background: linear-gradient(135deg, #34C759 0%, #30D158 100%);
}

.apple-section-title {
    font-size: 1.375rem;
    font-weight: 700;
    color: #1d1d1f;
    margin: 0 0 0.375rem 0;
    letter-spacing: -0.03em;
    line-height: 1.2;
}

.apple-section-subtitle {
    font-size: 0.9375rem;
    color: #6e6e73;
    margin: 0;
    font-weight: 400;
    line-height: 1.5;
}

/* Form Grid */
.apple-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.apple-form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    position: relative;
}

.apple-form-group-full {
    grid-column: 1 / -1;
}

.apple-label {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #1d1d1f;
    letter-spacing: -0.01em;
    margin-bottom: 0.125rem;
}

.apple-label-text {
    color: #1d1d1f;
}

.apple-label-required {
    color: #FF3B30;
}

/* Input Fields */
.apple-input,
.apple-select {
    width: 100%;
    padding: 0.875rem 1rem;
    font-size: 0.9375rem;
    font-family: inherit;
    color: #1d1d1f;
    background: rgba(255, 255, 255, 0.9);
    border: 1.5px solid rgba(0, 0, 0, 0.08);
    border-radius: 16px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.apple-input:hover,
.apple-select:hover {
    border-color: rgba(0, 122, 255, 0.3);
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.apple-input:focus,
.apple-select:focus {
    background: rgba(255, 255, 255, 1);
    border-color: #007AFF;
    box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.12), 0 2px 8px rgba(0, 122, 255, 0.15);
    transform: translateY(-1px);
}

.apple-input::placeholder {
    color: #86868b;
    opacity: 0.7;
}

.apple-select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Cpath fill='%236e6e73' d='M7 10L2 5h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
    background-size: 14px;
}

.apple-input-help {
    display: block;
    font-size: 0.8125rem;
    color: #6e6e73;
    margin-top: 0.25rem;
}

/* Flower Options */
.apple-flower-options {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.75rem;
    align-items: end;
}

/* Time Inputs */
.apple-time-inputs {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.apple-time-inputs .apple-input {
    flex: 1;
}

/* Form Actions */
.apple-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    padding: 2rem 2.5rem;
    margin: 2.5rem 0 1rem 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border-radius: 24px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06), 0 2px 8px rgba(0, 0, 0, 0.04);
    position: sticky;
    bottom: 2rem;
    z-index: 10;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.apple-form-actions:hover {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08), 0 4px 12px rgba(0, 0, 0, 0.06);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.apple-form-section {
    animation: fadeInUp 0.5s ease-out;
}

.apple-form-section:nth-child(1) { animation-delay: 0.05s; }
.apple-form-section:nth-child(2) { animation-delay: 0.1s; }
.apple-form-section:nth-child(3) { animation-delay: 0.15s; }
.apple-form-section:nth-child(4) { animation-delay: 0.2s; }
.apple-form-section:nth-child(5) { animation-delay: 0.25s; }
.apple-form-section:nth-child(6) { animation-delay: 0.3s; }

/* Responsive */
@media (max-width: 1024px) {
    .apple-container {
        max-width: 100%;
        padding: 0 1rem;
    }
}

@media (max-width: 768px) {
    .apple-service-planning {
        padding: 1.5rem 0.75rem;
    }
    
    .apple-container {
        padding: 0;
    }
    
    .apple-header {
        padding: 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    .apple-header-content {
        flex-direction: column;
        gap: 1.25rem;
    }
    
    .apple-title {
        font-size: 2rem;
    }
    
    .apple-form-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }
    
    .apple-form-section {
        padding: 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    .apple-section-header {
        gap: 1rem;
        margin-bottom: 1.5rem;
        padding-bottom: 1.25rem;
    }
    
    .apple-header-actions {
        width: 100%;
    }
    
    .apple-btn {
        flex: 1;
        padding: 0.75rem 1.25rem;
    }
    
    .apple-form-actions {
        flex-direction: column;
        padding: 1.5rem;
        margin: 2rem 0 0 0;
        position: relative;
        bottom: auto;
    }
    
    .apple-form-actions .apple-btn {
        width: 100%;
    }
    
    .apple-section-icon {
        width: 44px;
        height: 44px;
        font-size: 1.25rem;
    }
    
    .apple-section-title {
        font-size: 1.25rem;
    }
    
    .apple-flower-options {
        grid-template-columns: 1fr;
    }
    
    .apple-time-inputs {
        flex-direction: column;
        align-items: stretch;
    }
}