/**
 * Hospic Rajhrad Information System v2.0
 * Modern Glass Design - Redesign 2026
 */

/* ==========================================
   CSS Variables & Root
   ========================================== */
:root {
    /* Colors - Red Charity theme (Andělé na kolečkách) */
    --color-primary: #dc2626;
    --color-primary-dark: #b91c1c;
    --color-primary-light: #ef4444;
    --color-secondary: #64748b;
    --color-accent: #b91c1c;
    --color-success: #22c55e;
    --color-warning: #f59e0b;
    --color-danger: #ef4444;
    --color-info: #0ea5e9;

    --color-bg: #f1f5f9;
    --color-bg-card: #ffffff;
    --color-border: #e2e8f0;
    --color-text: #0f172a;
    --color-text-muted: #64748b;
    --color-text-light: #94a3b8;

    /* Sidebar */
    --sidebar-width: 260px;
    --sidebar-bg: linear-gradient(180deg, #7f1d1d 0%, #991b1b 50%, #b91c1c 100%);
    --sidebar-text: rgba(255,255,255,0.85);
    --sidebar-text-muted: rgba(255,255,255,0.5);

    --header-height: 60px;

    /* Shadows - Softer */
    --shadow-sm: 0 1px 2px rgb(0 0 0 / 0.04);
    --shadow-md: 0 4px 12px rgb(0 0 0 / 0.08);
    --shadow-lg: 0 12px 40px rgb(0 0 0 / 0.12);
    --shadow-glow: 0 0 20px rgb(99 102 241 / 0.15);

    /* Radius */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-full: 9999px;

    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================
   Base Styles
   ========================================== */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 0.875rem;
    line-height: 1.6;
    color: var(--color-text);
    background: var(--color-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--color-primary-dark);
}

/* ==========================================
   Typography
   ========================================== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 0.5em;
    letter-spacing: -0.01em;
}

.page-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    background: linear-gradient(135deg, var(--color-text) 0%, var(--color-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.page-subtitle {
    color: var(--color-text-muted);
    font-size: 0.875rem;
    font-weight: 400;
}

/* ==========================================
   Layout - Admin
   ========================================== */
.admin-wrapper {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    color: white;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 1000;
    transition: var(--transition-slow);
    overflow-y: auto;
    overflow-x: hidden;
    box-shadow: var(--shadow-lg);
}

.sidebar::-webkit-scrollbar {
    width: 4px;
}

.sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.2);
    border-radius: 10px;
}

.sidebar-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    background: rgba(0,0,0,0.1);
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: white;
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: -0.02em;
}

.sidebar-logo:hover {
    color: white;
}

.sidebar-logo img {
    height: 36px;
    width: auto;
    border-radius: var(--radius-sm);
}

.sidebar-logo .iconify {
    font-size: 1.75rem;
    color: var(--color-primary-light);
}

.sidebar-nav {
    padding: 1rem 0;
}

.nav-section {
    padding: 0.5rem 1.5rem;
    margin-top: 0.5rem;
}

.nav-section-title {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--sidebar-text-muted);
    margin-bottom: 0.5rem;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.7rem 1.5rem;
    color: var(--sidebar-text);
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 0;
    transition: var(--transition);
    position: relative;
    margin: 2px 0;
}

.nav-link:hover {
    background: rgba(255,255,255,0.08);
    color: white;
    padding-left: 1.75rem;
}

.nav-link.active {
    background: rgba(255,255,255,0.12);
    color: white;
    font-weight: 600;
}

.nav-link.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--color-primary-light);
    border-radius: 0 4px 4px 0;
}

.nav-link .iconify {
    font-size: 1.25rem;
    opacity: 0.9;
    flex-shrink: 0;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--color-bg);
}

