:root {
    --sidebar-width: 280px;
}

/* PALETY DLA MOTYWÓW */
body.theme-default {
    --bg-color: #080c14;
    --sidebar-bg: rgba(15, 23, 42, 0.8);
    --card-bg: rgba(20, 30, 54, 0.6);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.16);
    --text-main: #f8fafc;
    --text-dim: #94a3b8;
    --accent-blue: #38bdf8;
    --accent-green: #10b981;
    --accent-purple: #c084fc;
    --accent-orange: #fb923c;
    --accent-glow: rgba(56, 189, 248, 0.12);
    --gradient-1: rgba(56, 189, 248, 0.07);
    --gradient-2: rgba(192, 132, 252, 0.07);
}

body.theme-neon {
    --bg-color: #0b0518;
    --sidebar-bg: rgba(22, 10, 48, 0.85);
    --card-bg: rgba(33, 15, 71, 0.65);
    --border-color: rgba(192, 132, 252, 0.15);
    --border-hover: rgba(192, 132, 252, 0.35);
    --text-main: #fae8ff;
    --text-dim: #d8b4fe;
    --accent-blue: #f472b6;
    --accent-green: #34d399;
    --accent-purple: #c084fc;
    --accent-orange: #fb7185;
    --accent-glow: rgba(192, 132, 252, 0.2);
    --gradient-1: rgba(192, 132, 252, 0.12);
    --gradient-2: rgba(244, 114, 182, 0.1);
}

body.theme-emerald {
    --bg-color: #02140e;
    --sidebar-bg: rgba(3, 31, 22, 0.85);
    --card-bg: rgba(6, 48, 34, 0.6);
    --border-color: rgba(52, 211, 153, 0.12);
    --border-hover: rgba(52, 211, 153, 0.3);
    --text-main: #f0fdf4;
    --text-dim: #a7f3d0;
    --accent-blue: #34d399;
    --accent-green: #059669;
    --accent-purple: #a78bfa;
    --accent-orange: #fcd34d;
    --accent-glow: rgba(52, 211, 153, 0.15);
    --gradient-1: rgba(52, 211, 153, 0.1);
    --gradient-2: rgba(6, 78, 59, 0.15);
}

body.theme-cyberpunk {
    --bg-color: #0a0a07;
    --sidebar-bg: rgba(23, 23, 15, 0.85);
    --card-bg: rgba(38, 38, 25, 0.65);
    --border-color: rgba(250, 204, 21, 0.15);
    --border-hover: rgba(250, 204, 21, 0.4);
    --text-main: #fef08a;
    --text-dim: #ca8a04;
    --accent-blue: #22d3ee;
    --accent-green: #4ade80;
    --accent-purple: #f472b6;
    --accent-orange: #facc15;
    --accent-glow: rgba(250, 204, 21, 0.15);
    --gradient-1: rgba(250, 204, 21, 0.08);
    --gradient-2: rgba(34, 211, 238, 0.08);
}

body.theme-pulsefire {
    --bg-color: #030a16;
    --sidebar-bg: rgba(6, 17, 38, 0.85);
    --card-bg: rgba(10, 29, 64, 0.6);
    --border-color: rgba(0, 240, 255, 0.15);
    --border-hover: rgba(0, 240, 255, 0.45);
    --text-main: #e2f1ff;
    --text-dim: #7fb4e5;
    --accent-blue: #00f0ff;
    --accent-green: #39ff14;
    --accent-purple: #bd00ff;
    --accent-orange: #ff007f;
    --accent-glow: rgba(0, 240, 255, 0.2);
    --gradient-1: rgba(0, 240, 255, 0.1);
    --gradient-2: rgba(3, 10, 22, 0.15);
}

body.theme-rockband {
    --bg-color: #0c0c0e;
    --sidebar-bg: rgba(18, 18, 20, 0.85);
    --card-bg: rgba(26, 26, 30, 0.65);
    --border-color: rgba(239, 68, 68, 0.15);
    --border-hover: rgba(239, 68, 68, 0.45);
    --text-main: #f3f4f6;
    --text-dim: #9ca3af;
    --accent-blue: #ef4444;
    --accent-green: #22c55e;
    --accent-purple: #a855f7;
    --accent-orange: #f97316;
    --accent-glow: rgba(239, 68, 68, 0.15);
    --gradient-1: rgba(239, 68, 68, 0.08);
    --gradient-2: rgba(249, 115, 22, 0.08);
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    background-image: 
        radial-gradient(circle at 0% 0%, var(--gradient-1) 0%, transparent 45%),
        radial-gradient(circle at 100% 100%, var(--gradient-2) 0%, transparent 45%);
    background-attachment: fixed;
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    overflow-x: hidden;
    transition: background 0.3s, color 0.3s;
}

/* STRONA LOGOWANIA */
.login-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    min-height: 100vh;
    padding: 1.5rem;
}

.login-container {
    width: 100%;
    max-width: 420px;
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 3rem 2.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5), 0 0 40px -10px var(--accent-glow);
    text-align: center;
    transition: all 0.3s;
}

.login-logo {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: inline-block;
    animation: float 3s ease-in-out infinite;
}

.login-container h1 {
    font-size: 2.25rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.03em;
}

