/* core/static/css/style.css */
/* Main stylesheet for Public Site and Shared Components */

/* ==========================================================================
   1. VARIABLES & GLOBAL RESETS
   ========================================================================== */
/* Imported from variables.css in HTML templates */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: var(--font-sans);
    background-color: var(--bg);
    color: var(--text-color);
    font-size: 16px;
    line-height: 1.6;
}
body.dashboard-body { background-color: var(--bg); }
body.mobile-menu-open { overflow: hidden; }

.container { max-width: 1280px; margin: 0 auto; padding: 0 1.5rem; }
a { color: var(--primary-color); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--secondary-color); }
h1, h2, h3, h4 { font-weight: 800; color: var(--secondary-color); margin-bottom: 0.75rem; }
h1 { font-size: 28px; }
h2 { font-size: 24px; }
h3 { font-size: 20px; }

main { padding: 3rem 0; }

/* ==========================================================================
   2. HEADER, LOGO & PUBLIC NAVIGATION
   ========================================================================== */
.site-header {
    background: var(--surface);
    height: var(--header-height);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-1);
    display: flex;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1010;
}
.header-container { display: flex; justify-content: space-between; align-items: center; width: 100%; padding: 0 1.5rem; }
.logo a {
    font-weight: 800;
    font-size: 1.25rem;
    text-decoration: none !important;
    color: var(--primary-color) !important;
    background-color: transparent !important;
    padding: 0;
    color: var(--white) !important;
    background-color: var(--primary-color) !important;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
}

.main-nav { display: none; }
.hamburger-menu { display: block; border: none; background: none; cursor: pointer; z-index: 1011; }
.header-center { display: none; }

@media (min-width: 1024px) {
    .header-center { display: flex; align-items: center; gap: 3rem; }
    .main-nav { display: flex; }
    .main-nav ul { display: flex; list-style: none; gap: 2rem; margin-bottom: 0; }
    .main-nav a {
        color: var(--secondary-color); font-weight: 700; font-size: 0.9rem;
        text-transform: uppercase; border-bottom: 3px solid transparent; padding: 5px 0;
        white-space: nowrap;
    }
    .main-nav a.active, .main-nav a:hover { color: var(--primary-color); border-color: var(--primary-color); }
    .hamburger-menu { display: none; }
}
.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header-contact-info { display: none; }
@media (min-width: 1200px) {
    .header-contact-info { display: flex; align-items: center; gap: 0.75rem; }
    .header-contact-info .icon {
        background-color: var(--primary-color); color: var(--white); border-radius: 50%;
        width: 40px; height: 40px; display: flex; align-items: center; justify-content: center;
    }
    .header-contact-info .text span { display: block; font-size: 0.8rem; color: var(--light-text-color); }
    .header-contact-info .text strong { font-weight: 700; color: var(--secondary-color); }
}

/* ==========================================================================
   3. HERO SECTION & MOBILE MENU
   ========================================================================== */
.hero { padding: 4rem 0; background-size: cover; background-position: center; min-height: 70vh; display: flex; align-items: center; }
.hero-content-box { background: rgba(255, 255, 255, 0.9); backdrop-filter: blur(5px); max-width: 600px; padding: 2rem; border-radius: var(--border-radius); border-left: 5px solid var(--primary-color); }
.hero-buttons { margin-top: 2rem; display: flex; flex-wrap: wrap; gap: 1rem; }

.mobile-menu-container, .dashboard-sidebar {
    position: fixed; top: 0; left: -100%; width: 280px; height: 100%;
    background: var(--surface); z-index: 1020; transition: left 0.3s ease-in-out;
    padding: 1.5rem; display: flex; flex-direction: column; border-right: 1px solid var(--border-color); overflow-y: auto; /* [FIX] Enable scrolling */
}
.mobile-menu-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2rem; }
.mobile-menu-close { background: none; border: none; font-size: 2rem; cursor: pointer; }
.mobile-menu-container nav ul { list-style: none; }
.mobile-menu-container nav a { display: block; padding: 1rem 0; font-weight: 700; color: var(--secondary-color); }
.mobile-nav-overlay {
    visibility: hidden; opacity: 0;
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(17, 24, 39, 0.6); z-index: 1019; transition: opacity 0.3s, visibility 0.3s;
}
body.mobile-menu-open .mobile-menu-container,
body.mobile-menu-open .dashboard-sidebar { left: 0; }
body.mobile-menu-open .mobile-nav-overlay { visibility: visible; opacity: 1; }