/* Top Header */
.top-header {
    height: var(--header-height);
    background: rgba(255,255,255,0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--color-text);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.mobile-menu-btn:hover {
    background: var(--color-bg);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-dropdown {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.75rem;
    background: var(--color-bg);
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid transparent;
}

.user-dropdown:hover {
    background: white;
    border-color: var(--color-border);
    box-shadow: var(--shadow-sm);
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.75rem;
    box-shadow: 0 2px 8px rgb(99 102 241 / 0.3);
}

.user-info {
    text-align: left;
}

.user-name {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--color-text);
    line-height: 1.3;
}

.user-role {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    line-height: 1.3;
}

/* Content Area */
.content-area {
    flex: 1;
    padding: 1.5rem;
}

/* ==========================================
   Cards - Glass Effect
   ========================================== */
.card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    overflow: hidden;
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--color-border);
    background: linear-gradient(180deg, rgba(241, 245, 249, 0.5) 0%, transparent 100%);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-title {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card-title .iconify {
    font-size: 1.25rem;
    color: var(--color-primary);
}

.card-body {
    padding: 1.25rem;
}

.card-footer {
    padding: 1rem 1.25rem;
    background: var(--color-bg);
    border-top: 1px solid var(--color-border);
}

/* Stat Cards */
.stat-card {
    padding: 1.25rem;
    border-radius: var(--radius-lg);
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--color-primary) 0%, var(--color-accent) 100%);
    opacity: 0;
    transition: var(--transition);
}

.stat-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.stat-card:hover::before {
    opacity: 1;
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.stat-icon.primary { background: linear-gradient(135deg, rgba(220, 38, 38, 0.15) 0%, rgba(220, 38, 38, 0.05) 100%); color: var(--color-primary); }
.stat-icon.success { background: linear-gradient(135deg, rgba(34, 197, 94, 0.15) 0%, rgba(34, 197, 94, 0.05) 100%); color: var(--color-success); }
.stat-icon.warning { background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, rgba(245, 158, 11, 0.05) 100%); color: var(--color-warning); }
.stat-icon.danger { background: linear-gradient(135deg, rgba(239, 68, 68, 0.15) 0%, rgba(239, 68, 68, 0.05) 100%); color: var(--color-danger); }
.stat-icon.info { background: linear-gradient(135deg, rgba(14, 165, 233, 0.15) 0%, rgba(14, 165, 233, 0.05) 100%); color: var(--color-info); }

.stat-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--color-text);
    line-height: 1;
    letter-spacing: -0.02em;
}

.stat-label {
    font-size: 0.8125rem;
    color: var(--color-text-muted);
    margin-top: 0.25rem;
    font-weight: 500;
}

/* ==========================================
   Tables - Modern Style
   ========================================== */
.table {
    margin-bottom: 0;
    font-size: 0.875rem;
}

.table th {
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-muted);
    background: var(--color-bg);
    border-bottom: 2px solid var(--color-border);
    padding: 0.875rem 1rem;
    white-space: nowrap;
}

.table td {
    padding: 0.875rem 1rem;
    vertical-align: middle;
    border-bottom: 1px solid var(--color-border);
}

.table tbody tr {
    transition: var(--transition);
}

.table tbody tr:hover {
    background: linear-gradient(90deg, rgba(99, 102, 241, 0.03) 0%, transparent 100%);
}

.table-responsive {
    border-radius: var(--radius-md);
    overflow: hidden;
}

/* ==========================================
   Forms - Clean Design
   ========================================== */
.form-label {
    font-weight: 600;
    font-size: 0.8125rem;
    color: var(--color-text);
    margin-bottom: 0.375rem;
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.form-label .iconify {
    font-size: 1rem;
    color: var(--color-text-muted);
}

.form-control, .form-select {
    border: 2px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 0.625rem 0.875rem;
    font-size: 0.875rem;
    transition: var(--transition);
    background: var(--color-bg-card);
}

.form-control:focus, .form-select:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.1);
    outline: none;
}

.form-control::placeholder {
    color: var(--color-text-light);
}

.form-text {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    margin-top: 0.375rem;
}