.login-subtitle {
    color: var(--text-dim);
    font-size: 0.9rem;
    margin-bottom: 2.5rem;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.input-group {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-dim);
    pointer-events: none;
    opacity: 0.7;
}

.input-field {
    width: 100%;
    padding: 14px 16px 14px 44px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-main);
    font-family: inherit;
    font-size: 0.95rem;
    transition: all 0.3s;
}

.input-field:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: 0 0 15px var(--accent-glow);
    background: rgba(15, 23, 42, 0.8);
}

.submit-btn {
    padding: 14px;
    background: linear-gradient(135deg, var(--accent-blue), #0284c7);
    border: none;
    border-radius: 12px;
    color: white;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(56, 189, 248, 0.2);
    margin-top: 0.5rem;
}

.submit-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(56, 189, 248, 0.35);
}

.error-msg {
    color: #f87171;
    font-size: 0.85rem;
    background: rgba(248, 113, 113, 0.1);
    border: 1px solid rgba(248, 113, 113, 0.2);
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 1rem;
}

/* UKŁAD ZALOGOWANEGO UŻYTKOWNIKA */
.app-wrapper {
    display: flex;
    width: 100%;
    min-height: 100vh;
}

/* PANEL BOCZNY (SIDEBAR) */
.sidebar {
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    padding: 2rem 1.25rem;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 100;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 2rem;
}

.brand-logo {
    font-size: 1.8rem;
    animation: float 4s ease-in-out infinite;
}

.brand-name {
    font-size: 1.25rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.02em;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    margin-bottom: 1.5rem;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #080c14;
    font-size: 1.1rem;
}

.user-info {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-main);
}

.user-status {
    font-size: 0.75rem;
    color: var(--accent-green);
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 2px;
}

.status-pulse {
    width: 6px;
    height: 6px;
    background-color: var(--accent-green);
    border-radius: 50%;
    box-shadow: 0 0 6px var(--accent-green);
}

/* GRUPOWANIE I PODMENU W SIDEBARZE */
.sidebar-section-label {
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-dim);
    margin: 1.25rem 0 0.5rem 8px;
    opacity: 0.8;
}

.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    color: var(--text-dim);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    border-radius: 10px;
    border: 1px solid transparent;
    transition: all 0.2s ease;
    cursor: pointer;
}

.nav-item:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.03);
    border-color: var(--border-color);
}

.nav-item.active {
    color: var(--accent-blue);
    background: rgba(56, 189, 248, 0.08);
    border-color: rgba(56, 189, 248, 0.15);
    font-weight: 600;
}

/* Styl dla podmenu Sys Admin */
.submenu-container {
    display: none;
    flex-direction: column;
    gap: 3px;
    padding-left: 12px;
    margin-top: 2px;
    border-left: 1px solid var(--border-color);
    margin-left: 14px;
}

.submenu-container.open {
    display: flex;
}

.submenu-item {
    padding: 8px 12px;
    font-size: 0.85rem;
}

.toggle-arrow {
    margin-left: auto;
    font-size: 0.65rem;
    transition: transform 0.2s;
    opacity: 0.6;
}

.active .toggle-arrow {
    transform: rotate(90deg);
}

.logout-btn {
    margin-top: auto;
    border-color: rgba(239, 68, 68, 0.1);
}
.logout-btn:hover {
    color: #f87171;
    background: rgba(239, 68, 68, 0.08);
    border-color: rgba(239, 68, 68, 0.2);
}

/* OBSZAR ROBOCZY (MAIN CONTENT) */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 3rem 4rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: margin-left 0.3s ease;
}

/* HEADER & WIDŻETY */
.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.greeting h2 {
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 4px;
}

.greeting p {
    color: var(--text-dim);
    font-size: 0.95rem;
}

.quick-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.info-pill {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 8px 16px;
    border-radius: 12px;
    font-size: 0.85rem;
    color: var(--text-dim);
    display: flex;
    align-items: center;
    gap: 8px;
}

.info-pill strong {
    color: var(--text-main);
}

/* WYSZUKIWARKA */
.search-container {
    position: relative;
    width: 100%;
    max-width: 480px;
    margin-bottom: 2.5rem;
}

.search-icon-main {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-dim);
    pointer-events: none;
    opacity: 0.7;
}

.search-input-main {
    width: 100%;
    padding: 14px 16px 14px 48px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    color: var(--text-main);
    font-family: inherit;
    font-size: 0.95rem;
    transition: all 0.3s;
}

.search-input-main:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: 0 0 20px var(--accent-glow);
    background: rgba(20, 30, 54, 0.8);
}

/* KATEGORIE I KARTY */
.section-wrapper {
    margin-bottom: 2.5rem;
    animation: fadeIn 0.4s ease;
}

.section-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-dim);
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-color);
}

.grid-layout {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.link-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.25rem;
    text-decoration: none;
    color: var(--text-main);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 140px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.link-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-hover);
    background: rgba(20, 30, 54, 0.85);
    box-shadow: 0 12px 24px -10px rgba(0, 0, 0, 0.4);
}

.card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.card-icon-tag {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
}

.card-arrow {
    font-size: 0.85rem;
    color: var(--text-dim);
    transition: transform 0.2s, color 0.2s;
}

.link-card:hover .card-arrow {
    color: var(--accent-blue);
    transform: translate(2px, -2px);
}

.card-meta h4 {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 4px;
    letter-spacing: -0.01em;
}

