
:root {
    /* TEG brand tokens */
    --color-hover: #545ffc;
    --color-primary: #111a26;
    --color-primary-dark: #0c1019;
    --white: #ffffff;
    --dark: #282525;
    --w-color-secondary: #545ffc;
    --w-color-secondary-400: #545ffc;
    /* Primary actions use indigo, not the navy chrome colour */
    --w-color-surface-button-default: #545ffc;
    --w-color-surface-button-hover: #7260e7;

    /* Palette - accent colors for diversity (matching admin tiles) */
    --color-blue: #3b82f6;
    --color-blue-dark: #2563eb;
    --color-blue-light: #dbeafe;
    --color-green: #22c55e;
    --color-green-dark: #16a34a;
    --color-green-light: #dcfce7;
    --color-cyan: #06b6d4;
    --color-cyan-dark: #0891b2;
    --color-cyan-light: #cffafe;
    --color-orange: #f59e0b;
    --color-orange-dark: #d97706;
    --color-orange-light: #fef3c7;
    --color-teal: #14b8a6;
    --color-teal-dark: #0d9488;
    --color-teal-light: #ccfbf1;
    --color-purple: #a855f7;
    --color-purple-dark: #9333ea;
    --color-purple-light: #f3e8ff;
    /*--w-color-box-shadow-md: var(--white);*/


    /* Powierzchnie */
    --w-color-surface-menus: var(--color-primary);
    --w-color-surface-menu-item-active: var(--color-primary-dark);
    --w-color-surface-tooltip: var(--color-primary);

    /* Tile hover - border uses indigo */
    --tile-hover-border: var(--color-hover);

    /* Text */
    --w-color-text-label: var(--color-hover);
    --w-color-text-link-default: var(--color-hover);
    --w-color-text-link-hover: #7260e7;
    --w-color-text-button-outline-default: var(--color-hover);
    --w-color-text-button-outline-hover: #7260e7;
    --w-color-text-highlight: var(--color-hover);
    --w-color-text-status-label: var(--color-hover);
    --w-color-text-link-info: var(--color-hover);

    /* Borders */
    --w-color-border-button-outline-default: var(--color-hover);
    --w-color-border-button-outline-hover: var(--color-hover);
}

.login{
    --w-color-surface-page: var(--white);
    --w-color-text-label: var(--color-primary);
    --w-color-surface-field: var(--white);
    --w-color-text-context: var(--dark);

    background-color: var(--white);
}

.login .logo-container{
    text-align: center;
    margin-top: 20px;
}

.sidebar-menu-item__link{
    font-weight: bold;
}

/* Hides theme selection section in user account settings */
#theme-section {
    display: none;
}

/* ============================================
   Scrollbar Hiding - Sidebar Menu
   ============================================ */

/* Force hide scrollbar on sidebar with maximum specificity */
nav.sidebar-main-menu,
.sidebar-main-menu,
.sidebar-main-menu.w-scrollbar-thin,
.w-scrollbar-thin,
[class*="w-scrollbar"] {
    scrollbar-width: none !important; /* Firefox */
    -ms-overflow-style: none !important; /* IE and Edge */
}

/* WebKit browsers (Chrome, Safari, Edge, Opera) */
nav.sidebar-main-menu::-webkit-scrollbar,
.sidebar-main-menu::-webkit-scrollbar,
.sidebar-main-menu.w-scrollbar-thin::-webkit-scrollbar,
.w-scrollbar-thin::-webkit-scrollbar,
[class*="w-scrollbar"]::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
}

/* ============================================
   Dashboard Tiles System
   ============================================ */

/* Container */
.dashboard-tiles-container {
    padding: 1.5rem;
    max-width: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
}

/* Zapewnia poprawne box-sizing dla wszystkich elementów */
.dashboard-tiles-container *,
.dashboard-tiles-container *::before,
.dashboard-tiles-container *::after {
    box-sizing: border-box;
}

/* Header */
.dashboard-tiles-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.dashboard-tiles-header__left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.dashboard-tiles-header__title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--w-color-text-context);
    margin: 0;
}

