/* ===== BASE STYLES & TYPOGRAPHY ===== */
body {
    font-family: var(--font-main);
    background-color: var(--ox-bg);
    color: var(--text);
    line-height: 1.6;
}

/* ===== 3-COLUMN GRID LAYOUT ===== */
.dashboard-layout {
    display: grid;
    grid-template-columns: var(--sidebar-width) 1fr var(--right-aside-width);
    min-height: 100vh;
}

@media (max-width: 1200px) {
    .dashboard-layout {
        grid-template-columns: 80px 1fr var(--right-aside-width);
    }

    .brand-text,
    .sub-tab span:not(.tab-icon-wrapper) {
        display: none;
    }
}

@media (max-width: 992px) {
    .dashboard-layout {
        grid-template-columns: 1fr;
    }

    .dashboard-sidebar,
    .dashboard-widgets {
        display: none;
    }
}

/* ===== SIGNATURE GLASSMORPHISM & CARDS ===== */
.stat-card,
.profile-card,
.widget-card {
    background: var(--ox-bg-card);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid var(--ox-border);
    border-radius: var(--radius-sig);
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
    transition: all 0.4s ease;
    box-shadow: var(--shadow-premium);
}

/* History tab: allow horizontal scroll for tables on narrow viewports */
.profile-card.history-table-card {
    overflow: visible;
}

.history-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    max-width: 100%;
}

.history-table-zlecenia {
    min-width: 900px;
}

.history-table-wyzwania {
    min-width: 450px;
}

.stat-card:hover,
.profile-card:hover,
.widget-card:hover {
    transform: translateY(-8px);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.6);
}

/* Typography Overrides */
h1,
h2,
h3,
h4,
.brand-text {
    font-family: var(--font-main);
    color: var(--text);
}

h3 {
    font-family: var(--font-main);
    font-size: 1.5rem;
    color: var(--ox-gold);
    margin-bottom: 1.5rem;
    font-style: italic;
    border-bottom: 1px solid var(--ox-border);
    padding-bottom: 0.5rem;
    letter-spacing: 0.5px;
}

/* ===== ANIMATIONS ===== */
.dashboard-view {
    display: none;
}

.dashboard-view.active {
    display: block;
    animation: fadeInSlide 0.6s cubic-bezier(0.23, 1, 0.32, 1) forwards;
}

@keyframes fadeInSlide {
    from {
        opacity: 0;
        transform: translateY(15px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: rgba(10, 14, 39, 0.5);
}

::-webkit-scrollbar-thumb {
    background: var(--ox-border);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--ox-aqua);
}

/* ===== PREMIUM BUTTON STYLES ===== */
.save-button,
.action-btn {
    padding: 1rem 2rem;
    font-size: 1.05rem;
    font-weight: 700;
    font-family: var(--font-main);
    border: none;
    border-radius: var(--radius-sig);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.save-button {
    background: var(--grad-premium);
    color: white;
}

.save-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.4);
}

.save-button:active {
    transform: translateY(0);
}

.action-btn.secondary {
    background: transparent;
    border: 2px solid var(--ox-border);
    color: var(--text);
    padding: 0.9rem 1.8rem;
}

.action-btn.secondary:hover {
    border-color: var(--ox-aqua);
    background: rgba(99, 102, 241, 0.1);
    transform: translateY(-2px);
}

.action-btn.danger {
    background: #ff4d4d;
    color: white;
}

.action-btn.danger:hover {
    background: #ff3333;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(255, 77, 77, 0.4);
}

.settings-status {
    font-size: 0.95rem;
    font-weight: 600;
    margin-left: 1rem;
}

/* ===== COMPANY NEWS CAROUSEL WIDGET ===== */
.company-news-widget .widget-title {
    margin-bottom: 1rem;
}
.company-news-carousel-wrap {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
}
.company-news-arrow {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid var(--ox-border);
    background: rgba(255,255,255,0.05);
    color: var(--ox-aqua);
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
}
.company-news-arrow:hover {
    background: rgba(99, 102, 241, 0.2);
    border-color: var(--ox-aqua);
    transform: scale(1.05);
}
.company-news-arrow:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
}
.company-news-carousel {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    position: relative;
}
.company-news-loading {
    color: var(--muted);
    font-size: 0.85rem;
    text-align: center;
    padding: 1.5rem;
}
.company-news-empty {
    text-align: center;
    padding: 1.5rem;
}
.company-news-items {
    display: flex;
    transition: transform 0.3s ease;
}
.company-news-slide {
    flex: 0 0 100%;
    padding: 0.25rem 0;
    box-sizing: border-box;
}
.company-news-item {
    display: block;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--ox-border);
    color: var(--text);
    text-decoration: none;
    transition: all 0.25s ease;
    cursor: pointer;
    position: relative;
}
.company-news-item:hover {
    background: rgba(99, 102, 241, 0.1);
    border-color: var(--ox-aqua);
}
.company-news-item.read {
    opacity: 0.7;
    border-color: rgba(255,255,255,0.05);
}
.company-news-item .cn-type {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--ox-aqua);
    margin-bottom: 0.25rem;
}
.company-news-item .cn-title {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}
.company-news-item .cn-content {
    font-size: 0.8rem;
    color: var(--muted);
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.company-news-item .cn-mark-read {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    font-size: 0.75rem;
    color: var(--muted);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    background: rgba(0,0,0,0.3);
    cursor: pointer;
    border: none;
}
.company-news-item .cn-mark-read:hover {
    color: var(--ox-aqua);
}
.company-news-dots {
    display: flex;
    justify-content: center;
    gap: 0.35rem;
    margin-top: 0.75rem;
}
.company-news-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--ox-border);
    cursor: pointer;
    transition: all 0.2s ease;
}
.company-news-dot.active {
    background: var(--ox-aqua);
    transform: scale(1.2);
}