.card-meta p {
    font-size: 0.8rem;
    color: var(--text-dim);
    line-height: 1.4;
}

/* KOLOROWE AKCENTY KART */
.card-public { border-left: 3px solid var(--accent-green); }
.card-public .card-icon-tag { color: var(--accent-green); background: rgba(16, 185, 129, 0.05); }
.card-private { border-left: 3px solid var(--accent-purple); }
.card-private .card-icon-tag { color: var(--accent-purple); background: rgba(192, 132, 252, 0.05); }

/* KARTY KOMEND */
.cmd-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.25rem;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: all 0.2s;
}

.cmd-card:hover {
    border-color: var(--border-hover);
    background: rgba(20, 30, 54, 0.75);
}

.cmd-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cmd-title {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--accent-blue);
}

.cmd-title.orange { color: var(--accent-orange); }

.cmd-box {
    background: #030712;
    border: 1px solid rgba(255, 255, 255, 0.02);
    padding: 12px;
    border-radius: 10px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.8rem;
    color: #e2e8f0;
    overflow-x: auto;
    white-space: nowrap;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.cmd-text {
    overflow-x: auto;
}

.copy-action-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    color: var(--text-dim);
    border-radius: 6px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}

.copy-action-btn:hover {
    color: var(--text-main);
    background: var(--accent-blue);
    border-color: var(--accent-blue);
}

.copy-toast {
    position: absolute;
    right: 1.25rem;
    top: 1.25rem;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--accent-green);
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.2);
    padding: 3px 8px;
    border-radius: 6px;
    opacity: 0;
    transform: translateY(3px);
    transition: all 0.2s;
    pointer-events: none;
}

.copy-toast.show {
    opacity: 1;
    transform: translateY(0);
}

/* SETTINGS DRAWER */
.settings-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 420px;
    max-width: 100%;
    background: rgba(10, 16, 26, 0.95);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border-left: 1px solid var(--border-color);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
}

.settings-drawer.open {
    transform: translateX(0);
}

.drawer-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 999;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.drawer-backdrop.open {
    display: block;
    opacity: 1;
}

.drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border-color);
}

.drawer-header h3 {
    font-size: 1.25rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.02em;
}

.drawer-close-btn {
    background: none;
    border: none;
    color: var(--text-dim);
    font-size: 1.8rem;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
}

.drawer-close-btn:hover {
    color: var(--text-main);
}

.drawer-content {
    flex: 1;
    overflow-y: auto;
    padding: 2rem;
}

.personalize-section {
    margin-bottom: 2.25rem;
}

.personalize-section h4 {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-dim);
    margin-bottom: 1rem;
    border-left: 2px solid var(--accent-blue);
    padding-left: 8px;
}

.settings-toggle-btn {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--text-dim);
    border-radius: 10px;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.settings-toggle-btn:hover {
    color: var(--text-main);
    border-color: var(--accent-blue);
    background: rgba(56, 189, 248, 0.05);
    box-shadow: 0 0 10px var(--accent-glow);
}

/* Wybór motywu */
.theme-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.theme-option {
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 10px;
    cursor: pointer;
    text-align: center;
    font-weight: 700;
    font-size: 0.85rem;
    transition: all 0.2s ease;
    color: var(--text-main);
}