.dashboard-tiles-header__edition-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    color: var(--white);
    border-radius: 20px;
    font-size: 0.8125rem;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.dashboard-tiles-header__edition-badge .icon {
    width: 0.875rem;
    height: 0.875rem;
}

.dashboard-settings-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--w-color-surface-button-default);
    color: var(--white);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    transition: background-color 0.2s ease;
}

.dashboard-settings-btn:hover {
    background: var(--w-color-surface-button-hover);
}

.dashboard-settings-btn .icon {
    width: 1rem;
    height: 1rem;
}

/* Grid Layout - Fluid responsive grid */
.dashboard-tiles-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

/* 2 kolumny - przełączenie na 1500px */
@media (max-width: 1500px) {
    .dashboard-tiles-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
}

/* 1 kolumna - wcześniej na 850px */
@media (max-width: 850px) {
    .dashboard-tiles-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
}

/* Empty state */
.dashboard-tiles-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem;
    color: var(--w-color-text-meta);
}

/* Individual Tile */
.dashboard-tile {
    background: var(--w-color-surface-page);
    border: 1px solid var(--w-color-border-furniture);
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
    overflow: hidden;
    /* Zapobiega wylewaniu się zawartości */
    min-width: 0;
    max-width: 100%;
    /* Flex dla centrowania wertykalnego */
    display: flex;
    flex-direction: column;
}

.dashboard-tile:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.dashboard-tile--hidden {
    display: none;
}

/* Tile Header */
.dashboard-tile__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: var(--w-color-surface-header);
    border-bottom: 1px solid var(--w-color-border-furniture);
}

.dashboard-tile__header-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dashboard-tile__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-primary);
}

.dashboard-tile__icon .icon {
    width: 1.25rem;
    height: 1.25rem;
}

.dashboard-tile__title {
    font-weight: 600;
    font-size: 0.9375rem;
    color: var(--w-color-text-context);
}

.dashboard-tile__toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    color: var(--w-color-text-meta);
    transition: background-color 0.2s ease, color 0.2s ease;
}

.dashboard-tile__toggle:hover {
    background: var(--w-color-surface-field);
    color: var(--color-primary);
}

.dashboard-tile__toggle .icon {
    width: 1.25rem;
    height: 1.25rem;
}

/* Tile Content */
.dashboard-tile__content {
    padding: 1rem;
    min-width: 0;
    overflow-x: auto;
    overflow-y: visible;
    /* Ukrywa scrollbar ale pozwala na scroll */
    scrollbar-width: none;
    -ms-overflow-style: none;
    /* Flex dla centrowania wertykalnego zawartości */
    display: flex;
    flex-direction: column;
    flex: 1;
}

.dashboard-tile__content::-webkit-scrollbar {
    display: none;
}

/* Zapobiega wylewaniu się tekstu */
.dashboard-tile__content * {
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Drag & Drop States */
.dashboard-tile.sortable-ghost {
    opacity: 0.4;
}

.dashboard-tile.sortable-chosen {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    transform: scale(1.02);
}

.dashboard-tile.sortable-drag {
    opacity: 0.9;
}

/* ============================================
   Settings Modal
   ============================================ */

.dashboard-settings-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dashboard-settings-modal[hidden] {
    display: none;
}

.dashboard-settings-modal__backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
}

.dashboard-settings-modal__dialog {
    position: relative;
    background: var(--w-color-surface-page);
    border-radius: 8px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.25);
    width: 100%;
    max-width: 500px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.dashboard-settings-modal__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--w-color-border-furniture);
}

.dashboard-settings-modal__title {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0;
    color: var(--w-color-text-context);
}

.dashboard-settings-modal__close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    color: var(--w-color-text-meta);
    transition: background-color 0.2s ease;
}

.dashboard-settings-modal__close:hover {
    background: var(--w-color-surface-field);
    color: var(--w-color-text-context);
}