/* ==========================================================================
   6. GENERAL COMPONENTS (Buttons, Cards, Forms, etc.)
   ========================================================================== */
.btn {
    display: inline-block; padding: 0.6rem 1.25rem; border-radius: var(--radius-md);
    font-weight: 600; cursor: pointer; border: 1px solid transparent;
    text-decoration: none !important; text-align: center; transition: all 0.2s;
}
.btn-primary { background-color: var(--primary-color); color: var(--white) !important; border-color: var(--primary-color); }
.btn-primary:hover { background-color: #e68a00; border-color: #e68a00; }
.btn-secondary { background-color: var(--secondary-color); color: var(--white) !important; border-color: var(--secondary-color); }
.btn-secondary:hover { background-color: #1A202C; border-color: #1A202C; }
.btn-pill { border-radius: var(--radius-pill); }

.status-badge {
    padding: 4px 10px;
    border-radius: var(--radius-pill);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 1px solid transparent;
}
.status-in-progress { background-color: #E0F2FE; color: #0369A1; border-color: #BAE6FD; }
.status-lead { background-color: #FEF3C7; color: #B45309; border-color: #FDE68A; }
.status-completed { background-color: #D1FAE5; color: #047857; border-color: #A7F3D0; }
.status-canceled { background-color: #FEE2E2; color: #B91C1C; border-color: #FECACA; }
.status-quotation { background-color: #F3E8FF; color: #7E22CE; border-color: #E9D5FF; }

.team-avatars { display: flex; }
.avatar-stack { width: 32px; height: 32px; border-radius: 50%; border: 2px solid var(--white); object-fit: cover; margin-left: -12px; }
.avatar-stack:first-child { margin-left: 0; }

/* Forms */
.form-field { margin-bottom: 1rem; }
.form-field label { display: block; margin-bottom: .5rem; font-weight: 700; color: var(--secondary-color); }
.form-field input, .form-field select, .form-field textarea {
    background-color: var(--surface); border: 1px solid var(--border-color);
    padding: 0.6rem 1rem; border-radius: var(--radius-md); width: 100%; font-size: 0.95rem;
    height: 44px;
}
.form-field textarea { height: auto; }
.form-field input:focus, .form-field select:focus, .form-field textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 153, 0, 0.25);
    outline: none;
}

/* ==========================================================================
   9. NEW FEATURE STYLES (BLOG, TESTIMONIALS)
   ========================================================================== */
.star-rating {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}
.star-rating .star {
    font-size: 1.2rem;
}
.blog-post-card {
    display: flex;
    flex-direction: column;
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    height: 100%;
    text-decoration: none;
    color: var(--text-color);
    transition: box-shadow .2s, transform .2s;
}
.blog-post-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    color: var(--text-color);
}
.blog-post-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}
.blog-post-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}
.blog-post-content h4 {
    margin-top: 0;
    color: var(--secondary-color);
}
.blog-post-meta {
    font-size: 0.85rem;
    color: var(--light-text-color);
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}
.blog-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-lg);
    margin: 1.5rem 0;
}

/* ==========================================================================
   10. MOBILE RESPONSIVE FIXES
   ========================================================================== */
@media (max-width: 768px) {
    /* Calendar Fixes */
    .fc-header-toolbar {
        flex-direction: column;
        gap: 0.75rem !important;
        align-items: stretch;
    }
    .fc-header-toolbar .fc-toolbar-chunk {
        display: flex !important;
        justify-content: center !important;
        gap: 0.25rem;
    }
    .fc .fc-button {
        padding: 0.4rem 0.6rem;
        font-size: 0.85rem;
    }
}
/* ... (keep all existing CSS) ... */

/* ==========================================================================
   11. OFFER PAGE STYLES & MOBILE FIXES
   ========================================================================== */