.form-check-input {
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid var(--color-border);
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.form-check-input:checked {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
}

.form-check-input:focus {
    box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.1);
}

/* ==========================================
   Buttons - Modern with Icons
   ========================================== */
.btn {
    font-weight: 600;
    padding: 0.625rem 1.25rem;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border: 2px solid transparent;
}

.btn .iconify {
    font-size: 1.125rem;
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.8125rem;
    border-radius: var(--radius-sm);
}

.btn-sm .iconify {
    font-size: 1rem;
}

.btn-lg {
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    border-color: var(--color-primary);
    color: white;
    box-shadow: 0 4px 12px rgb(99 102 241 / 0.25);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--color-primary-dark) 0%, #4338ca 100%);
    border-color: var(--color-primary-dark);
    box-shadow: 0 6px 20px rgb(99 102 241 / 0.35);
    transform: translateY(-1px);
}

.btn-success {
    background: linear-gradient(135deg, var(--color-success) 0%, #16a34a 100%);
    border-color: var(--color-success);
    color: white;
    box-shadow: 0 4px 12px rgb(34 197 94 / 0.25);
}

.btn-success:hover {
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
    border-color: #16a34a;
    box-shadow: 0 6px 20px rgb(34 197 94 / 0.35);
    transform: translateY(-1px);
}

.btn-danger {
    background: linear-gradient(135deg, var(--color-danger) 0%, #dc2626 100%);
    border-color: var(--color-danger);
    color: white;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    transform: translateY(-1px);
}

.btn-outline-secondary {
    border-color: var(--color-border);
    color: var(--color-text);
    background: white;
}

.btn-outline-secondary:hover {
    background: var(--color-bg);
    border-color: var(--color-text-muted);
    color: var(--color-text);
}

.btn-outline-primary {
    border-color: var(--color-primary);
    color: var(--color-primary);
    background: white;
}

.btn-outline-primary:hover {
    background: var(--color-primary);
    color: white;
}

.btn-ghost {
    background: transparent;
    border-color: transparent;
    color: var(--color-text-muted);
}

.btn-ghost:hover {
    background: var(--color-bg);
    color: var(--color-text);
}

.btn-icon {
    padding: 0.5rem;
    width: 40px;
    height: 40px;
}

.btn-icon.btn-sm {
    width: 32px;
    height: 32px;
    padding: 0.25rem;
}

/* Button Group */
.btn-group .btn {
    border-radius: 0;
}

.btn-group .btn:first-child {
    border-radius: var(--radius-sm) 0 0 var(--radius-sm);
}

.btn-group .btn:last-child {
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.btn-group .btn:not(:last-child) {
    border-right-width: 1px;
}

/* ==========================================
   Badges & Status
   ========================================== */
.badge {
    font-weight: 600;
    font-size: 0.75rem;
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius-full);
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
}

.badge .iconify {
    font-size: 0.875rem;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
}

.status-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.status-badge.nova { background: #dbeafe; color: #1d4ed8; }
.status-badge.predbezna { background: #f1f5f9; color: #475569; }
.status-badge.doplnit { background: #fef3c7; color: #b45309; }
.status-badge.schvaleno { background: #dcfce7; color: #15803d; }
.status-badge.neschvaleno { background: #fee2e2; color: #b91c1c; }
.status-badge.prijato { background: #dbeafe; color: #1e40af; border: 1px solid #93c5fd; }
.status-badge.propusteno { background: #f1f5f9; color: #334155; border: 1px solid #cbd5e1; }

/* Role Badge */
.role-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.625rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    color: white;
}

/* ==========================================
   Alerts
   ========================================== */
.alert {
    border: none;
    border-radius: var(--radius-md);
    padding: 1rem 1.25rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    font-size: 0.875rem;
}

.alert .iconify {
    font-size: 1.25rem;
    flex-shrink: 0;
    margin-top: 0.125rem;
}

.alert-success {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.1) 0%, rgba(34, 197, 94, 0.05) 100%);
    color: #15803d;
    border-left: 4px solid var(--color-success);
}

.alert-danger {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(239, 68, 68, 0.05) 100%);
    color: #b91c1c;
    border-left: 4px solid var(--color-danger);
}

.alert-warning {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1) 0%, rgba(245, 158, 11, 0.05) 100%);
    color: #b45309;
    border-left: 4px solid var(--color-warning);
}

.alert-info {
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.1) 0%, rgba(14, 165, 233, 0.05) 100%);
    color: #0369a1;
    border-left: 4px solid var(--color-info);
}

/* ==========================================
   Stepper (for Application Form)
   ========================================== */
.stepper {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2rem;
    position: relative;
    padding: 0 1rem;
}

.stepper::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 60px;
    right: 60px;
    height: 3px;
    background: var(--color-border);
    border-radius: var(--radius-full);
}