.dashboard-settings-modal__close .icon {
    width: 1.25rem;
    height: 1.25rem;
}

.dashboard-settings-modal__body {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
}

.dashboard-settings-modal__hint {
    font-size: 0.875rem;
    color: var(--w-color-text-meta);
    margin: 0 0 1rem 0;
}

.dashboard-settings-modal__footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--w-color-border-furniture);
    background: var(--w-color-surface-header);
}

/* Settings Sections */
.dashboard-settings-section {
    margin-bottom: 1rem;
}

.dashboard-settings-section__label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--w-color-text-context);
    margin-bottom: 0.375rem;
}

.dashboard-settings-section__label .icon {
    width: 1.125rem;
    height: 1.125rem;
    color: var(--color-primary);
}

.dashboard-settings-section__hint {
    font-size: 0.8125rem;
    color: var(--w-color-text-meta);
    margin: 0 0 0.75rem 0;
    line-height: 1.4;
}

.dashboard-settings-divider {
    border: none;
    border-top: 1px solid var(--w-color-border-furniture);
    margin: 1.25rem 0;
}

.dashboard-settings-select {
    width: 100%;
    padding: 0.625rem 0.875rem;
    font-size: 0.9375rem;
    border: 1px solid var(--w-color-border-field-default);
    border-radius: 6px;
    background: var(--w-color-surface-field);
    color: var(--w-color-text-context);
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.dashboard-settings-select:hover {
    border-color: var(--w-color-border-field-hover);
}

.dashboard-settings-select:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px rgba(148, 24, 42, 0.15);
}

/* Settings List */
.dashboard-settings-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.dashboard-settings-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: var(--w-color-surface-field);
    border: 1px solid var(--w-color-border-field-default);
    border-radius: 6px;
    margin-bottom: 0.5rem;
    cursor: grab;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.dashboard-settings-item:hover {
    border-color: var(--w-color-border-field-hover);
}

.dashboard-settings-item:last-child {
    margin-bottom: 0;
}

.dashboard-settings-item.sortable-ghost {
    opacity: 0.4;
}

.dashboard-settings-item.sortable-chosen {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    cursor: grabbing;
}

.dashboard-settings-item__drag {
    display: flex;
    align-items: center;
    color: var(--w-color-text-meta);
    cursor: grab;
}

.dashboard-settings-item__drag .icon {
    width: 1rem;
    height: 1rem;
}

.dashboard-settings-item__icon {
    display: flex;
    align-items: center;
    color: var(--color-primary);
}

.dashboard-settings-item__icon .icon {
    width: 1.25rem;
    height: 1.25rem;
}

.dashboard-settings-item__title {
    flex: 1;
    font-weight: 500;
    color: var(--w-color-text-context);
}

/* Toggle Switch */
.dashboard-settings-item__toggle {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.dashboard-settings-item__toggle input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    background: var(--w-color-border-furniture);
    border-radius: 12px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.toggle-slider::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: var(--white);
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease;
}

.dashboard-settings-item__toggle input:checked + .toggle-slider {
    background: var(--color-primary);
}

.dashboard-settings-item__toggle input:checked + .toggle-slider::before {
    transform: translateX(20px);
}

.dashboard-settings-item__toggle input:focus + .toggle-slider {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

/* Example Tile Content */
.example-tile-content {
    text-align: center;
}

.example-tile-content__message {
    color: var(--w-color-text-meta);
    margin: 0 0 1rem 0;
}

.example-tile-content__stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
}

.example-tile-content__stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.example-tile-content__stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-primary);
}

.example-tile-content__stat-label {
    font-size: 0.75rem;
    color: var(--w-color-text-meta);
    text-transform: uppercase;
}

/* ============================================
   Tile Header Actions (expand + toggle buttons)
   ============================================ */

.dashboard-tile__header-actions {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.dashboard-tile__expand {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    color: var(--w-color-text-meta);
    transition: background-color 0.2s ease, color 0.2s ease;
}

.dashboard-tile__expand:hover {
    background: var(--w-color-surface-field);
    color: var(--color-primary);
}

.dashboard-tile__expand .icon {
    width: 1rem;
    height: 1rem;
}

/* ============================================
   Tile Expand Modal
   ============================================ */

.tile-expand-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: tile-expand-modal-fadein 0.2s ease-out;
}