.theme-option[data-theme="default"] { border-color: rgba(56, 189, 248, 0.25); color: #38bdf8; }
.theme-option[data-theme="neon"] { border-color: rgba(192, 132, 252, 0.25); color: #c084fc; }
.theme-option[data-theme="emerald"] { border-color: rgba(52, 211, 153, 0.25); color: #34d399; }
.theme-option[data-theme="cyberpunk"] { border-color: rgba(250, 204, 21, 0.25); color: #facc15; }
.theme-option[data-theme="pulsefire"] { border-color: rgba(0, 240, 255, 0.25); color: #00f0ff; }
.theme-option[data-theme="rockband"] { border-color: rgba(239, 68, 68, 0.25); color: #ef4444; }

/* Hover states */
.theme-option[data-theme="default"]:hover { border-color: rgba(56, 189, 248, 0.7); background: rgba(56, 189, 248, 0.04); transform: translateY(-1px); }
.theme-option[data-theme="neon"]:hover { border-color: rgba(192, 132, 252, 0.7); background: rgba(192, 132, 252, 0.04); transform: translateY(-1px); }
.theme-option[data-theme="emerald"]:hover { border-color: rgba(52, 211, 153, 0.7); background: rgba(52, 211, 153, 0.04); transform: translateY(-1px); }
.theme-option[data-theme="cyberpunk"]:hover { border-color: rgba(250, 204, 21, 0.7); background: rgba(250, 204, 21, 0.04); transform: translateY(-1px); }
.theme-option[data-theme="pulsefire"]:hover { border-color: rgba(0, 240, 255, 0.7); background: rgba(0, 240, 255, 0.04); transform: translateY(-1px); }
.theme-option[data-theme="rockband"]:hover { border-color: rgba(239, 68, 68, 0.7); background: rgba(239, 68, 68, 0.04); transform: translateY(-1px); }

/* Selected states */
.theme-option[data-theme="default"].selected { border-color: rgba(56, 189, 248, 1); background: rgba(56, 189, 248, 0.12); box-shadow: 0 0 10px rgba(56, 189, 248, 0.2); }
.theme-option[data-theme="neon"].selected { border-color: rgba(192, 132, 252, 1); background: rgba(192, 132, 252, 0.12); box-shadow: 0 0 10px rgba(192, 132, 252, 0.2); }
.theme-option[data-theme="emerald"].selected { border-color: rgba(52, 211, 153, 1); background: rgba(52, 211, 153, 0.12); box-shadow: 0 0 10px rgba(52, 211, 153, 0.2); }
.theme-option[data-theme="cyberpunk"].selected { border-color: rgba(250, 204, 21, 1); background: rgba(250, 204, 21, 0.12); box-shadow: 0 0 10px rgba(250, 204, 21, 0.2); }
.theme-option[data-theme="pulsefire"].selected { border-color: rgba(0, 240, 255, 1); background: rgba(0, 240, 255, 0.12); box-shadow: 0 0 10px rgba(0, 240, 255, 0.2); }
.theme-option[data-theme="rockband"].selected { border-color: rgba(239, 68, 68, 1); background: rgba(239, 68, 68, 0.12); box-shadow: 0 0 10px rgba(239, 68, 68, 0.2); }

/* Dodawanie / Zarządzanie Linkami */
.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-dim);
}

.form-input {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px 14px;
    color: var(--text-main);
    font-family: inherit;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.form-input:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: 0 0 10px var(--accent-glow);
}

.form-btn {
    background: linear-gradient(135deg, var(--accent-blue), #0284c7);
    border: none;
    border-radius: 8px;
    color: white;
    padding: 10px 20px;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
    align-self: flex-end;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.form-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(56, 189, 248, 0.2);
}

.form-btn-secondary {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    color: var(--text-main);
}

.form-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-1px);
}

/* Lista linków w zarządzaniu */
.links-manage-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 1.5rem;
    max-height: 350px;
    overflow-y: auto;
    padding-right: 8px;
}

.manage-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 10px 14px;
}

.manage-item-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.manage-item-icon {
    font-size: 1.2rem;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.03);
    display: flex;
    align-items: center;
    justify-content: center;
}

.manage-item-text h4 {
    font-size: 0.9rem;
    font-weight: 600;
}

.manage-item-text p {
    font-size: 0.75rem;
    color: var(--text-dim);
}

.manage-actions {
    display: flex;
    gap: 8px;
}

.action-icon-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    color: var(--text-dim);
    border-radius: 6px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.action-icon-btn:hover {
    color: var(--text-main);
}

.btn-delete:hover {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.3);
    color: #f87171;
}

.btn-edit:hover {
    background: rgba(56, 189, 248, 0.15);
    border-color: rgba(56, 189, 248, 0.3);
    color: var(--accent-blue);
}

/* Powiadomienie toast */
.toast-notification {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--card-bg);
    backdrop-filter: blur(15px);
    border: 1px solid var(--accent-blue);
    border-radius: 12px;
    padding: 12px 24px;
    color: var(--text-main);
    font-weight: 600;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5), 0 0 20px var(--accent-glow);
    z-index: 1000;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
    pointer-events: none;
}

.toast-notification.show {
    opacity: 1;
    transform: translateY(0);
}

/* RESPONSYWNOŚĆ I HAMBURGER */
.menu-toggle {
    display: none;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    border-radius: 10px;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 110;
    position: fixed;
    top: 1.5rem;
    left: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* WIDGET BACKDROP DLA SIDEBARU */
.sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 95;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

@media (max-width: 992px) {
    .sidebar {
        transform: translateX(-100%);
        box-shadow: 10px 0 30px rgba(0, 0, 0, 0.4);
    }
    .sidebar.open {
        transform: translateX(0);
    }
    .sidebar.open ~ .sidebar-backdrop {
        display: block;
        opacity: 1;
        pointer-events: auto;
    }
    .main-content {
        margin-left: 0;
        padding: 6rem 1.5rem 2rem 1.5rem;
    }
    .menu-toggle {
        display: flex;
    }
}

@media (max-width: 768px) {
    /* Horyzontalny scroll Kanban dla telefonów */
    .kanban-board {
        display: flex !important;
        overflow-x: auto !important;
        gap: 1rem !important;
        padding-bottom: 15px !important;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
        grid-template-columns: none !important;
    }
    .kanban-column {
        flex: 0 0 280px !important;
        scroll-snap-align: start;
        min-height: 450px !important;
    }
}

@media (max-width: 576px) {
    .main-content {
        padding: 5.5rem 1rem 1.5rem 1rem;
    }
    .dashboard-col-tasks, .dashboard-col-projects {
        padding: 1.25rem 1rem;
    }
    .content-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .quick-info {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        margin-top: 10px;
    }
    .info-pill {
        justify-content: space-between;
    }
    /* Zawijanie pól formularza dodawania zadania */
    .form-row-quick {
        flex-wrap: wrap !important;
    }
    .form-row-quick select,
    .form-row-quick input[type="date"],
    .form-row-quick button {
        flex: 1 0 120px !important;
        height: 36px !important;
    }
}

/* ANIMACJE */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

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

/* KOKPIT APPLICATION SUB-TABS */
.kokpit-tabs {
    display: flex;
    gap: 12px;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 12px;
}

.kokpit-tab-btn, .sysadmin-tab-btn {
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-dim);
    padding: 10px 18px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.kokpit-tab-btn:hover, .sysadmin-tab-btn:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.03);
}