.offer-card {
    display: flex;
    gap: 2rem;
    background: var(--white);
    padding: 2rem;
    border-radius: var(--radius-lg);
    align-items: center;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.offer-card img {
    width: 300px;
    height: 200px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0; /* Prevents image from shrinking */
}

.offer-card h3 {
    margin-top: 0;
    border: none;
    color: var(--secondary-color);
}

@media (max-width: 768px) {
    .offer-card {
        flex-direction: column; /* Stack vertically on mobile */
        padding: 1.5rem;
        gap: 1.5rem;
    }
    
    .offer-card img {
        width: 100%; /* Make image full-width */
        height: 200px;
    }

    .offer-card div {
        text-align: center; /* Center the text content */
    }
}

/* Category Badges */
.category-badge { font-size: 0.75rem; padding: 0.25rem 0.5rem; border-radius: 4px; font-weight: 600; text-transform: uppercase; display: inline-block; }
.cat-GENERAL { background-color: #e2e8f0; color: #4a5568; }
.cat-DEMOLITION { background-color: #fed7d7; color: #c53030; }
.cat-ELECTRICAL { background-color: #bee3f8; color: #2b6cb0; }
.cat-PLUMBING { background-color: #c4f1f9; color: #285e61; }
.cat-PAINTING { background-color: #c6f6d5; color: #22543d; }
.cat-CARPENTRY { background-color: #ffebee; color: #c05621; }
.cat-MASONRY { background-color: #edf2f7; color: #2d3748; }
.cat-TILING { background-color: #e9d8fd; color: #553c9a; }
.cat-FLOORING { background-color: #f0fff4; color: #276749; }
.cat-HVAC { background-color: #e6fffa; color: #2c7a7b; }
.cat-DRYWALL { background-color: #f7fafc; color: #4a5568; border: 1px solid #cbd5e0; }
.cat-OTHER { background-color: #2d3748; color: #fff; }

/* Blog Content Styles */
.blog-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #2d3748;
    background: #fff;
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}
.blog-content h1, .blog-content h2, .blog-content h3 {
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    color: var(--secondary-color);
    font-weight: 800;
}
.blog-content ul, .blog-content ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}
.blog-content li {
    margin-bottom: 0.5rem;
}
.blog-content p {
    margin-bottom: 1.5rem;
}
.blog-content strong {
    color: var(--primary-color);
}
.blog-content blockquote {
    border-left: 5px solid var(--primary-color);
    padding-left: 1rem;
    font-style: italic;
    color: var(--light-text-color);
    margin: 2rem 0;
}

/* [FIX] Chat Modal Styles (Report Work, File Preview) */
.chat-modal-backdrop {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5); z-index: 10000;
    display: none; justify-content: center; align-items: center;
}
.chat-modal-backdrop.visible { display: flex; }
.chat-modal-content {
    background: white; padding: 20px; border-radius: 8px;
    width: 90%; max-width: 400px; box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.chat-modal-actions {
    display: flex; justify-content: flex-end; gap: 10px; margin-top: 15px;
}
.btn-cancel-modal {
    background: #e2e8f0; border: none; padding: 8px 16px; border-radius: 4px; cursor: pointer; font-weight: bold; color: #4a5568;
}
.btn-send-modal {
    background: #3182ce; color: white; border: none; padding: 8px 16px; border-radius: 4px; cursor: pointer; font-weight: bold;
}

/* [FIX] Chat Modal Styles (Report Work, File Preview) */
.chat-modal-backdrop {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5); z-index: 10000;
    display: none; justify-content: center; align-items: center;
}
.chat-modal-backdrop.visible { display: flex; }
.chat-modal-content {
    background: white; padding: 20px; border-radius: 8px;
    width: 90%; max-width: 400px; box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.chat-modal-actions {
    display: flex; justify-content: flex-end; gap: 10px; margin-top: 15px;
}
.btn-cancel-modal {
    background: #e2e8f0; border: none; padding: 8px 16px; border-radius: 4px; cursor: pointer; font-weight: bold; color: #4a5568;
}
.btn-send-modal {
    background: #3182ce; color: white; border: none; padding: 8px 16px; border-radius: 4px; cursor: pointer; font-weight: bold;
}

/* [FIX] Chat Message Layout Improvements */
.message {
    display: flex;
    align-items: flex-end; /* Align avatar to bottom of message */
    margin-bottom: 15px;
    max-width: 100%;
}

.message.message-out {
    flex-direction: row-reverse;
}

.chat-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    margin: 0 8px;
    flex-shrink: 0;
}

.message-content {
    max-width: 80%; /* Wider bubbles */
    padding: 10px 14px;
    border-radius: 12px;
    position: relative;
    word-wrap: break-word;
}

.message-in .message-content {
    background-color: #f1f0f0;
    border-bottom-left-radius: 2px;
}

.message-out .message-content {
    background-color: #dcf8c6; /* WhatsApp-like green or use primary color */
    border-bottom-right-radius: 2px;
}

/* --- NEW COMPONENTS (Toolbar, Tabs) --- */
.toolbar {
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1rem;
    box-shadow: var(--shadow-1);
    margin-bottom: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    justify-content: space-between;
}

.status-tabs { display: flex; gap: 0.5rem; }
.status-tab {
    padding: 0.5rem 1rem;
    border-radius: var(--radius-pill);
    background: transparent;
    color: var(--light-text-color);
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.2s;
    border: 1px solid transparent;
}
.status-tab:hover { background: var(--bg); color: var(--secondary-color); }
.status-tab.active { background: var(--primary-soft); color: var(--secondary-color); border-color: var(--primary-soft); }
.status-tab .badge { margin-left: 6px; background: var(--border-color); color: var(--text-color); border-radius: var(--radius-pill); font-size: 0.75rem; }
.status-tab.active .badge { background: var(--secondary-color); color: var(--white); }

/* ===== Project Detail Premium UI ===== */
.page-head{
  display:flex;
  justify-content:space-between;
  gap:16px;
  align-items:flex-start;
  flex-wrap:wrap;
  margin-bottom:16px;
}
.page-head h1{
  font-size:28px;
  line-height:1.15;
  margin:0;
  color:var(--text-strong);
  font-weight:800;
}
.code-badge{
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size:12px;
  color:var(--muted);
  border:1px solid var(--border);
  background:var(--surface);
  border-radius:999px;
  padding:4px 10px;
}
.meta-dot{
  font-size:13px;
  color:var(--muted);
}
.meta-dot::before{
  content:"•";
  margin:0 8px;
  color:#D1D5DB;
}
.page-head__actions{display:flex; gap:10px; align-items:center; flex-wrap:wrap;}

.btn-pill{ border-radius:999px; padding:10px 14px; font-weight:700; }
.btn-surface{
  background:var(--surface);
  border:1px solid var(--border);
  color:var(--text-strong);
}
.btn-surface:hover{ box-shadow:var(--shadow-1); }

.status-pill{
  font-size:12px;
  font-weight:800;
  padding:5px 10px;
  border-radius:999px;
  border:1px solid var(--border);
  background:#F9FAFB;
  color:var(--text-strong);
}
.status-in_progress, .status-w_toku, .status-inprogress { background:#FFF7ED; border-color:#FED7AA; }
.status-completed, .status-zakonczone { background:#ECFDF5; border-color:#A7F3D0; }
.status-planned, .status-planowane { background:#EFF6FF; border-color:#BFDBFE; }

.stat-strip{
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  gap:12px;
  margin:12px 0 24px;
}
.stat-card{
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:var(--radius-lg);
  padding:14px 16px;
  box-shadow:var(--shadow-1);
}
.stat-label{ font-size:12px; color:var(--muted); font-weight:800; text-transform:uppercase; letter-spacing:.04em; }
.stat-value{ font-size:22px; font-weight:900; color:var(--text-strong); margin-top:2px; }
.stat-sub{ font-size:13px; color:var(--muted); }

.filterbar{
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:var(--radius-lg);
  padding:12px;
  box-shadow:var(--shadow-1);
  margin-bottom:18px;
}
.input-icon{ position:relative; }
.input-icon i{
  position:absolute;
  left:12px;
  top:50%;
  transform:translateY(-50%);
  color:#9CA3AF;
}
.input-icon input{
  padding-left:38px;
}

.location-header{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  padding:12px 14px;
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:var(--radius-lg);
  box-shadow:var(--shadow-1);
  cursor:pointer;
}
.location-header:hover{ box-shadow:var(--shadow-2); }
.loc-icon{
  width:34px; height:34px;
  display:flex; align-items:center; justify-content:center;
  border-radius:10px;
  background:#FFF7ED;
  color:#FF9900;
}
.loc-title{ font-weight:900; color:var(--text-strong); }
.loc-sub{ font-size:12px; color:var(--muted); margin-top:-2px; }

.location-section [aria-expanded="true"] .toggle-icon{ transform: rotate(180deg); }
.toggle-icon{ transition: transform .2s ease; color:#9CA3AF; }

.kanban{
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  gap:14px;
  margin-top:12px;
}
.kanban-col{
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:var(--radius-lg);
  box-shadow:var(--shadow-1);
  padding:12px;
  min-height:120px;
}
.kanban-col__title{
  display:flex;
  align-items:center;
  justify-content:space-between;
  font-size:12px;
  font-weight:900;
  letter-spacing:.04em;
  text-transform:uppercase;
  color:var(--muted);
  margin-bottom:10px;
}
.pill{
  font-size:12px;
  font-weight:800;
  padding:4px 10px;
  border-radius:999px;
  background:#F3F4F6;
  color:var(--text-strong);
}

/* ===== Task Tile (Kanban / SaaS) ===== */
.task-tile{
  position:relative;
  background: var(--surface, #fff);
  border: 1px solid var(--border, #E5E7EB);
  border-radius: var(--radius-lg, 12px);
  box-shadow: var(--shadow-1, 0 1px 2px rgba(16,24,40,.06));
  padding: 12px 12px 10px;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
  margin-bottom: 12px;
  overflow:hidden;
}
.task-tile::before{ content:""; position:absolute; left:0; top:0; bottom:0; width:4px; background:#D1D5DB; }
.task-tile:hover{ transform: translateY(-1px); box-shadow: var(--shadow-2, 0 10px 24px rgba(16,24,40,.10)); border-color: #D1D5DB; }
.task-tile__top{ display:flex; justify-content:space-between; align-items:flex-start; gap:10px; }
.task-tile__head{ min-width:0; }
.task-chip{ display:inline-flex; align-items:center; font-size:11px; font-weight:900; letter-spacing:.04em; text-transform:uppercase; padding:4px 8px; border-radius:999px; border:1px solid var(--border, #E5E7EB); background:#F9FAFB; color: var(--text-strong, #111827); margin-bottom:6px; }
.task-tile__title{ margin:0; font-size:15px; line-height:1.25; font-weight:900; color: var(--text-strong, #111827); max-width: 100%; white-space: normal; word-break: break-word; overflow-wrap: break-word; }
.task-tile__desc{ margin:8px 0 10px; color: var(--muted, #6B7280); font-size:13px; line-height:1.45; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.task-tile__desc--empty{ opacity:.7; }
.task-tile__actions{ display:flex; gap:6px; opacity:0; transform: translateY(-2px); transition: opacity .15s ease, transform .15s ease; position:relative; z-index:2; }
.task-tile:hover .task-tile__actions{ opacity:1; transform: translateY(0); }
.icon-btn{ width:32px; height:32px; border-radius:10px; border:1px solid var(--border, #E5E7EB); background:#fff; color:#6B7280; display:inline-flex; align-items:center; justify-content:center; text-decoration:none; }
.icon-btn:hover{ box-shadow: var(--shadow-1, 0 1px 2px rgba(16,24,40,.06)); color:#111827; }
.icon-btn--danger{ color:#EF4444; }
.icon-btn--danger:hover{ color:#B91C1C; }
.task-tile__progress{ margin-top: 6px; margin-bottom: 10px; }
.task-tile__progress-row{ display:flex; justify-content:space-between; gap:10px; font-size:12px; color: var(--muted, #6B7280); margin-bottom:6px; }
.task-tile__progress-left{ white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.task-tile__progress-right{ font-weight:900; color: var(--text-strong, #111827); }
.progress--thin{ height: 6px; border-radius: 999px; background:#EEF2F7; overflow:hidden; }
.progress--thin .progress-bar{ border-radius:999px; }
.task-tile__meta{ display:flex; justify-content:space-between; align-items:center; gap:10px; border-top:1px solid var(--border, #E5E7EB); padding-top:10px; }
.task-tile__time{ display:flex; align-items:center; gap:8px; font-size:12px; color: var(--muted, #6B7280); }
.task-tile__time i{ color:#9CA3AF; }
.task-tile--todo::before{ background:#D1D5DB; }
.task-tile--inprogress::before{ background:#FF9900; }
.task-tile--done::before{ background:#10B981; }
.task-tile--todo .progress-bar{ background:#9CA3AF; }
.task-tile--inprogress .progress-bar{ background:#FF9900; }
.task-tile--done .progress-bar{ background:#10B981; }

@media (max-width: 992px){
  .stat-strip{ grid-template-columns:1fr; }
  .kanban{ grid-template-columns:1fr; }
  .task-tile__actions{ opacity:1; transform:none; }
}

/* ==========================================================================
   UI REFRESH v2 (Dashboard Modernization)
   ========================================================================== */

:root{
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --surface-3: #f1f5f9;
  --border-soft: rgba(15, 23, 42, 0.08);

  --radius-md: 10px;
  --radius-lg: 14px;

  --shadow-1: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow-2: 0 10px 25px rgba(15, 23, 42, 0.10);
  --shadow-3: 0 20px 35px rgba(15, 23, 42, 0.14);

  --ring: 0 0 0 4px rgba(255,153,0,.18);
}

/* Global look */
body.dashboard-body{
  background: var(--surface-2);
  color: #334155;
}

h1,h2,h3,h4{
  letter-spacing: -0.02em;
}

a{
  text-decoration: none;
}

/* Header */
.site-header{
  background: rgba(255,255,255,.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-soft);
  box-shadow: var(--shadow-1);
}

.dashboard-main-content{
  padding: 1.75rem;
}

/* Cards */
.card{
  border: 1px solid var(--border-soft) !important;
  border-radius: var(--radius-lg) !important;
  box-shadow: var(--shadow-1);
}

.card-header{
  background: transparent !important;
  border-bottom: 1px solid var(--border-soft) !important;
  padding: 0.9rem 1rem;
}

.card-body{
  padding: 1rem;
}

/* Buttons - consistent */
.btn{
  border-radius: 12px;
  font-weight: 800;
  letter-spacing: -0.01em;
  padding: .6rem 1rem;
}

.btn-primary{
  box-shadow: 0 8px 18px rgba(255,153,0,.22);
}

.btn-outline-primary{
  border-color: rgba(255,153,0,.45);
  color: var(--secondary-color);
}

.btn-outline-primary:hover{
  background: rgba(255,153,0,.10);
  border-color: rgba(255,153,0,.60);
}

.btn-secondary{
  background: #0f172a;
  border-color: #0f172a;
}

.btn-secondary:hover{
  background: #0b1220;
  border-color: #0b1220;
}

/* Page header (Project/Task/Profile top) */
.page-header{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.page-title{
  margin: 0;
  font-weight: 900;
  font-size: 1.6rem;
  color: #0f172a;
}

.page-subtitle{
  color: #64748b;
  font-weight: 700;
  font-size: .9rem;
}

.action-bar{
  display:flex;
  gap: .5rem;
  flex-wrap: wrap;
}

/* Chips / badges nicer */
.chip{
  display:inline-flex;
  align-items:center;
  gap: .4rem;
  padding: .28rem .6rem;
  border-radius: 999px;
  border: 1px solid var(--border-soft);
  background: var(--surface-3);
  font-weight: 800;
  font-size: .78rem;
  color: #0f172a;
}

.chip-primary{
  background: rgba(255,153,0,.10);
  border-color: rgba(255,153,0,.25);
}

.chip-muted{
  background: #f8fafc;
  color:#64748b;
}

/* Sidebar improvements */
.dashboard-sidebar{
  background: #ffffff;
  border-right: 1px solid var(--border-soft);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.dashboard-sidebar nav a{
  border-radius: 12px;
  padding: .7rem .8rem;
  color: #0f172a;
}

.dashboard-sidebar nav a:hover{
  background: rgba(15,23,42,.04);
}

.dashboard-sidebar nav a.active{
  background: rgba(255,153,0,.14);
  color: #0f172a;
  border: 1px solid rgba(255,153,0,.25);
}

/* Project documents tiles */
.doc-tile{
  border: 1px solid var(--border-soft);
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-1);
  transition: transform .18s ease, box-shadow .18s ease;
  overflow: hidden;
}

.doc-tile:hover{
  transform: translateY(-3px);
  box-shadow: var(--shadow-2);
}

.doc-tile .doc-thumb{
  height: 96px;
  background: var(--surface-3);
  display:flex;
  align-items:center;
  justify-content:center;
}

.doc-tile .doc-body{
  padding: .75rem .85rem;
}

/* Kanban columns */
.kanban-grid{
  display:grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

@media (max-width: 991px){
  .kanban-grid{ grid-template-columns: 1fr; }
}

.kanban-col{
  background: rgba(255,255,255,.65);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: .85rem;
  box-shadow: var(--shadow-1);
}

.kanban-col-title{
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-bottom: .75rem;
  font-weight: 900;
  color: #0f172a;
  letter-spacing: -0.02em;
}

.kanban-count{
  font-size: .78rem;
  font-weight: 900;
  color: #64748b;
  background: var(--surface-3);
  border: 1px solid var(--border-soft);
  padding: .18rem .5rem;
  border-radius: 999px;
}

/* Task card redesign */
.task-card{
  border: 1px solid var(--border-soft) !important;
  border-radius: var(--radius-lg) !important;
  box-shadow: var(--shadow-1);
  transition: transform .16s ease, box-shadow .16s ease;
  overflow: hidden;
}

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

.task-card .task-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap: .75rem;
}

.task-card .task-title{
  font-weight: 900;
  letter-spacing: -0.02em;
  font-size: 1.05rem;
  margin: .15rem 0 0 0;
  color:#0f172a;
}

.task-card .task-desc{
  color:#64748b;
  font-size: .9rem;
  margin-top: .5rem;
}

.task-card .task-actions .btn{
  padding: .35rem .55rem;
  border-radius: 10px;
}

.task-card .task-meta{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: .75rem;
  margin-top: .85rem;
  padding-top: .75rem;
  border-top: 1px solid var(--border-soft);
  color:#475569;
  font-weight: 700;
  font-size: .85rem;
}

.task-card .progress{
  height: 6px !important;
  border-radius: 999px !important;
  background: #e5e7eb !important;
}

/* Tables look lighter */
.table{
  border-color: var(--border-soft) !important;
}

.table thead th{
  color:#64748b;
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  border-bottom: 1px solid var(--border-soft) !important;
}

.table tbody td{
  border-top: 1px solid var(--border-soft) !important;
}

/* Soft sections (location header row) */
.location-header{
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  background: rgba(255,255,255,.7);
  box-shadow: var(--shadow-1);
}

/* ==========================================================================
   12. DASHBOARD UI POLISH (Premium layer)
   ========================================================================== */

:root{
  --radius-lg: 14px;
  --radius-md: 10px;
  --radius-sm: 8px;

  --shadow-xs: 0 1px 2px rgba(0,0,0,.05);
  --shadow-lg: 0 12px 30px rgba(17,24,39,.10);

  --surface: #ffffff;
  --surface-2: #F8FAFC;      /* tło sekcji */
  --surface-3: #F1F5F9;      /* tło kolumn / pasków */
  --text-strong: #0F172A;
  --text-soft: #64748B;
}

/* lepsza typografia w panelu */
.dashboard-main-content h1,
.dashboard-main-content h2,
.dashboard-main-content h3,
.dashboard-main-content h4 {
  letter-spacing: -0.02em;
}
.dashboard-main-content {
  padding-top: 1.75rem; /* więcej “air” u góry */
}

/* Page header */
.page-header {
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 18px 18px;
  box-shadow: var(--shadow-xs);
  display: flex;
  gap: 14px;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
}

.page-title {
  margin: 0;
  font-weight: 800;
  color: var(--text-strong);
  font-size: 1.6rem;
  line-height: 1.1;
}

.page-meta {
  margin-top: 6px;
  color: var(--text-soft);
  font-size: .92rem;
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  background: var(--surface-2);
  border: 1px solid var(--border-color);
  border-radius: 999px;
  font-weight: 700;
  color: var(--secondary-color);
}

/* Action bar */
.action-bar {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

/* Buttons: spójne, premium, mniej “kanciasto” */
.btn {
  border-radius: 12px !important;
  padding: .65rem 1rem;
  font-weight: 800;
  box-shadow: none;
}
.btn-sm { border-radius: 10px !important; }
.btn-primary, .btn-secondary, .btn-success, .btn-danger, .btn-warning, .btn-info {
  border: none;
}
.btn-primary { box-shadow: 0 10px 18px rgba(255,153,0,.18); }
.btn-primary:hover { transform: translateY(-1px); }
.btn-secondary:hover { transform: translateY(-1px); }

/* Card premium */
.card {
  border-radius: var(--radius-lg) !important;
  border: 1px solid var(--border-color) !important;
  box-shadow: var(--shadow-xs);
  overflow: hidden;
}
.card-header {
  background: linear-gradient(180deg, #fff, #fbfdff);
  border-bottom: 1px solid var(--border-color) !important;
  padding: 14px 16px;
}
.card-body { padding: 16px; }

/* sekcje jako “panel blocks” */
.section-title {
  font-weight: 900;
  color: var(--text-strong);
  font-size: 1.05rem;
}

/* Chips */
.chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-weight: 800;
  font-size: .78rem;
  border: 1px solid var(--border-color);
  background: var(--surface-2);
  color: var(--secondary-color);
}

/* Tablica zadań */
.board-toolbar {
  position: sticky;
  top: calc(var(--header-height) + 10px);
  z-index: 50;
  background: rgba(247,250,252,.75);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 12px 12px;
}

.location-header {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  background: var(--surface);
  padding: 12px 14px;
  box-shadow: var(--shadow-xs);
}

.board-columns {
  display: grid;
  grid-template-columns: repeat(3, minmax(260px, 1fr));
  gap: 14px;
}

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

/* Kolumny */
.board-col {
  background: var(--surface-2);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 12px;
}
.board-col-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  font-weight: 900;
  color: var(--text-soft);
  text-transform: uppercase;
  font-size: .78rem;
  letter-spacing: .06em;
}
.count-pill {
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: 999px;
  padding: 4px 8px;
  font-weight: 900;
  color: var(--secondary-color);
}

/* Task card premium */
.task-card {
  border: 1px solid var(--border-color) !important;
  border-radius: 14px !important;
  box-shadow: var(--shadow-xs);
  transition: transform .15s ease, box-shadow .15s ease;
  overflow: hidden;
  background: var(--surface);
}
.task-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* lewy “status stripe” zamiast bootstrap border-start */
.task-card .status-stripe {
  width: 8px;
  border-radius: 10px;
  background: var(--border-color);
}

/* Task header layout */
.task-head {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.task-title {
  margin: 0;
  font-weight: 900;
  color: var(--text-strong);
  font-size: 1.02rem;
  line-height: 1.2;
}
.task-desc {
  margin-top: 6px;
  color: var(--text-soft);
  font-size: .9rem;
}
.task-footer {
  margin-top: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  color: var(--text-soft);
  font-size: .85rem;
}

/* Uporządkowanie avatar stack */
.avatar-stack { box-shadow: 0 0 0 2px #fff; }

/* ==========================================================================
   13. PREMIUM TABS & ANIMATIONS
   ========================================================================== */

/* Premium Tabs Styling */
.premium-tabs {
    border-bottom: 2px solid var(--border-soft);
    gap: 1rem;
}
.premium-tabs .nav-link {
    border: none;
    background: none;
    color: var(--light-text-color);
    font-weight: 700;
    padding: 0.75rem 0.5rem;
    position: relative;
    transition: color 0.3s ease;
}
.premium-tabs .nav-link:hover {
    color: var(--primary-color);
    border: none;
}
.premium-tabs .nav-link.active {
    color: var(--primary-color);
    background: none;
    border: none;
}
.premium-tabs .nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--primary-color);
    transform: scaleX(0);
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    transform-origin: center;
}
.premium-tabs .nav-link.active::after {
    transform: scaleX(1);
}

/* Tab Content Animation (Slide Up + Fade) */
.tab-content .tab-pane {
    display: none;
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.4s ease-out, transform 0.4s ease-out;
}
.tab-content .tab-pane.active {
    display: block;
}
.tab-content .tab-pane.show {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================================================
   14. MOBILE OPTIMIZATIONS (Task Board & General)
   ========================================================================== */
@media (max-width: 768px) {
    .dashboard-main-content {
        padding: 1rem; /* Reduce padding on mobile */
    }

    /* Task Board / Kanban Mobile Fixes */
    .kanban-col {
        min-width: 0; /* Prevent flex/grid item from overflowing */
    }

    .task-tile__title {
        font-size: 14px; /* Slightly smaller font for better fit */
    }

    /* Ensure location headers wrap properly */
    .location-header {
        flex-wrap: wrap;
        gap: 0.5rem;
        height: auto; /* Allow height to grow */
    }
    
    .loc-title {
        white-space: normal;
        word-break: break-word;
        overflow-wrap: break-word;
    }
}