@keyframes tile-expand-modal-fadein {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.tile-expand-modal[hidden] {
    display: none;
}

.tile-expand-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
}

.tile-expand-modal__dialog {
    position: relative;
    background: var(--w-color-surface-page);
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.15);
    width: 94%;
    max-width: 1100px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    animation: tile-expand-modal-slidein 0.25s ease-out;
}

@keyframes tile-expand-modal-slidein {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.tile-expand-modal__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--w-color-border-furniture);
}

.tile-expand-modal__title {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
    color: var(--w-color-text-context);
}

.tile-expand-modal__actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tile-expand-modal__download {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    color: var(--w-color-text-meta);
    transition: background-color 0.2s ease, color 0.2s ease;
}

.tile-expand-modal__download:hover {
    background: var(--w-color-surface-field);
    color: var(--color-primary);
}

.tile-expand-modal__download .icon {
    width: 1.25rem;
    height: 1.25rem;
}

.tile-expand-modal__close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    color: var(--w-color-text-meta);
    transition: background-color 0.2s ease;
}

.tile-expand-modal__close:hover {
    background: var(--w-color-surface-field);
}

.tile-expand-modal__close .icon {
    width: 1.25rem;
    height: 1.25rem;
}

.tile-expand-modal__body {
    flex: 1;
    overflow: auto;
    padding: 1rem 1.5rem;
}

.tile-expand-modal__loading,
.tile-expand-modal__empty,
.tile-expand-modal__error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    gap: 1rem;
    color: var(--w-color-text-meta);
}

.tile-expand-modal__error {
    color: #ef4444;
}

.tile-expand-modal__footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--w-color-border-furniture);
    background: var(--w-color-surface-header);
}

/* Spinner */
.tile-expand-spinner {
    width: 2rem;
    height: 2rem;
    border: 3px solid var(--w-color-border-furniture);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: tile-expand-spin 1s linear infinite;
}

@keyframes tile-expand-spin {
    to { transform: rotate(360deg); }
}

/* Expand Table */
.tile-expand-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.tile-expand-table thead {
    position: sticky;
    top: 0;
    z-index: 1;
}

.tile-expand-table th {
    text-align: left;
    padding: 0.75rem 1rem;
    background: var(--w-color-surface-header);
    border-bottom: 2px solid var(--w-color-border-furniture);
    font-weight: 600;
    white-space: nowrap;
    color: var(--w-color-text-context);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.025em;
}

.tile-expand-table th.sortable {
    cursor: pointer;
    user-select: none;
    transition: background-color 0.2s ease;
}

.tile-expand-table th.sortable:hover {
    background: var(--w-color-surface-field);
}

.tile-expand-table th.sortable::after {
    content: '';
    display: inline-block;
    width: 0;
    height: 0;
    margin-left: 0.5rem;
    vertical-align: middle;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-bottom: 4px solid var(--w-color-text-meta);
    opacity: 0.3;
}

.tile-expand-table th.sort-asc::after {
    border-bottom: 4px solid var(--color-primary);
    opacity: 1;
}

.tile-expand-table th.sort-desc::after {
    border-bottom: none;
    border-top: 4px solid var(--color-primary);
    opacity: 1;
}

.tile-expand-table th.action-column {
    width: 60px;
    text-align: center;
}

.tile-expand-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--w-color-border-furniture);
    color: var(--w-color-text-context);
    transition: background-color 0.15s ease;
}

.tile-expand-table td.action-column {
    text-align: center;
}

.tile-expand-table tbody tr {
    transition: background-color 0.15s ease;
}

.tile-expand-table tbody tr:hover {
    background: var(--w-color-surface-field);
}

.tile-expand-table tbody tr:hover td {
    color: var(--w-color-text-context);
}