.kokpit-tab-btn.active, .sysadmin-tab-btn.active {
    color: var(--accent-blue);
    background: rgba(56, 189, 248, 0.08);
    border-color: rgba(56, 189, 248, 0.15);
}

.kokpit-tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.kokpit-tab-content.active {
    display: block;
}

/* BAZA WIEDZY LAYOUT */
.knowledge-layout {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 2rem;
}

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

.knowledge-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.knowledge-sidebar {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
    height: fit-content;
    position: sticky;
    top: 2rem;
}

.knowledge-sidebar h4 {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-dim);
    margin-bottom: 1rem;
}

/* CHMURA TAGÓW */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-badge {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    color: var(--text-dim);
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
}

.tag-badge:hover, .tag-badge.active {
    color: var(--accent-blue);
    background: rgba(56, 189, 248, 0.08);
    border-color: var(--accent-blue);
}

/* FILTRY AKTYWNYCH TAGÓW */
.tag-filters-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 1rem;
}

.active-tag-filter {
    background: rgba(56, 189, 248, 0.1);
    border: 1px solid rgba(56, 189, 248, 0.3);
    color: var(--accent-blue);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.active-tag-filter::after {
    content: "×";
    font-size: 1rem;
    font-weight: 700;
    line-height: 1;
}

/* KARTA ZJEDNOCZONEJ BAZY WIEDZY */
.knowledge-item {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
    position: relative;
    transition: transform 0.2s, border-color 0.2s;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.knowledge-item:hover {
    transform: translateY(-2px);
    border-color: var(--border-hover);
}

.k-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.k-item-type {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-dim);
    display: flex;
    align-items: center;
    gap: 6px;
}

.k-item-date {
    font-size: 0.75rem;
    color: var(--text-dim);
}

.k-item-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-main);
    margin: 4px 0;
}

.k-item-content {
    font-size: 0.9rem;
    color: var(--text-dim);
    line-height: 1.5;
    word-break: break-word;
}

.k-item-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 6px;
}

.k-item-tag {
    color: var(--accent-purple);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
}

.k-item-tag:hover {
    text-decoration: underline;
}

/* NOTATKI GRID */
.notes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.note-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 180px;
    transition: all 0.2s;
}

.note-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-hover);
}

.note-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.note-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-main);
}

.note-body {
    font-size: 0.85rem;
    color: var(--text-dim);
    line-height: 1.4;
    flex: 1;
    margin-bottom: 12px;
    white-space: pre-wrap;
    word-break: break-word;
}

.note-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border-color);
    padding-top: 8px;
    margin-top: auto;
}

/* BASE LINK TABLE */
.links-list-table {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.link-base-row {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 1rem 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s;
}

.link-base-row:hover {
    border-color: var(--border-hover);
    transform: translateX(4px);
}

.l-base-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.l-base-icon {
    font-size: 1.3rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.l-base-text h4 {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 2px;
}

.l-base-text p {
    font-size: 0.8rem;
    color: var(--text-dim);
}

.l-base-text a {
    color: var(--accent-blue);
    text-decoration: none;
}

.l-base-text a:hover {
    text-decoration: underline;
}

/* KOKPIT: TASK & PROJECT MANAGER LAYOUT */
.dashboard-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 2rem;
    height: calc(100vh - 160px);
    min-height: 500px;
}

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

.dashboard-col-tasks {
    display: flex;
    flex-direction: column;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 1.75rem;
}

.dashboard-col-projects {
    display: flex;
    flex-direction: column;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 1.75rem;
    height: fit-content;
}

.tasks-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
}

.active-project-filter-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent-blue);
    background: rgba(56, 189, 248, 0.08);
    padding: 4px 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.active-project-filter-label:hover {
    background: rgba(56, 189, 248, 0.15);
}

/* Szybkie dodawanie zadania */
.quick-add-task-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: rgba(0, 0, 0, 0.15);
    padding: 10px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    margin-bottom: 1.5rem;
}

.quick-add-task-form input {
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--border-color);
    border-radius: 0;
    padding: 6px 4px;
}

.quick-add-task-form input:focus {
    border-bottom-color: var(--accent-blue);
    box-shadow: none;
}

.form-row-quick {
    display: flex;
    gap: 8px;
    align-items: center;
}

.form-row-quick select,
.form-row-quick input[type="date"] {
    font-size: 0.75rem;
    padding: 5px 10px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-main);
    height: 29px;
    box-sizing: border-box;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-row-quick select:focus,
.form-row-quick input[type="date"]:focus {
    border-color: var(--accent-blue);
    box-shadow: 0 0 6px var(--accent-glow);
}

.form-row-quick button {
    margin-left: auto;
    padding: 6px 14px;
    font-size: 0.75rem;
    border-radius: 6px;
    height: 29px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Filtry zadań i widoków */
.task-time-filter-btn {
    background: transparent;
    border: none;
    color: var(--text-dim);
    padding: 5px 12px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s ease;
    outline: none;
}

.task-time-filter-btn:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.05);
}

.task-time-filter-btn.active {
    color: #fff;
    background: var(--accent-blue);
    box-shadow: 0 2px 8px rgba(56, 189, 248, 0.3);
}