.step {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 1;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--color-bg-card);
    border: 3px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.875rem;
    color: var(--color-text-muted);
    margin-bottom: 0.5rem;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.step-label {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    text-align: center;
    max-width: 80px;
    font-weight: 500;
}

.step.active .step-number {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    border-color: var(--color-primary);
    color: white;
    box-shadow: 0 4px 12px rgb(99 102 241 / 0.3);
}

.step.completed .step-number {
    background: linear-gradient(135deg, var(--color-success) 0%, #16a34a 100%);
    border-color: var(--color-success);
    color: white;
}

.step.active .step-label,
.step.completed .step-label {
    color: var(--color-text);
    font-weight: 600;
}

/* ==========================================
   Modal Enhancements
   ========================================== */
.modal-content {
    border: none;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.modal-header {
    border-bottom: 1px solid var(--color-border);
    padding: 1.25rem 1.5rem;
    background: var(--color-bg);
}

.modal-title {
    font-weight: 700;
    font-size: 1.125rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.modal-title .iconify {
    font-size: 1.375rem;
    color: var(--color-primary);
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    border-top: 1px solid var(--color-border);
    padding: 1rem 1.5rem;
    background: var(--color-bg);
}

/* ==========================================
   Application Form (Public)
   ========================================== */
.application-wrapper {
    min-height: 100vh;
    background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 50%, #c7d2fe 100%);
}

.application-header {
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(20px);
    padding: 1rem 0;
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
}

.application-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

.application-card {
    background: white;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    padding: 2rem;
    border: 1px solid rgba(255,255,255,0.5);
}

.form-section {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid var(--color-border);
}

.form-section:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.form-section-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-section-title .iconify {
    font-size: 1.375rem;
}

/* Care Type Selection */
.care-type-option {
    padding: 1.25rem;
    border: 2px solid var(--color-border);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.care-type-option::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--color-primary);
    opacity: 0;
    transition: var(--transition);
}

.care-type-option:hover {
    border-color: var(--color-primary-light);
    background: rgba(99, 102, 241, 0.02);
}

.care-type-option.selected {
    border-color: var(--color-primary);
    background: rgba(220, 38, 38, 0.05);
    box-shadow: var(--shadow-glow);
}

.care-type-option.selected::before {
    opacity: 1;
}

.care-type-option input {
    display: none;
}

.care-type-title {
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 0.375rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.care-type-title .iconify {
    font-size: 1.25rem;
    color: var(--color-primary);
}

.care-type-desc {
    font-size: 0.875rem;
    color: var(--color-text-muted);
}

/* File Upload */
.file-upload-zone {
    border: 2px dashed var(--color-border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    text-align: center;
    transition: var(--transition);
    cursor: pointer;
    background: var(--color-bg);
}

.file-upload-zone:hover,
.file-upload-zone.dragover {
    border-color: var(--color-primary);
    background: rgba(220, 38, 38, 0.05);
}

.file-upload-icon {
    font-size: 3rem;
    color: var(--color-primary);
    margin-bottom: 1rem;
    opacity: 0.7;
}

.file-list {
    margin-top: 1rem;
}

.file-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: var(--color-bg);
    border-radius: var(--radius-md);
    margin-bottom: 0.5rem;
    border: 1px solid var(--color-border);
}

.file-item .iconify {
    font-size: 1.5rem;
    color: var(--color-primary);
}

.file-item-name {
    flex: 1;
    font-size: 0.875rem;
    font-weight: 500;
}

.file-item-remove {
    color: var(--color-danger);
    cursor: pointer;
    font-size: 1.25rem;
    transition: var(--transition);
}

.file-item-remove:hover {
    transform: scale(1.1);
}

/* ==========================================
   Dropdown Menu
   ========================================== */
.dropdown-menu {
    font-size: 0.875rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 0.5rem;
    min-width: 200px;
}

.dropdown-item {
    padding: 0.625rem 1rem;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: var(--transition);
}

.dropdown-item .iconify {
    font-size: 1.125rem;
    color: var(--color-text-muted);
}

.dropdown-item:hover {
    background: var(--color-bg);
}

.dropdown-item:hover .iconify {
    color: var(--color-primary);
}

.dropdown-divider {
    margin: 0.5rem 0;
    border-color: var(--color-border);
}

/* ==========================================
   Nav Tabs (Bootstrap override for content tabs)
   ========================================== */
.nav-tabs .nav-link {
    color: var(--color-text-muted);
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    border-radius: 0;
    padding: 0.75rem 1.25rem;
    font-weight: 500;
    transition: var(--transition);
}

.nav-tabs .nav-link:hover {
    color: var(--color-primary);
    border-bottom-color: var(--color-border);
    background: transparent;
    padding-left: 1.25rem;
}

.nav-tabs .nav-link.active {
    color: var(--color-primary);
    background: transparent;
    border-bottom-color: var(--color-primary);
    font-weight: 600;
}

.nav-tabs .nav-link.active::before {
    display: none;
}

.nav-tabs {
    border-bottom: 2px solid var(--color-border);
}

/* ==========================================
   Breadcrumb
   ========================================== */
.breadcrumb {
    font-size: 0.8125rem;
    margin: 0;
}

.breadcrumb-item {
    color: var(--color-text-muted);
}

.breadcrumb-item a {
    color: var(--color-text-muted);
}

.breadcrumb-item a:hover {
    color: var(--color-primary);
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "/";
    color: var(--color-text-light);
    padding: 0 0.625rem;
}

.breadcrumb-item.active {
    color: var(--color-text);
    font-weight: 500;
}

/* ==========================================
   Pagination
   ========================================== */
.pagination {
    gap: 0.375rem;
}

.page-link {
    font-size: 0.8125rem;
    font-weight: 500;
    padding: 0.5rem 0.875rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    color: var(--color-text);
    transition: var(--transition);
}

.page-link:hover {
    background: var(--color-bg);
    border-color: var(--color-border);
    color: var(--color-text);
}

.page-item.active .page-link {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    border-color: var(--color-primary);
    color: white;
    box-shadow: 0 2px 8px rgb(99 102 241 / 0.25);
}

/* ==========================================
   Empty State
   ========================================== */
.empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
}

.empty-state .iconify {
    font-size: 4rem;
    color: var(--color-text-light);
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state h5 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: var(--color-text-muted);
    margin-bottom: 1.5rem;
}

/* ==========================================
   Action Buttons in Tables
   ========================================== */
.action-buttons {
    display: flex;
    gap: 0.25rem;
    align-items: center;
}

.action-buttons .btn {
    padding: 0.375rem 0.5rem;
}

/* ==========================================
   Responsive
   ========================================== */
@media (max-width: 1199.98px) {
    :root {
        --sidebar-width: 240px;
    }
}

@media (max-width: 991.98px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,0.5);
        z-index: 999;
        backdrop-filter: blur(4px);
    }

    .sidebar-overlay.open {
        display: block;
    }

    .content-area {
        padding: 1rem;
    }
}