/* Zebra striping for better readability */
.tile-expand-table tbody tr:nth-child(even) {
    background: rgba(0, 0, 0, 0.02);
}

.tile-expand-table tbody tr:nth-child(even):hover {
    background: var(--w-color-surface-field);
}

/* Expand table links */
.expand-link,
.expand-action {
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 500;
}

.expand-link:hover,
.expand-action:hover {
    text-decoration: underline;
}

/* Expand progress bar */
.expand-progress {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.expand-progress__bar {
    flex: 1;
    height: 8px;
    background: var(--color-primary);
    border-radius: 4px;
    max-width: 80px;
}

.expand-progress span {
    font-size: 0.75rem;
    min-width: 32px;
    text-align: right;
}

/* Pagination */
.tile-expand-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
}

.tile-expand-pagination__btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 1rem;
    background: var(--w-color-surface-button-default);
    color: var(--white);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    transition: background-color 0.2s ease;
}

.tile-expand-pagination__btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.tile-expand-pagination__btn:not(:disabled):hover {
    background: var(--w-color-surface-button-hover);
}

.tile-expand-pagination__btn .icon {
    width: 1rem;
    height: 1rem;
}

.tile-expand-pagination__info {
    font-size: 0.875rem;
    color: var(--w-color-text-meta);
}

/* ============================================
   Responsive Styles - Global
   ============================================ */

/* Tablet breakpoint (1024px and below) */
@media (max-width: 1024px) {
    .dashboard-tiles-container {
        padding: 1.25rem;
    }

    .dashboard-tiles-header {
        gap: 0.75rem;
    }

    .dashboard-tiles-header__title {
        font-size: 1.375rem;
    }

    .dashboard-tile__content {
        padding: 0.875rem;
    }

    .dashboard-settings-modal__dialog {
        max-width: 450px;
        margin: 1rem;
    }

    /* Expand modal - tablet */
    .tile-expand-modal__dialog {
        width: 95vw;
        max-width: 800px;
        max-height: 85vh;
    }

    .tile-expand-table th,
    .tile-expand-table td {
        padding: 0.625rem 0.75rem;
    }
}

/* Small tablet / Large mobile (768px and below) */
@media (max-width: 768px) {
    .dashboard-tiles-container {
        padding: 1rem;
    }

    .dashboard-tiles-header {
        gap: 0.5rem;
    }

    .dashboard-tiles-header__left {
        flex-wrap: wrap;
        gap: 0.5rem;
        flex: 1;
        min-width: 0;
    }

    .dashboard-tiles-header__title {
        font-size: 1.25rem;
    }

    .dashboard-tiles-header__edition-badge {
        font-size: 0.75rem;
        padding: 0.25rem 0.625rem;
    }

    .dashboard-settings-btn {
        flex-shrink: 0;
    }

    .dashboard-tile {
        border-radius: 6px;
    }

    .dashboard-tile__header {
        padding: 0.75rem;
    }

    .dashboard-tile__title {
        font-size: 0.875rem;
    }

    .dashboard-tile__content {
        padding: 0.75rem;
    }

    .dashboard-settings-modal__dialog {
        max-width: calc(100% - 2rem);
        max-height: 90vh;
        margin: 1rem;
    }

    .dashboard-settings-modal__header {
        padding: 0.875rem 1rem;
    }

    .dashboard-settings-modal__title {
        font-size: 1rem;
    }

    .dashboard-settings-modal__body {
        padding: 1rem;
    }

    .dashboard-settings-modal__footer {
        padding: 0.875rem 1rem;
        flex-wrap: wrap;
    }

    .dashboard-settings-modal__footer .button {
        flex: 1;
        min-width: 100px;
    }

    .dashboard-settings-item {
        padding: 0.625rem;
        gap: 0.5rem;
    }

    .dashboard-settings-item__title {
        font-size: 0.875rem;
    }

    .toggle-slider {
        width: 40px;
        height: 22px;
    }

    .toggle-slider::before {
        width: 18px;
        height: 18px;
    }

    .dashboard-settings-item__toggle input:checked + .toggle-slider::before {
        transform: translateX(18px);
    }

    /* Expand modal - small tablet */
    .tile-expand-modal__dialog {
        width: calc(100% - 2rem);
        max-width: none;
        max-height: 90vh;
        margin: 1rem;
    }

    .tile-expand-modal__header {
        padding: 0.875rem 1rem;
    }

    .tile-expand-modal__title {
        font-size: 1.125rem;
    }

    .tile-expand-modal__body {
        padding: 0.75rem 1rem;
    }

    .tile-expand-modal__footer {
        padding: 0.75rem 1rem;
    }

    .tile-expand-table {
        font-size: 0.8125rem;
    }

    .tile-expand-table th,
    .tile-expand-table td {
        padding: 0.5rem 0.625rem;
    }

    /* Hide less important columns on smaller screens */
    .tile-expand-table .hide-on-mobile {
        display: none;
    }

    .tile-expand-pagination {
        gap: 0.5rem;
    }

    .tile-expand-pagination__btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.8125rem;
    }
}