/* Przewijana lista zadań */
.tasks-scroll-area {
    flex: 1;
    overflow-y: auto;
    padding-right: 8px;
}

.tasks-group-container h4 {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-dim);
    margin-bottom: 0.75rem;
}

.tasks-checklist-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.task-checklist-item {
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.2s;
}

.task-checklist-item:hover {
    border-color: var(--border-hover);
    background: rgba(255, 255, 255, 0.02);
}

.task-priority-indicator {
    width: 4px;
    height: 18px;
    border-radius: 2px;
}
.priority-high { background-color: var(--accent-orange); }
.priority-medium { background-color: var(--accent-blue); }
.priority-low { background-color: var(--text-dim); }

.task-checkbox {
    appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.task-checkbox:checked {
    background-color: var(--accent-green);
    border-color: var(--accent-green);
}

.task-checkbox:checked::after {
    content: "✓";
    color: #0b0518;
    font-size: 0.75rem;
    font-weight: 800;
}

.task-text {
    font-size: 0.9rem;
    color: var(--text-main);
    flex: 1;
}

.task-project-tag {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
}

.completed-tasks-group {
    margin-top: 2rem;
    opacity: 0.6;
}

.completed-tasks-group .task-text {
    text-decoration: line-through;
    color: var(--text-dim);
}

/* PROJEKTY: LISTA */
.projects-list-flex {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.project-list-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 12px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.project-list-card:hover, .project-list-card.active {
    border-color: var(--accent-blue);
    background: rgba(56, 189, 248, 0.05);
}

.project-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.project-name-group {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 0.9rem;
}

.project-color-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.project-stats-text {
    font-size: 0.75rem;
    color: var(--text-dim);
}

/* Paski postępu */
.project-progress-container {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 2px;
    overflow: hidden;
}

.project-progress-bar {
    height: 100%;
    border-radius: 2px;
    transition: width 0.3s ease;
}


/* ==================== POPUP MODAL DOKUMENTACJI API ==================== */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 1200;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-backdrop.open {
    display: flex;
    opacity: 1;
}

.api-modal {
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    width: 600px;
    max-width: 90%;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-backdrop.open .api-modal {
    transform: scale(1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.75rem;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-main);
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-dim);
    font-size: 1.5rem;
    cursor: pointer;
}

.modal-close:hover {
    color: var(--text-main);
}

.modal-body {
    padding: 1.75rem;
    overflow-y: auto;
    font-size: 0.9rem;
    line-height: 1.5;
}

.modal-sub {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--accent-blue);
    margin-top: 1.25rem;
    margin-bottom: 0.5rem;
}

.modal-body pre {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    padding: 10px 14px;
    border-radius: 8px;
    overflow-x: auto;
    margin-bottom: 1rem;
}

.modal-body code {
    font-family: monospace;
    font-size: 0.8rem;
    color: #f1f5f9;
}

.api-key-placeholder {
    color: #fbcfe8;
    font-weight: 700;
}

/* ==================== STYLING FAZY 1: ONBOARDING, PROFILE, ETC ==================== */

/* Karta Onboardingu */
.onboarding-card {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.7), rgba(15, 23, 42, 0.9));
    border: 1px solid rgba(56, 189, 248, 0.25);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    animation: fadeIn 0.4s ease;
}

.onboarding-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.onboarding-header h4 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: #f8fafc;
}

.onboarding-close {
    background: none;
    border: none;
    color: var(--text-dim);
    font-size: 1.3rem;
    cursor: pointer;
    line-height: 1;
}

.onboarding-close:hover {
    color: var(--text-main);
}

.onboarding-card p {
    font-size: 0.88rem;
    color: var(--text-dim);
    margin-bottom: 1rem;
}

.onboarding-checklist {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}

.ob-step {
    font-size: 0.82rem;
    color: var(--text-dim);
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    padding: 10px 12px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.ob-step strong {
    color: var(--text-main);
}

.ob-step.completed {
    border-color: rgba(34, 197, 94, 0.3);
    background: rgba(34, 197, 94, 0.04);
    color: rgba(255, 255, 255, 0.4);
    text-decoration: line-through;
}

.ob-step.completed span {
    filter: grayscale(1) opacity(0.5);
}

/* Profil Użytkownika Layout */
.profile-layout {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 2rem 0;
    animation: fadeIn 0.4s ease;
}

.profile-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    width: 450px;
    max-width: 100%;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    overflow: hidden;
}

.profile-header {
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.07), rgba(56, 189, 248, 0.02));
    padding: 2.5rem 1.75rem;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.profile-avatar {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-blue), #0284c7);
    color: white;
    font-size: 2rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.5rem;
    box-shadow: 0 0 20px rgba(56, 189, 248, 0.4);
}

.profile-header h3 {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-main);
}

.profile-header p {
    margin: 0;
    font-size: 0.85rem;
    color: var(--text-dim);
}

.profile-body {
    padding: 2rem;
}

.profile-body h4 {
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-main);
}

/* Markdown render body */
.markdown-body {
    font-size: 0.85rem;
    line-height: 1.5;
    color: var(--text-dim);
}

.markdown-body h1, .markdown-body h2, .markdown-body h3 {
    color: var(--text-main);
    margin-top: 0.8rem;
    margin-bottom: 0.4rem;
    font-weight: 700;
}

