/* Modern Design System - "Glass & Space" Theme */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    /* Color Palette */
    --primary-hue: 220;
    --primary-color: hsl(var(--primary-hue), 90%, 56%);
    /* Bright Modern Blue */
    --primary-hover: hsl(var(--primary-hue), 90%, 50%);
    --secondary-color: #64748b;

    --bg-body: #f8fafc;
    --bg-surface: #ffffff;
    --bg-glass: rgba(255, 255, 255, 0.7);

    --text-main: #0f172a;
    --text-muted: #64748b;

    --border-light: rgba(148, 163, 184, 0.2);

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-card: 0 20px 25px -5px rgb(0 0 0 / 0.05), 0 8px 10px -6px rgb(0 0 0 / 0.01);

    /* Radius */
    --radius-sm: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
}

body {
    background-color: #f1f5f9;
    font-family: 'Inter', sans-serif;
    color: var(--text-main);
    -webkit-font-smoothing: antialiased;
    /* Delicate Mesh Gradient Background */
    background-image:
        radial-gradient(at 0% 0%, hsla(210, 100%, 96%, 1) 0px, transparent 50%),
        /* Soft Blue Top-Left */
        radial-gradient(at 100% 0%, hsla(340, 100%, 96%, 1) 0px, transparent 50%),
        /* Soft Pink Top-Right */
        radial-gradient(at 0% 50%, hsla(260, 100%, 97%, 1) 0px, transparent 50%),
        /* Soft Purple Left-Center */
        radial-gradient(at 100% 100%, hsla(200, 100%, 97%, 1) 0px, transparent 50%);
    /* Light Blue Bottom-Right */
    background-attachment: fixed;
    min-height: 100vh;
}

/* Glassmorphism Utilities */
.glass-panel {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow:
        0 4px 6px -1px rgba(0, 0, 0, 0.05),
        0 10px 15px -3px rgba(0, 0, 0, 0.05);
}

.card-modern {
    border: none;
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.85);
    /* Slightly more opaque to pop against light background */
    backdrop-filter: blur(8px);
    box-shadow:
        0 4px 6px -1px rgba(0, 0, 0, 0.05),
        0 10px 15px -3px rgba(0, 0, 0, 0.1);
    /* Stronger floating shadow */
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-modern:hover {
    transform: translateY(-2px);
    box-shadow:
        0 10px 25px -5px rgba(0, 0, 0, 0.1),
        0 8px 10px -6px rgba(0, 0, 0, 0.05);
}

/* Navbar Modernization */
.navbar-custom {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border-light);
    padding: 1rem 0;
}

.navbar-brand img {
    height: 40px;
}

/* Button Upgrades */
.btn {
    border-radius: var(--radius-md);
    padding: 0.625rem 1.25rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    transition: all 0.2s;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    box-shadow: 0 4px 6px -1px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    box-shadow: 0 6px 8px -1px rgba(59, 130, 246, 0.4);
    transform: translateY(-1px);
}

.btn-light {
    background: white;
    border: 1px solid var(--border-light);
    color: var(--text-main);
}

.btn-light:hover {
    background-color: #f1f5f9;
    border-color: #cbd5e1;
}

/* Icon Buttons */
.btn-icon {
    width: 42px;
    height: 42px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.btn-day-select {
    padding: 0.35rem 0.25rem !important;
    /* Force tight padding for 7-day row */
    font-size: 0.9rem;
    flex: 1;
    /* Distribute space evenly */
}

/* Status Indicators */
.status-pill {
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.status-pill.active {
    background-color: rgba(16, 185, 129, 0.1);
    color: #059669;
}

.status-pill.inactive {
    background-color: rgba(239, 68, 68, 0.1);
    color: #dc2626;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: currentColor;
}

/* Typography Enhancements */
h1,
h2,
h3,
h4,
h5,
h6 {
    letter-spacing: -0.025em;
    font-weight: 700;
}

.text-gradient {
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-image: linear-gradient(135deg, var(--primary-color), #8b5cf6);
}

/* Dashboard Grid Layout (Mobile First) */
.mobile-view {
    max-width: 100%;
    background-color: transparent !important;
    /* Override style.css white background */
    box-shadow: none !important;
    /* Remove container shadow so internal cards float individually */
}

@media (min-width: 768px) {
    .mobile-view {
        max-width: 800px;
        /* Constrain width for better reading on desktop if single column */
        margin: 2rem auto;
    }
}

/* Section Headers */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
}

.section-title {
    font-size: 1.0rem;
    /* Mniejszy, bardziej elegancki */
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    /* Szersze odstępy */
    background: linear-gradient(90deg, var(--primary-color), #6366f1);
    /* Gradient */
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

/* Lists */
.list-group-item-modern {
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--border-light);
    padding: 0.5rem 0;
}

.list-group-item-modern:last-child {
    border-bottom: none;
}

/* Alert Styling */
.alert-modern {
    border: none;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    background: white;
    border-left: 4px solid var(--primary-color);
}

.alert-modern.alert-warning {
    border-left-color: #f59e0b;
}

.alert-modern.alert-danger {
    border-left-color: #ef4444;
}

/* Avatar */
.avatar-profile {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-xl);
    border: 3px solid white;
    box-shadow: var(--shadow-md);
}

/* Timeline Badge Styles - Smaller Version */
.timeline-badge {
    width: 24px;
    height: 24px;
    background-color: white;
    border: 2px solid var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    position: absolute;
    top: 0;
    left: -1px;
    /* Wyśrodkowanie na obramowaniu 2px */
    transform: translateX(-50%);
    z-index: 5;
}

.timeline-badge.status-alert,
.timeline-badge.status-error {
    border-color: #ef4444;
}

.timeline-badge i {
    font-size: 0.75rem;
    color: var(--primary-color);
}

.timeline-badge.status-alert i,
.timeline-badge.status-error i {
    color: #ef4444;
}

/* Pagination Modernization */
.pagination-modern {
    gap: 0.5rem;
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    align-items: center;
}

.pagination-modern .page-item {
    margin: 0;
}

.pagination-modern .page-link {
    border: 1px solid var(--border-light);
    background: var(--bg-surface);
    color: var(--text-main);
    border-radius: var(--radius-md) !important;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    font-weight: 500;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-sm);
}

.pagination-modern .page-link:hover {
    background: var(--bg-body);
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-2px) scale(1.05);
    box-shadow: var(--shadow-md);
}

.pagination-modern .page-item.active .page-link,
.pagination-modern .page-item.disabled .page-link {
    transform: none !important;
}

.pagination-modern .page-item.active .page-link {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    box-shadow: 0 4px 10px -2px hsla(var(--primary-hue), 90%, 56%, 0.4);
}

.pagination-modern .page-item.disabled .page-link {
    background: transparent;
    border-color: transparent;
    color: var(--text-muted);
    box-shadow: none;
    opacity: 0.5;
    pointer-events: none;
}

.pagination-modern .page-link:focus {
    box-shadow: 0 0 0 3px hsla(var(--primary-hue), 90%, 56%, 0.2);
    outline: none;
}

/* Large/Mobile adjustments for link arrows */
.pagination-modern .page-link i {
    font-size: 1.1rem;
}