/* Mobile breakpoint (600px and below) */
@media (max-width: 600px) {
    .dashboard-tiles-container {
        padding: 0.75rem;
    }

    .dashboard-tiles-grid {
        gap: 0.75rem;
    }

    .dashboard-tiles-header__title {
        font-size: 1.125rem;
    }

    .dashboard-settings-btn span {
        display: none;
    }

    .dashboard-settings-btn {
        width: auto;
        padding: 0.5rem;
    }

    .dashboard-tile__header {
        padding: 0.625rem 0.75rem;
    }

    .dashboard-tile__icon .icon {
        width: 1rem;
        height: 1rem;
    }

    .dashboard-tile__toggle {
        width: 1.75rem;
        height: 1.75rem;
    }

    .dashboard-settings-section__label {
        font-size: 0.875rem;
    }

    .dashboard-settings-section__hint {
        font-size: 0.75rem;
    }

    .dashboard-settings-select {
        font-size: 0.875rem;
        padding: 0.5rem 0.75rem;
    }

    /* Expand modal - mobile */
    .tile-expand-modal__dialog {
        width: calc(100% - 1.5rem);
        max-height: 92vh;
        margin: 0.75rem;
        border-radius: 6px;
    }

    .tile-expand-modal__header {
        padding: 0.75rem;
    }

    .tile-expand-modal__title {
        font-size: 1rem;
    }

    .tile-expand-modal__actions {
        gap: 0.25rem;
    }

    .tile-expand-modal__download,
    .tile-expand-modal__close {
        width: 2rem;
        height: 2rem;
    }

    .tile-expand-modal__body {
        padding: 0.5rem 0.75rem;
    }

    .tile-expand-modal__footer {
        padding: 0.625rem 0.75rem;
    }

    .tile-expand-table {
        font-size: 0.75rem;
    }

    .tile-expand-table th,
    .tile-expand-table td {
        padding: 0.375rem 0.5rem;
    }

    .tile-expand-pagination__btn {
        padding: 0.375rem 0.625rem;
        font-size: 0.75rem;
    }

    .tile-expand-pagination__info {
        font-size: 0.75rem;
    }
}