.markdown-body h1 { font-size: 1.2rem; }
.markdown-body h2 { font-size: 1.05rem; }
.markdown-body h3 { font-size: 0.95rem; }

.markdown-body strong {
    color: var(--text-main);
    font-weight: 700;
}

.markdown-body code {
    font-family: monospace;
    background: rgba(255, 255, 255, 0.05);
    padding: 2px 4px;
    border-radius: 4px;
    font-size: 0.85rem;
    color: var(--accent-orange);
}

.markdown-body pre {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    padding: 8px 12px;
    border-radius: 6px;
    overflow-x: auto;
    margin: 8px 0;
}

.markdown-body pre code {
    background: transparent;
    padding: 0;
    color: inherit;
}

/* WIDŻETY KOKPITU */
.kokpit-widgets-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
    animation: fadeIn 0.4s ease;
}

.widget-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 1rem 1.25rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 100px;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.widget-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255,255,255,0.03) 0%, transparent 100%);
    pointer-events: none;
}

.widget-card:hover {
    transform: translateY(-2px);
    border-color: var(--border-hover);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.widget-clock {
    align-items: center;
    text-align: center;
}

.widget-clock-time {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -0.02em;
    font-family: monospace, system-ui;
    line-height: 1.1;
    margin-bottom: 4px;
    text-shadow: 0 0 20px var(--accent-glow);
}

.widget-clock-date {
    font-size: 0.8rem;
    color: var(--text-dim);
    font-weight: 500;
    text-transform: capitalize;
}

.widget-weather {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.widget-weather-left {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.widget-weather-temp {
    font-size: 2.3rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.03em;
    background: linear-gradient(135deg, var(--text-main) 30%, var(--text-dim) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.widget-weather-desc {
    font-size: 0.88rem;
    color: var(--text-main);
    font-weight: 600;
    margin-top: 2px;
}

.widget-weather-info {
    font-size: 0.75rem;
    color: var(--text-dim);
    line-height: 1.4;
}

.widget-weather-right {
    font-size: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.15));
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.widget-card:hover .widget-weather-right {
    transform: scale(1.15) rotate(8deg);
}

.widget-quote {
    font-style: italic;
    gap: 8px;
}

.widget-quote-text {
    font-size: 0.88rem;
    color: var(--text-main);
    line-height: 1.5;
    position: relative;
    z-index: 1;
}

.widget-quote-author {
    font-size: 0.75rem;
    color: var(--text-dim);
    font-weight: 600;
    text-align: right;
    font-style: normal;
}

/* WYSZUKIWARKA GLOBALNA */
.web-search-box-container {
    width: 100%;
    max-width: 600px;
    margin: 0 auto 1.5rem auto;
}

.web-search-form {
    display: flex;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.web-search-form:focus-within {
    border-color: var(--accent-blue);
    box-shadow: 0 0 24px var(--accent-glow);
}

.web-search-select {
    background: rgba(255, 255, 255, 0.02);
    border: none;
    border-right: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 0 16px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    text-align: center;
}

.web-search-select option {
    background: #080c14;
    color: #f8fafc;
}

.web-search-input-wrapper {
    display: flex;
    flex: 1;
    position: relative;
    align-items: center;
}

.web-search-input {
    width: 100%;
    background: transparent;
    border: none;
    padding: 14px 48px 14px 16px;
    color: var(--text-main);
    font-size: 0.95rem;
    outline: none;
}

.web-search-btn {
    position: absolute;
    right: 12px;
    background: transparent;
    border: none;
    color: var(--text-dim);
    cursor: pointer;
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.web-search-btn:hover {
    color: var(--accent-blue);
}

/* STATYSTYKI I HEATMAPA */
#statsAppContainer {
    animation: fadeIn 0.4s ease;
}

.stats-grid {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.stats-summary-card, .stats-heatmap-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 1.75rem;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.stats-summary-card h3, .stats-heatmap-card h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 1.25rem;
}

.stats-summary-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.5rem;
}

.stat-box {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 6px;
    transition: all 0.2s ease;
}

.stat-box:hover {
    border-color: var(--border-hover);
    background: rgba(255, 255, 255, 0.04);
}

.stat-value {
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -0.02em;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-dim);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stats-heatmap-desc {
    font-size: 0.85rem;
    color: var(--text-dim);
    margin-bottom: 1.5rem;
}

.heatmap-wrapper {
    display: flex;
    gap: 4px;
    overflow-x: auto;
    padding-bottom: 8px;
}

.heatmap-column {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.heatmap-square {
    width: 14px;
    height: 14px;
    border-radius: 3px;
    background-color: rgba(255, 255, 255, 0.04);
    transition: all 0.2s ease;
    cursor: pointer;
}

.heatmap-square.level-0 {
    background-color: rgba(255, 255, 255, 0.04);
}

.heatmap-square.level-1 {
    background-color: rgba(56, 189, 248, 0.25);
}

.heatmap-square.level-2 {
    background-color: rgba(56, 189, 248, 0.6);
}

.heatmap-square.level-3 {
    background-color: var(--accent-blue);
    box-shadow: 0 0 8px var(--accent-blue);
}

.heatmap-legend {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    margin-top: 1rem;
    font-size: 0.75rem;
    color: var(--text-dim);
}

.legend-box {
    width: 12px;
    height: 12px;
    border-radius: 2px;
}
.legend-box.level-0 { background-color: rgba(255, 255, 255, 0.04); }
.legend-box.level-1 { background-color: rgba(56, 189, 248, 0.25); }
.legend-box.level-2 { background-color: rgba(56, 189, 248, 0.6); }
.legend-box.level-3 { background-color: var(--accent-blue); }

/* WIDOK URZĄDZEŃ (DEVICES) */
.devices-list-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    width: 100%;
}

.devices-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
    animation: fadeIn 0.3s ease;
}

/* GRUPOWANIE URZĄDZEŃ */
.device-group-section {
    margin-bottom: 2.5rem;
    animation: fadeIn 0.3s ease;
}

.device-group-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 1.25rem;
}

.device-group-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 8px;
}

.device-group-count {
    font-size: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    padding: 2px 8px;
    border-radius: 20px;
    color: var(--text-dim);
}

.btn-delete-group {
    background: transparent;
    border: none;
    color: var(--text-dim);
    font-size: 0.8rem;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s;
}

.btn-delete-group:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.device-group-select {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-dim);
    font-size: 0.72rem;
    padding: 2px 6px;
    cursor: pointer;
    outline: none;
    transition: all 0.2s;
    max-width: 140px;
}