@media (max-width: 767.98px) {
    .stepper {
        flex-wrap: wrap;
        gap: 0.5rem;
        padding: 0;
    }

    .stepper::before {
        display: none;
    }

    .step {
        flex: 0 0 calc(33.333% - 0.5rem);
    }

    .step-number {
        width: 36px;
        height: 36px;
        font-size: 0.8125rem;
    }

    .step-label {
        font-size: 0.6875rem;
        max-width: 70px;
    }

    .stat-card {
        margin-bottom: 1rem;
    }

    .content-area {
        padding: 0.75rem;
    }

    .application-content {
        padding: 1rem;
    }

    .application-card {
        padding: 1.25rem;
    }

    .card-body {
        padding: 1rem;
    }

    .table th,
    .table td {
        padding: 0.625rem 0.75rem;
        font-size: 0.8125rem;
    }

    .btn-group {
        flex-wrap: wrap;
    }

    .page-title {
        font-size: 1.25rem;
    }
}

@media (max-width: 575.98px) {
    .step-label {
        display: none;
    }

    .top-header {
        padding: 0 1rem;
    }

    .user-info {
        display: none !important;
    }

    .header-right .btn span:not(.iconify) {
        display: none;
    }
}

/* ==========================================
   Utility Classes
   ========================================== */