/* Very small mobile (480px and below) */
@media (max-width: 480px) {
    .dashboard-tiles-container {
        padding: 0.5rem;
    }

    .dashboard-tiles-grid {
        gap: 0.5rem;
    }

    .dashboard-tiles-header {
        margin-bottom: 1rem;
    }

    .dashboard-tiles-header__edition-badge {
        font-size: 0.6875rem;
        padding: 0.25rem 0.5rem;
    }

    .dashboard-tile__header-left {
        gap: 0.375rem;
    }

    .dashboard-tile__title {
        font-size: 0.8125rem;
    }

    .dashboard-tile__content {
        padding: 0.625rem;
    }

    .dashboard-settings-modal__dialog {
        max-width: calc(100% - 1rem);
        margin: 0.5rem;
        max-height: 95vh;
    }

    .dashboard-settings-modal__header {
        padding: 0.75rem;
    }

    .dashboard-settings-modal__body {
        padding: 0.75rem;
    }

    .dashboard-settings-modal__footer {
        padding: 0.75rem;
        gap: 0.5rem;
    }

    .dashboard-settings-item {
        padding: 0.5rem;
        gap: 0.375rem;
    }

    .dashboard-settings-item__icon .icon {
        width: 1rem;
        height: 1rem;
    }

    .dashboard-settings-item__title {
        font-size: 0.8125rem;
    }

    .toggle-slider {
        width: 36px;
        height: 20px;
    }

    .toggle-slider::before {
        width: 16px;
        height: 16px;
    }

    .dashboard-settings-item__toggle input:checked + .toggle-slider::before {
        transform: translateX(16px);
    }

    /* Expand modal - very small mobile */
    .tile-expand-modal__dialog {
        width: calc(100% - 1rem);
        max-height: 95vh;
        margin: 0.5rem;
        border-radius: 4px;
    }

    .tile-expand-modal__header {
        padding: 0.625rem 0.75rem;
    }

    .tile-expand-modal__title {
        font-size: 0.9375rem;
    }

    .tile-expand-modal__body {
        padding: 0.5rem;
    }

    .tile-expand-modal__footer {
        padding: 0.5rem;
    }

    .tile-expand-table {
        font-size: 0.6875rem;
    }

    .tile-expand-table th,
    .tile-expand-table td {
        padding: 0.3125rem 0.375rem;
    }

    .tile-expand-table th.action-column,
    .tile-expand-table td.action-column {
        width: 40px;
        padding: 0.3125rem 0.25rem;
    }

    .tile-expand-pagination {
        flex-wrap: wrap;
        gap: 0.375rem;
    }

    .tile-expand-pagination__btn {
        padding: 0.3125rem 0.5rem;
        font-size: 0.6875rem;
    }

    .tile-expand-pagination__info {
        width: 100%;
        text-align: center;
        order: -1;
        font-size: 0.6875rem;
    }
}

/* Extra small mobile (360px and below) */
@media (max-width: 360px) {
    .dashboard-tiles-container {
        padding: 0.375rem;
    }

    .dashboard-tiles-header__title {
        font-size: 1rem;
    }

    .dashboard-tile__title {
        font-size: 0.75rem;
    }

    .dashboard-tile__icon .icon {
        width: 0.875rem;
        height: 0.875rem;
    }

    /* Expand modal - extra small mobile */
    .tile-expand-modal__dialog {
        width: 100%;
        height: 100%;
        max-height: 100vh;
        margin: 0;
        border-radius: 0;
    }

    .tile-expand-modal__header {
        padding: 0.5rem 0.625rem;
    }

    .tile-expand-modal__title {
        font-size: 0.875rem;
    }

    .tile-expand-modal__download .icon,
    .tile-expand-modal__close .icon {
        width: 1rem;
        height: 1rem;
    }

    .tile-expand-table th,
    .tile-expand-table td {
        padding: 0.25rem 0.3125rem;
        white-space: nowrap;
    }

    /* Scrollable table wrapper for very small screens */
    .tile-expand-modal__body {
        padding: 0.375rem;
        overflow-x: auto;
    }
}

/* ============================================
   Compact Dashboard Layout (Recruiter/Sponsor/Editor)
   Fluid responsive: 2 -> 1 kolumna
   ============================================ */

.dashboard-tiles-grid--compact {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

@media (max-width: 1100px) {
    .dashboard-tiles-grid--compact {
        gap: 1.25rem;
    }
}

@media (max-width: 850px) {
    .dashboard-tiles-grid--compact {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

@media (max-width: 600px) {
    .dashboard-tiles-grid--compact {
        gap: 0.75rem;
    }
}

@media (max-width: 480px) {
    .dashboard-tiles-grid--compact {
        gap: 0.5rem;
    }
}