.device-group-select:focus {
    border-color: var(--accent-blue);
    color: var(--text-main);
}

.device-hover-actions {
    display: none;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px dashed var(--border-color);
}

.device-card:hover .device-hover-actions {
    display: flex;
}

.device-action-buttons {
    display: flex;
    gap: 6px;
    align-items: center;
}

.device-action-buttons button {
    background: transparent;
    border: none;
    color: var(--text-dim);
    cursor: pointer;
    padding: 2px 6px;
    font-size: 0.8rem;
    border-radius: 4px;
    transition: all 0.2s;
}

.device-action-buttons button:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
}

.device-action-buttons .btn-device-delete:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.device-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.25rem;
    position: relative;
    transition: all 0.2s ease;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.device-card:hover {
    transform: translateY(-2px);
    border-color: var(--border-hover);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.device-card.online {
    border-left: 4px solid var(--accent-green);
}

.device-card.offline {
    border-left: 4px solid var(--text-dim);
    opacity: 0.8;
}

.device-status-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.72rem;
    font-weight: 700;
}

.device-status-badge.status-online {
    background: rgba(16, 185, 129, 0.1);
    color: var(--accent-green);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.device-status-badge.status-locked {
    background: rgba(251, 146, 60, 0.1);
    color: var(--accent-orange);
    border: 1px solid rgba(251, 146, 60, 0.2);
}

.device-status-badge.status-offline {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-dim);
    border: 1px solid var(--border-color);
}

/* ==================== MOTYW PULSEFIRE (CYBERNETYCZNY Terminal) ==================== */
body.theme-pulsefire {
    background-image: 
        linear-gradient(rgba(0, 240, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 240, 255, 0.02) 1px, transparent 1px);
    background-size: 30px 30px;
    font-family: 'Fira Code', 'Consolas', 'Courier New', monospace;
}

body.theme-pulsefire h1,
body.theme-pulsefire h2,
body.theme-pulsefire h3,
body.theme-pulsefire h4,
body.theme-pulsefire .widget-clock-time,
body.theme-pulsefire .nav-item,
body.theme-pulsefire .form-btn,
body.theme-pulsefire .form-input,
body.theme-pulsefire .project-name-group {
    font-family: 'Fira Code', 'Consolas', 'Courier New', monospace;
}

body.theme-pulsefire .widget-card,
body.theme-pulsefire .project-list-card,
body.theme-pulsefire .sidebar,
body.theme-pulsefire .nav-item,
body.theme-pulsefire .form-input,
body.theme-pulsefire .form-btn,
body.theme-pulsefire .task-card,
body.theme-pulsefire .search-input-wrapper,
body.theme-pulsefire .web-search-form,
body.theme-pulsefire .personalization-drawer,
body.theme-pulsefire .device-card {
    border-radius: 4px !important;
    border-color: rgba(0, 240, 255, 0.25) !important;
}

body.theme-pulsefire .widget-card {
    box-shadow: inset 0 0 15px rgba(0, 240, 255, 0.05);
}

body.theme-pulsefire .widget-card:hover,
body.theme-pulsefire .project-list-card:hover,
body.theme-pulsefire .project-list-card.active,
body.theme-pulsefire .device-card:hover {
    border-color: #00f0ff !important;
    box-shadow: inset 0 0 15px rgba(0, 240, 255, 0.1), 0 0 10px rgba(0, 240, 255, 0.2) !important;
}

body.theme-pulsefire .nav-item.active {
    border-left: 4px solid #00f0ff;
    background: rgba(0, 240, 255, 0.08) !important;
    box-shadow: inset 0 0 10px rgba(0, 240, 255, 0.05);
}

body.theme-pulsefire .nav-item:hover:not(.active) {
    background: rgba(0, 240, 255, 0.03) !important;
}

body.theme-pulsefire .widget-clock-time {
    text-shadow: 0 0 10px rgba(0, 240, 255, 0.5);
}

body.theme-pulsefire::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 240, 255, 0.03) 50%);
    background-size: 100% 4px;
    z-index: 9999;
    pointer-events: none;
    opacity: 0.3;
}