.text-primary { color: var(--color-primary) !important; }
.text-success { color: var(--color-success) !important; }
.text-warning { color: var(--color-warning) !important; }
.text-danger { color: var(--color-danger) !important; }
.text-muted { color: var(--color-text-muted) !important; }

.bg-primary-subtle { background-color: rgba(220, 38, 38, 0.1) !important; }
.bg-success-subtle { background-color: rgba(34, 197, 94, 0.1) !important; }
.bg-warning-subtle { background-color: rgba(245, 158, 11, 0.1) !important; }
.bg-danger-subtle { background-color: rgba(239, 68, 68, 0.1) !important; }
.bg-info-subtle { background-color: rgba(14, 165, 233, 0.1) !important; }

/* Bootstrap primary color override - Red Charity */
:root {
    --bs-primary: #dc2626 !important;
    --bs-primary-rgb: 220, 38, 38 !important;
}
.btn-primary {
    --bs-btn-bg: #dc2626;
    --bs-btn-border-color: #dc2626;
    --bs-btn-hover-bg: #b91c1c;
    --bs-btn-hover-border-color: #991b1b;
    --bs-btn-active-bg: #991b1b;
    --bs-btn-active-border-color: #7f1d1d;
}
.btn-outline-primary {
    --bs-btn-color: #dc2626;
    --bs-btn-border-color: #dc2626;
    --bs-btn-hover-bg: #dc2626;
    --bs-btn-hover-border-color: #dc2626;
    --bs-btn-active-bg: #b91c1c;
    --bs-btn-active-border-color: #b91c1c;
}

.cursor-pointer { cursor: pointer; }
.transition { transition: var(--transition); }
.fw-semibold { font-weight: 600; }

/* Glow effects */
.glow-primary { box-shadow: var(--shadow-glow); }
.glow-success { box-shadow: 0 0 20px rgb(34 197 94 / 0.15); }

/* Animation */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

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

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.fade-in {
    animation: fadeIn 0.3s ease;
}

.slide-in {
    animation: slideIn 0.3s ease;
}

/* Loading state */
.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Print */
@media print {
    .sidebar, .top-header, .btn, .no-print, .action-buttons {
        display: none !important;
    }

    .main-content {
        margin-left: 0 !important;
    }

    .card {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }

    body {
        background: white !important;
    }
}

/* ==========================================
   Custom Scrollbar
   ========================================== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--color-bg);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: var(--color-border);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-text-light);
}

/* ==========================================
   Focus States for Accessibility
   ========================================== */
*:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

.btn:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.2);
}
