
/* ZÁKLADNÍ NASTAVENÍ A PROMĚNNÉ */
   :root {
    --primary: #0066ff;
    --primary-hover: #0052cc;
    --bg-light: #f8f9fc;
    --bg-white: #ffffff;
    --border: #e5e7eb;
    --text-primary: #111827;
    --text-secondary: #6b7280;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --navbar-height: 50px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

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

html {
    scrollbar-width: none;
}

html,
body {
    max-width: 100%;
    overflow-x: hidden;
}

body {
    background: var(--bg-light);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    padding-top: 60px;

    overflow-y: scroll;
    overflow-x: hidden;

    -ms-overflow-style: none;
}

::-webkit-scrollbar {
    display: none;

}

input,
textarea,
select {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 14px;
    padding: 12px 16px;
    transition: all 0.2s ease;
    width: 100%;
}

textarea {
    min-height: 100px;
    resize: vertical;
}

select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%236B7280' viewBox='0 0 12 12'%3E%3Cpath d='M3 5l3 3 3-3'/%3E%3C/svg%3E");
    background-position: right 12px center;
    background-repeat: no-repeat;
    padding-right: 40px;
}

select:disabled {
    background-color: #f5f5f5;
    cursor: not-allowed;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-secondary);
    font-size: 14px;
}

.readonly-field {
    padding: 12px 16px;
    background: var(--bg-light);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-secondary);
}

.form-group.checkbox {
    display: flex;
    align-items: center;
}

.form-group.checkbox input {
    margin-right: 10px;
    width: auto;
}

.form-group.checkbox label {
    margin-bottom: 0;
}

.form-group.indent {
    margin-left: 30px;
    margin-top: -8px;
}

*:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* NAVIGACE A HLAVIČKA */

.navbar {
    background: var(--primary);
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    width: 100%;
    left: 0;
    padding: 6px 12px;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 50;
    height: var(--navbar-height);
}

.nav-center {
    color: var(--bg-white);
    font-weight: 500;
    text-align: center;
    flex: none;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 50;
}

.nav-left,
.nav-right {
    display: flex;
    gap: 20px;
}

.nav-right {
    margin-left: auto;
}

.nav-link {
    align-items: center;
    color: var(--bg-white);
    display: flex;
    padding: 6px;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.nav-icon {
    filter: brightness(0) invert(1);
    height: 24px;
    width: 24px;
    transition: all 0.3s ease;
}

.nav-item {
    position: relative;
    transition: all 0.3s ease;
}

.nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.nav-link:hover .nav-icon,
.nav-item:hover .nav-icon {
    opacity: 0.8;
    transform: scale(1.1);
}

.nav-item::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--bg-white);
    border-radius: 1px;
    transition: all 0.3s ease;
}

.nav-item:hover::after {
    width: 100%;
}

/* 4. DROPDOWN MENU - FIXED VERSION */

.dropdown-content {
    position: absolute;
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: var(--shadow-md);
    opacity: 0;
    visibility: hidden;
    z-index: 1000;
    min-width: 180px;
    transform: translateY(-15px);
    transition: all 0.2s ease;
}

.dropdown-content.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-content a {
    color: var(--text-primary);
    display: flex;
    align-items: center;
    padding: 12px 16px;
    text-decoration: none;
    border-bottom: 1px solid var(--border);
    transition: background-color 0.2s ease;
}

.dropdown-content a:last-child {
    border-bottom: none;
}

.dropdown-content a:hover {
    background-color: var(--bg-light);
}

.navbar .nav-item .dropdown-content {
    top: var(--navbar-height);
}

.projects-dropdown .dropdown-content {
    left: 50%;
    transform: translateX(-50%) translateY(-15px);
    border-top-left-radius: 0;
    border-top-right-radius: 0;
    width: max-content;
    max-width: 90vw;
}

.projects-dropdown .dropdown-content.show {
    transform: translateX(-50%) translateY(0);
}

.projects-dropdown .dropdown-content a {
    white-space: normal !important;
    word-wrap: break-word !important;
    line-height: 1.3 !important;
    min-height: 44px !important;
    display: flex !important;
    align-items: center !important;
}

.no-projects-message {
    padding: 10px 15px;
    color: var(--text-secondary);
    font-size: 14px;
    cursor: default;
    display: block;
    text-align: center;
    white-space: normal;
}

.projects-dropdown:hover .dropdown-content,
.projects-dropdown.active .dropdown-content {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.add-dropdown .dropdown-content {
    left: 0;
    right: auto;
    border-top-left-radius: 0;
    width: auto;
    min-width: 180px;
    max-width: 90vw;
}

.profile-dropdown .dropdown-content {
    right: 0;
    left: auto;
    width: auto;
    min-width: 180px;
    max-width: 90vw;
    border-top-right-radius: 0;
}

.friends-dropdown .dropdown-content {
    right: 0;
    left: auto;
    width: 300px;
    max-width: 90vw;
    border-top-right-radius: 0;
}

.time-tracking-dropdown .dropdown-content,
.time-tracking-content {
    position: absolute;
    left: 50%;
    transform: translateX(-50%) translateY(-15px);
    max-width: 320px;
    width: 90%;
    border-top-left-radius: 0;
    border-top-right-radius: 0;
}

.time-tracking-dropdown .dropdown-content.show,
.time-tracking-content.show {
    transform: translateX(-50%) translateY(0);
}

.time-tracking-header {
    padding: 16px;
    border-bottom: 1px solid var(--border);
}

.time-tracking-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 500;
    color: var(--text-primary);
}

.time-tracking-body {
    padding: 16px;
}

.time-tracking-select {
    width: 100%;
    margin-bottom: 12px;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background-color: white;
}

.time-tracking-buttons {
    display: flex;
    gap: 8px;
    margin-top: 16px;
}

.time-tracking-start {
    flex: 1;
    background: #22c55e;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
}

.time-tracking-start:disabled {
    background: #d1d5db;
}

.time-tracking-cancel {
    flex: 1;
    background: var(--bg-light);
    border: 1px solid var(--border);
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
}

.friends-search {
    padding: 12px;
}

.friends-search input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.2s ease;
}

.no-results {
    padding: 20px;
    text-align: center;
    color: #6b7280;
    font-style: italic;
    background-color: #f9fafb;
    border-radius: 8px;
    margin: 12px;
    border: none;  /* ← Odstraním border */
    font-size: 15px;
}

.empty-state {
    padding: 20px;
    text-align: center;
    color: #6b7280;
    font-style: italic;
    background-color: #f9fafb;
    border-radius: 8px;
    margin: 12px;
    border: none;
    font-size: 15px;
}

.friends-tabs {
    display: flex;
    border-bottom: 1px solid var(--border);
}

.tab-btn {
    flex: 1;
    padding: 12px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-secondary);
    transition: all 0.2s ease;
}

.tab-btn.active {
    color: var(--primary);
    border-bottom: 2px solid var(--primary);
}

@media (max-width: 1024px) {
    .dropdown-content {
        min-width: 160px;
    }

    .add-dropdown .dropdown-content,
    .profile-dropdown .dropdown-content {
        min-width: 160px;
        width: auto;
    }

    .friends-dropdown .dropdown-content {
        width: 280px;
        max-width: 95vw;
    }

    .time-tracking-dropdown .dropdown-content,
    .time-tracking-content {
        max-width: 300px;
        width: 95%;
    }
}

@media (max-width: 768px) {
    :root {
        --navbar-height: 50px;
    }

    .dropdown-content {
        min-width: 140px;
    }

    .add-dropdown .dropdown-content,
    .profile-dropdown .dropdown-content {
        min-width: 140px;
        width: auto;
    }

    .friends-dropdown .dropdown-content {
        width: 250px;
        max-width: 95vw;
    }

    .time-tracking-dropdown .dropdown-content,
    .time-tracking-content {
        max-width: 260px;
        width: 95%;
    }

    .dropdown-content a {
        padding: 10px 12px;
        font-size: 14px;
    }
}

@media (max-width: 576px) {
    .dropdown-content {
        min-width: 120px;
    }

    .add-dropdown .dropdown-content,
    .profile-dropdown .dropdown-content {
        min-width: 120px;
        width: auto;
        max-width: 95vw;
    }

    .friends-dropdown .dropdown-content {
        width: 220px;
        max-width: 95vw;
    }

    .time-tracking-dropdown .dropdown-content,
    .time-tracking-content {
        max-width: 220px;
        width: 95%;
    }

    .dropdown-content a {
        padding: 8px 10px;
        font-size: 13px;
    }

    .time-tracking-header h3 {
        font-size: 14px;
    }

    .time-tracking-select,
    .time-tracking-buttons button {
        padding: 6px 10px;
        font-size: 13px;
    }

    .friends-search input {
        padding: 6px 10px;
        font-size: 13px;
    }
}

@media (max-width: 320px) {
    .dropdown-content {
        min-width: 100px;
    }

    .add-dropdown .dropdown-content,
    .profile-dropdown .dropdown-content {
        min-width: 100px;
        width: auto;
        max-width: 95vw;
    }

    .friends-dropdown .dropdown-content {
        width: 200px;
        max-width: 95vw;
    }

    .time-tracking-dropdown .dropdown-content,
    .time-tracking-content {
        max-width: 180px;
        width: 90%;
    }
}

@media (hover: none) and (pointer: coarse) {
    .dropdown-content a {
        padding-top: 14px;
        padding-bottom: 14px;
    }
}

/* PŘIHLÁŠENÍ A REGISTRACE */

.auth-body {
    background: #f5f7fa;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 0;
}

.auth-container {
    background: var(--bg-white);
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    margin: 0 auto;
    max-width: 400px;
    width: 90%;
    overflow: hidden;
    position: relative;
}

.auth-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: var(--primary);
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
}

.auth-header {
    padding: 25px 20px 5px;
    text-align: center;
}

.auth-header h2 {
    color: #333;
    font-size: 24px;
    font-weight: 600;
    margin: 0 0 15px;
}

.auth-header-line {
    background: var(--primary);
    height: 4px;
    width: 50px;
    margin: 0 auto;
    border-radius: 2px;
}

.auth-form {
    padding: 20px 25px 30px;
}

.auth-input-group {
    margin-bottom: 16px;
}

.auth-input-group input {
    width: 100%;
    padding: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    background: #fcfcfc;
    transition: border-color 0.2s ease;
}

.auth-input-group input:focus {
    border-color: var(--primary);
    outline: none;
}

.auth-button {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 8px;
    background: var(--primary);
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
    margin-top: 5px;
}

.auth-button:hover {
    background: var(--primary-hover);
}

.auth-link {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
    color: #666;
}

.auth-link a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.auth-link a:hover {
    text-decoration: underline;
}

.error-message {
    background-color: #fef2f2;
    border-left: 4px solid #ef4444;
    border-radius: 6px;
    color: #b91c1c;
    font-size: 14px;
    margin-bottom: 20px;
    padding: 12px 16px;
}

.success-message {
    background-color: #f0fdf4;
    border-left: 4px solid #10b981;
    border-radius: 6px;
    color: #047857;
    font-size: 14px;
    margin-bottom: 20px;
    padding: 12px 16px;
}

/* PŘEHLED (OVERVIEW)  */
.overview-container {
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 20px;
}

.overview-container h1 {
    margin-bottom: 24px;
    color: var(--text-primary);
}

.overview-section {
    background: white;
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.overview-section h2 {
    margin: 0 0 20px 0;
    font-size: 18px;
    font-weight: 500;
    color: var(--text-primary);
}

.activities-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.activity-item {
    display: flex;
    gap: 16px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.activity-time {
    color: var(--text-secondary);
    font-size: 14px;
    min-width: 120px;
    font-weight: 500;
}

.activity-content {
    color: var(--text-primary);
    flex: 1;
    word-break: break-word;
    overflow-wrap: break-word;
    line-height: 1.4;
}

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

.discussion-item {
    padding: 16px;
    background: var(--bg-light);
    border-radius: 6px;
}

.discussion-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.username {
    font-weight: 500;
    color: var(--text-primary);
}

.task-name {
    color: var(--primary);
}

.task-deadline,
.task-assigned {
    align-items: center;
    display: flex;
    gap: 6px;
}

.discussion-time {
    margin-left: auto;
    color: var(--text-secondary);
    font-size: 14px;
}

.discussion-content {
    color: var(--text-primary);
    line-height: 1.5;
    word-break: break-word;
    overflow-wrap: break-word;
}

.no-activities,
.no-discussions,
.no-data {
    text-align: center;
    color: var(--text-secondary);
    padding: 20px;
    background: var(--bg-light);
    border-radius: 6px;
}

@media (max-width: 768px) {
    .overview-container {
        padding: 0 16px;
        margin: 16px auto;
    }

    .overview-section {
        padding: 20px;
        margin-bottom: 20px;
    }

    .overview-container h1 {
        font-size: 24px;
        margin-bottom: 20px;
    }
}

@media (max-width: 576px) {
    .overview-container {
        padding: 0 12px;
        margin: 15px auto;
    }

    .overview-container h1 {
        font-size: 22px;
        margin-bottom: 16px;
    }

    .overview-section {
        padding: 16px;
        margin-bottom: 16px;
    }

    .overview-section h2 {
        font-size: 16px;
        margin-bottom: 16px;
    }

    .activity-item {
        flex-direction: column;
        gap: 4px;
    }

    .activity-time {
        min-width: auto;
        font-size: 13px;
        margin-bottom: 2px;
    }

    .activity-content {
        font-size: 14px;
    }

    .discussion-header {
        gap: 8px;
    }

    .discussion-time {
        width: 100%;
        margin-left: 0;
        margin-top: 4px;
        font-size: 12px;
    }

    .discussions-list {
        gap: 12px;
    }

    .discussion-item {
        padding: 14px;
    }
}

@media (max-width: 375px) {
    .overview-container {
        padding: 0 10px;
        margin: 12px auto;
    }

    .overview-section {
        padding: 14px;
        margin-bottom: 14px;
    }

    .overview-container h1 {
        font-size: 20px;
        margin-bottom: 14px;
    }

    .activity-content,
    .discussion-content {
        font-size: 13px;
    }

    .friends-dropdown .dropdown-content {
        width: 230px !important;
        right: -5px !important;
    }
}

/* KANBAN BOARD */
.kanban-container {
    background: var(--bg-white);
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    margin: 24px auto;
    max-width: 1200px;
    padding: 32px;
    width: 95%;
}

.kanban-container h2 {
    font-size: 24px;
    margin-bottom: 32px;
    text-align: center;
}

.kanban-container form {
    background: var(--bg-light);
    border-radius: 8px;
    margin-bottom: 32px;
    padding: 24px;
}

.kanban-board {
    display: grid;
    gap: 24px;
    grid-template-columns: repeat(3, 1fr);
    margin-top: 32px;
}

.kanban-column {
    background: var(--bg-light);
    border-radius: 12px;
    padding: 20px;
}

.kanban-column h3 {
    border-bottom: 2px solid var(--border);
    color: var(--text-primary);
    font-size: 16px;
    margin-bottom: 16px;
    padding-bottom: 12px;
}

.kanban-tasks {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 200px;
    position: relative;
}

.kanban-task {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: move;
    padding: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 1;
}

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

.kanban-task h4 {
    font-size: 14px;
    margin-bottom: 8px;
}

.kanban-task p {
    color: var(--text-secondary);
    font-size: 12px;
}

.kanban-empty {
    border: 2px dashed var(--border);
    border-radius: 8px;
    color: var(--text-secondary);
    padding: 16px;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.task-menu {
    position: absolute;
    right: 10px;
    top: 10px;
    visibility: hidden;
}

.kanban-task:hover .task-menu {
    visibility: visible;
}

.kanban-task.menu-active {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.kanban-task.menu-active .task-menu {
    visibility: visible;
}

.menu-dots {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 20px;
    color: var(--text-secondary);
    padding: 4px;
}

.menu-content {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid var(--border);
    border-radius: 4px;
    box-shadow: var(--shadow-md);
    min-width: 120px;
    transform: translateY(-10px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    z-index: 1010;
    margin-top: 5px;
}

.kanban-task.menu-active {
    position: relative;
    z-index: 49;
}

.menu-content.show {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
}

.menu-content a {
    display: block;
    padding: 8px 12px;
    text-decoration: none;
    color: var(--text-primary);
    font-size: 14px;
}

.menu-content a:hover {
    background: var(--bg-light);
}

.menu-content a.delete-task {
    color: #dc2626;
}

.kanban-task::before {
    content: '';
    border-radius: 4px;
    height: 4px;
    left: 0;
    position: absolute;
    top: 0;
    width: 100%;
}

.kanban-task.todo::before {
    background: #f59e0b;
}

.kanban-task.in-progress::before {
    background: #3b82f6;
}

.kanban-task.done::before {
    background: #10b981;
}

.gu-mirror {
    background: var(--bg-white);
    border-radius: 8px;
    box-shadow: var(--shadow-md);
    opacity: 0.9;
    position: fixed !important;
    z-index: 9999 !important;
    transform: scale(1.02);
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    animation: dragFloat 0.8s ease-in-out infinite alternate;
}

.gu-transit {
    opacity: 0.2;
    transform: scale(0.98);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes dragFloat {
    0% {
        transform: scale(1.02) translateY(0);
    }

    100% {
        transform: scale(1.02) translateY(-4px);
    }
}

/* POSTRANNÍ PANELY (SIDEBARS) */
.task-edit-sidebar {
    position: fixed;
    top: 0;
    right: -100%;
    width: 400px;
    height: 100vh;
    background: var(--bg-white);
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    z-index: 1100;
    overflow-y: auto;
    visibility: hidden;
    opacity: 0;
    transform: translateX(100%);
}

.task-edit-sidebar.open {
    right: 0;
    visibility: visible;
    opacity: 1;
    transform: translateX(0);
}

.task-edit-header {
    background: var(--primary);
    color: white;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 2;
}

.task-edit-header h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 500;
}

.task-edit-close {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 24px;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.task-edit-close:hover {
    background: rgba(255, 255, 255, 0.1);
}

.task-edit-content {
    padding: 24px;
}

.task-edit-content input,
.task-edit-content select {
    margin-bottom: 16px;
}

.task-edit-content label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-secondary);
    font-size: 14px;
}

.task-edit-buttons {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.task-edit-save {
    flex: 1;
    background: var(--primary);
    color: white;
    border: none;
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
}

.task-edit-save:hover {
    background: var(--primary-hover);
}

.task-edit-cancel {
    flex: 1;
    background: var(--bg-light);
    border: 1px solid var(--border);
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
}

.task-edit-cancel:hover {
    background: #e5e7eb;
}

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 1099;
    opacity: 0;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    visibility: hidden;
}

.sidebar-overlay.open {
    visibility: visible;
    opacity: 1;
}

.comments-sidebar {
    position: fixed;
    top: 0;
    right: -100%;
    width: 400px;
    height: 100vh;
    background: var(--bg-white);
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    z-index: 1100;
    overflow-y: auto;
    visibility: hidden;
    opacity: 0;
    transform: translateX(100%);
}

.comments-sidebar.open {
    right: 0;
    visibility: visible;
    opacity: 1;
    transform: translateX(0);
}

.comments-header {
    background: var(--primary);
    color: white;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 2;
}

.comments-header h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 500;
}

.comments-close {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 24px;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.comments-close:hover {
    background: rgba(255, 255, 255, 0.1);
}

.comments-content {
    padding: 24px;
}

.comments-list {
    margin-bottom: 20px;
    max-height: calc(100vh - 250px);
    overflow-y: auto;
}

.comment-form textarea {
    width: 100%;
    min-height: 80px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-bottom: 12px;
    resize: vertical;
}

.comment-buttons {
    display: flex;
    gap: 12px;
}

.comment-submit {
    flex: 1;
    background: var(--primary);
    color: white;
    border: none;
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
}

.comment-cancel {
    flex: 1;
    background: var(--bg-light);
    border: 1px solid var(--border);
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
}

.comment-submit:hover {
    background: var(--primary-hover);
}

.comment-cancel:hover {
    background: #e5e7eb;
}

.comment-item {
    background: var(--bg-light);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 12px;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.comment-author {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 14px;
}

.comment-date {
    color: var(--text-secondary);
    font-size: 13px;
}

.comment-text {
    color: var(--text-primary);
    font-size: 14px;
    line-height: 1.5;
    margin-top: 4px;
}

.comments-list .comment-item {
    border: 1px solid var(--border);
    background: var(--bg-white);
}

.comments-list .comment-author {
    font-weight: 600;
    margin-bottom: 2px;
}

.comments-list .comment-date {
    font-size: 12px;
    color: #6b7280;
}

.comments-list .comment-text {
    color: var(--text-primary);
    font-size: 14px;
    margin-top: 8px;
}

.time-records-sidebar {
    position: fixed;
    top: 0;
    right: -100%;
    width: 400px;
    height: 100vh;
    background: var(--bg-white);
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    z-index: 1200;
    overflow-y: auto;
    visibility: hidden;
    opacity: 0;
    transform: translateX(100%);
}

.time-records-sidebar.open {
    right: 0;
    visibility: visible;
    opacity: 1;
    transform: translateX(0);
}

.time-records-header {
    background: var(--primary);
    color: white;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 2;
}

.time-records-header h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 500;
}

.time-records-close {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.time-records-close:hover {
    background: rgba(255, 255, 255, 0.1);
}

.time-records-content {
    padding: 20px;
}

.time-record-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.time-record-total {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid var(--border);
}

.total-time {
    display: flex;
    justify-content: space-between;
    font-weight: 600;
}

.time-records-sidebar:not(.open),
.comments-sidebar:not(.open),
.task-edit-sidebar:not(.open) {
    visibility: hidden;
    opacity: 0;
    transform: translateX(100%);
    pointer-events: none;
}

/* MODÁLNÍ OKNA */
.modal {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 400px;
    max-width: 90%;
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    overflow: hidden;
    padding: 0;
    margin: 0;
}

.modal-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 56px;
    margin: 0;
    padding: 0 16px;
    background-color: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
    z-index: 2;
}

.modal-header h2 {
    margin: 0;
    padding: 0;
    color: white;
    font-size: 18px;
    font-weight: 500;
    padding-right: 20px;
}

.close-btn,
#closeTaskModal,
#closeProjectModal {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    background-color: transparent;
    border: none;
    color: white;
    font-size: 22px;
    line-height: 1;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    z-index: 3;
}

.modal-body {
    margin-top: 56px;
    padding: 20px;
    background-color: #ffffff;
    max-height: calc(90vh - 56px);
    overflow-y: auto;
}

#deactivateAccountModal .modal-body,
#deleteAccountModal .modal-body {
    margin-top: 56px !important;
    padding: 20px !important;
}

.modal form {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background-color: transparent;
    box-shadow: none;
    padding: 0;
    margin: 0;
}

.modal input,
.modal textarea,
.modal select {
    background-color: #ffffff;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 6px;
    width: 100%;
    box-sizing: border-box;
}

.modal button {
    width: 100%;
    padding: 12px;
    background-color: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
    margin: 0;
}

.modal button:hover {
    background-color: var(--primary-hover);
}

.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 999;
}

#taskModal,
#projectModal {
    display: none;
}

.modal-body p {
    margin: 0;
    padding: 0;
}

.alert-ok {
    background-color: #0066ff;
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 4px;
    cursor: pointer;
    float: right;
    margin-top: 15px;
}

@media (max-width: 576px) {
    .modal-header {
        height: 50px;
        padding: 0 14px;
    }

    .modal-body {
        margin-top: 50px;
        padding: 16px;
    }

    .modal-header h2 {
        font-size: 16px;
    }
}

@media (max-width: 375px) {
    .modal-header {
        height: 46px;
        padding: 0 12px;
    }

    .modal-body {
        margin-top: 46px;
        padding: 14px;
    }

    .modal-header h2 {
        font-size: 15px;
    }

    .auth-container {
        width: 95%;
    }

    .auth-header {
        padding: 18px 15px 5px;
    }

    .auth-header h2 {
        font-size: 20px;
    }

    .auth-header-line {
        width: 40px;
    }

    .auth-form {
        padding: 15px 15px 20px;
    }

    .auth-input-group {
        margin-bottom: 14px;
    }

    .auth-input-group input {
        font-size: 14px;
        padding: 11px 12px;
        border-radius: 6px;
    }

    .auth-button {
        font-size: 14px;
        padding: 11px;
        border-radius: 6px;
    }

    .error-message,
    .success-message {
        font-size: 13px;
        padding: 10px 12px;
        margin-bottom: 15px;
    }
}

@supports (-webkit-touch-callout: none) {
    .modal-overlay {
        -webkit-backdrop-filter: blur(4px);
    }
}

/* NASTAVENÍ ÚČTU */

   .settings-container {
    max-width: 700px !important;
    width: 90%;
    margin: 30px auto;
    padding: 20px;
    background: var(--bg-white);
    border-radius: 12px;
    box-shadow: var(--shadow-md);
}

.settings-container h1,
.settings-title {
    margin-bottom: 25px;
    font-size: 32px;
    font-weight: 700;
}

.settings-tabs {
    display: flex;
    border-bottom: 1px solid var(--border);
    margin-bottom: 24px;
    margin-top: 10px;
    overflow-x: auto;
    height: 40px;
    align-items: flex-end;
}

.settings-tab {
    position: relative;
    padding: 0 15px 10px;
    color: var(--text-secondary);
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
    cursor: pointer;
    white-space: nowrap;
    display: flex;
    align-items: flex-end;
    height: 100%;
}

.settings-tab:hover {
    color: var(--primary);
}

.settings-tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

@media (max-width: 768px) {
    .settings-tab {
        padding: 0 10px 10px;
        font-size: 14px;
    }
}

.settings-section {
    display: none;
    animation: fadeIn 0.3s ease;
}

.settings-section.active {
    display: block;
}

.project-role-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: var(--bg-light);
    border-radius: 8px;
    margin-bottom: 12px;
}

.project-info h4 {
    margin: 0 0 4px;
    font-size: 16px;
}

.project-info p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 14px;
}

.transfer-role-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s ease;
}

.transfer-role-btn:hover {
    background: var(--primary-hover);
}

.team-members {
    margin-top: 16px;
}

.danger-zone {
    margin-top: 40px;
    padding: 20px;
    background: #fee2e2;
    border-radius: 8px;
    border: 1px solid #fecaca;
}

.danger-zone h3 {
    color: #b91c1c;
    margin-top: 0;
    margin-bottom: 16px;
}

.action-btn,
.warning-btn,
.danger-btn {
    display: block;
    width: 100%;
    padding: 10px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    margin-bottom: 12px;
    transition: all 0.2s ease;
}

.action-btn {
    background: var(--primary);
    color: white;
}

.action-btn:hover {
    background: var(--primary-hover);
}

.warning-btn {
    background: #fbbf24;
    color: white;
}

.warning-btn:hover {
    background: #f59e0b;
}

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

.danger-btn:hover {
    background: #dc2626;
}

.save-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    margin-top: 10px;
}

.save-btn:hover {
    background: var(--primary-hover);
}

/* ZÁLOŽKY (TABS) */
.page-navigation {
    background-color: #f8f9fa;
    border-bottom: 1px solid #e5e7eb;
    padding: 0 20px;
    margin-bottom: 0;
    display: flex;
    justify-content: center;
}

.page-navigation::after {
    display: none;
}

.page-tab {
    display: inline-block;
    padding: 15px 20px;
    color: #6b7280;
    text-decoration: none;
    border-bottom: 2px solid transparent;
    margin-right: 10px;
}

.page-tab:hover {
    color: var(--primary);
}

.page-tab.active {
    color: #0066ff;
    border-bottom-color: #0066ff;
}

.page-content {
    display: none;
    padding: 20px;
}

.page-content.active {
    display: block;
}

.friends-tabs {
    display: flex;
    border-bottom: 1px solid var(--border);
}

.tab-btn {
    flex: 1;
    padding: 12px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-secondary);
    transition: all 0.2s ease;
}

.tab-btn.active {
    color: var(--primary);
    border-bottom: 2px solid var(--primary);
}

/* UŽIVATELSKÉ SEKCE */
.users-container {
    width: 100%;
    max-width: 1200px;
    margin: 15px auto;
    padding: 15px 20px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: relative;
}

.users-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    width: 100%;
    position: relative;
}

.add-users-btn {
    width: 40px;
    height: 40px;
    background: #5ad16e;
    color: white;
    border: none;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
    position: relative;
    z-index: 1;
}

.add-users-dropdown {
    position: relative;
}

.users-dropdown-content {
    position: absolute;
    top: 45px;
    right: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    z-index: 1001;
    padding: 0;
    width: 240px;
    max-width: 240px;
    overflow: hidden;
    transform-origin: top right;
}

.user-dropdown-item {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
}

.user-dropdown-item:last-child {
    border-bottom: none;
}

.user-dropdown-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
    overflow: hidden;
    width: 100%;
    margin-bottom: 6px;
}

.user-dropdown-name {
    font-weight: 500;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}

.user-dropdown-email {
    color: #666;
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}

.add-to-project-btn,
button.pridat {
    background: #4d7bf3;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 5px 10px;
    font-size: 13px;
    cursor: pointer;
    white-space: nowrap;
    min-width: auto;
    align-self: flex-start;
}

.user-dropdown-item.no-users {
    color: #888;
    font-style: italic;
    text-align: center;
    padding: 15px;
    width: 100%;
    font-size: 14px;
    white-space: normal;
}

.user-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: #f5f7fa;
    border-radius: 10px;
    margin-bottom: 10px;
    position: relative;
    width: 100%;
}

.user-item:first-child {
    background: #f0f7ff;
}

.user-name {
    font-weight: 600;
    color: #333;
    font-size: 16px;
}

.user-email {
    display: block;
    color: #666;
    font-size: 14px;
    margin-top: 2px;
}

.user-role {
    color: #6b7280;
    font-weight: 500;
    padding-right: 40px;
}

.user-item:first-child .user-role {
    color: #4d7bf3;
}

.remove-member-btn {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #ef4444;
    font-size: 20px;
    cursor: pointer;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 10px;
}

@media (max-width: 768px) {
    .users-container {
        padding: 12px 15px;
        margin: 12px auto;
        width: 95%;
    }

    .add-users-btn {
        width: 36px;
        height: 36px;
        font-size: 18px;
    }

    .users-dropdown-content {
        width: 210px;
        max-width: 210px;
        top: 42px;
    }

    .user-dropdown-item {
        padding: 10px 12px;
    }

    .user-dropdown-email {
        font-size: 12px;
    }

    .add-to-project-btn,
    button.pridat {
        padding: 4px 8px;
        font-size: 12px;
    }

    .user-dropdown-item.no-users {
        font-size: 13px;
        padding: 12px 10px;
    }

    .user-role {
        padding-right: 35px;
    }
}

@media (max-width: 576px) {
    .users-container {
        padding: 10px 12px;
        margin: 10px auto;
        width: 98%;
    }

    .add-users-btn {
        width: 32px;
        height: 32px;
        font-size: 16px;
    }

    .users-dropdown-content {
        width: 180px;
        max-width: 180px;
        top: 38px;
        right: 0;
    }

    .user-dropdown-item {
        padding: 8px 10px;
    }

    .user-dropdown-name {
        font-size: 13px;
    }

    .user-dropdown-email {
        font-size: 11px;
    }

    .add-to-project-btn,
    button.pridat {
        padding: 3px 6px;
        font-size: 11px;
    }

    .user-dropdown-item.no-users {
        font-size: 12px;
        padding: 10px 8px;
        word-wrap: break-word;
    }

    .user-item {
        flex-direction: column;
        align-items: flex-start;
        padding: 10px 12px;
    }

    .user-info {
        width: 100%;
        padding-right: 25px;
    }

    .user-role {
        margin-top: 5px;
        padding-right: 30px;
    }

    .remove-member-btn {
        top: 12px;
        right: 10px;
        transform: none;
    }
}

@media (max-width: 360px) {
    .users-dropdown-content {
        width: 140px;
        max-width: 140px;
        right: 0;
    }

    .add-to-project-btn,
    button.pridat {
        min-width: 40px;
        font-size: 10px;
        padding: 2px 5px;
    }

    .user-dropdown-name,
    .user-dropdown-email {
        max-width: 120px;
    }

    .user-dropdown-item.no-users {
        font-size: 11px;
        padding: 8px 5px;
        word-break: break-word;
    }

    .user-dropdown-item,
    .search-result-item,
    .friend-item {
        flex-direction: column;
    }

    .add-to-project-btn,
    .add-friend-btn,
    .remove-friend-btn,
    button.pridat {
        width: 100%;
        text-align: center;
        justify-content: center;
    }

    .user-dropdown-name,
    .user-dropdown-email {
        max-width: 100%;
    }

    .user-dropdown-email {
        word-break: break-word;
        overflow-wrap: break-word;
    }

    .search-result-item,
    .friend-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .add-friend-btn,
    .remove-friend-btn,
    button.pridat,
    button.odebrat {
        width: 100%;
        min-width: 0;
        margin-top: 8px;
    }

    .user-dropdown-info,
    .friend-info {
        max-width: 100%;
    }
}

.users-dropdown-content.show {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.friends-dropdown {
    position: relative;
}

.friend-requests-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ef4444;
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.friends-dropdown .dropdown-content {
    position: absolute;
    right: -15px;
    top: 40px;
    width: 300px;
    background: var(--bg-white);
    border-radius: 8px;
    box-shadow: var(--shadow-md);
    visibility: hidden;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    z-index: 1000;
}

.friends-dropdown .dropdown-content.show {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
}

.friends-search {
    padding: 12px;
}

.friends-search input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.2s ease;
}

.friends-search input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 102, 255, 0.1);
}

.search-results {
    max-height: 300px;
    overflow-y: auto;
}

.search-result-item {
    padding: 12px;
    border-bottom: 1px solid var(--border);
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background: var(--bg-light);
}

.add-friend-btn {
    padding: 6px 12px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.add-friend-btn:hover {
    background: var(--primary-hover);
}

.add-friend-btn:disabled {
    background: var(--text-secondary);
    cursor: not-allowed;
}

.friend-requests {
    padding: 12px;
}

.request-item {
    padding: 12px;
    border-bottom: 1px solid var(--border);
}

.request-actions {
    margin-top: 8px;
    display: flex;
    gap: 8px;
}

.accept-btn,
.reject-btn {
    padding: 6px 12px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    font-size: 13px;
}

.accept-btn {
    background: var(--primary);
    color: white;
}

.reject-btn {
    background: #ef4444;
    color: white;
}

.friends-list {
    max-height: 300px;
    overflow-y: auto;
    padding: 12px;
}

.friend-item {
    padding: 12px;
    border-bottom: 1px solid var(--border);
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.user-dropdown-info,
.friend-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex: 1;
    min-width: 0;
    max-width: calc(100% - 70px);
}

.user-dropdown-name,
.user-dropdown-email {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.add-friend-btn,
.remove-friend-btn,
button.pridat,
button.odebrat {
    padding: 6px 10px;
    white-space: nowrap;
    flex-shrink: 0;
    align-self: center;
    min-width: 60px;
    text-align: center;
    border-radius: 4px;
    font-size: 13px;
}

.friend-item:last-child {
    border-bottom: none;
}

.remove-friend-btn {
    padding: 6px 12px;
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.remove-friend-btn:hover {
    background: #dc2626;
}

.no-friends {
    text-align: center;
    color: var(--text-secondary);
    padding: 12px;
}

.remove-member-btn {
    background: none;
    border: none;
    color: #ef4444;
    font-size: 20px;
    line-height: 1;
    padding: 5px 8px;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
}

.remove-member-btn:hover {
    background-color: #fee2e2;
}

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

.add-users-btn {
    background: #22c55e;
    border: none;
    border-radius: 6px;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    transition: all 0.2s ease;
}

.add-users-btn span {
    font-size: 20px;
    line-height: 1;
}

.add-users-btn:hover {
    background: #16a34a;
    transform: translateY(-1px);
}

.add-users-dropdown {
    position: relative;
}

.users-dropdown-content {
    position: absolute;
    right: 0;
    top: 100%;
    margin-top: 8px;
    background: white;
    border-radius: 8px;
    box-shadow: var(--shadow-md);
    width: 300px;
    max-height: 400px;
    overflow-y: auto;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    visibility: hidden;
    z-index: 1000;
}

.users-dropdown-content.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-dropdown-item {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.user-dropdown-item:last-child {
    border-bottom: none;
}

.user-dropdown-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.user-dropdown-name {
    font-weight: 500;
    color: var(--text-primary);
}

.user-dropdown-email {
    color: var(--text-secondary);
    font-size: 12px;
}

.add-to-project-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s ease;
}

.add-to-project-btn:hover {
    background: var(--primary-hover);
}

.no-users {
    color: var(--text-secondary);
    text-align: center;
    padding: 16px;
}

/* MĚŘENÍ ČASU */
.time-tracking {
    display: flex;
    align-items: center;
    gap: 8px;
}

.time-tracking-active {
    display: flex;
    align-items: center;
    gap: 12px;
    background-color: #dc2626;
    padding: 6px 12px;
    border-radius: 8px;
    height: 32px;
    box-sizing: border-box;
}

.time-tracking-timer {
    font-family: monospace;
    font-size: 18px;
    font-weight: 500;
    color: white;
    line-height: 1;
}

.time-tracking-stop {
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.time-tracking-stop-icon {
    width: 14px;
    height: 14px;
    background-color: white;
    border-radius: 2px;
}

.time-tracking img {
    width: 18px;
    height: 18px;
    filter: brightness(0) invert(1);
    vertical-align: middle;
}

.time-tracking-content {
    position: absolute !important;
    top: calc(100% + 8px);
    left: 50% !important;
    width: 300px;
    background: white;
    border-radius: 8px;
    box-shadow: var(--shadow-md);
    opacity: 0;
    transform: translateX(-50%) translateY(-15px) !important;
    visibility: hidden;
    transition: all 0.2s ease;
    z-index: 1000;
}

.time-tracking-content.show {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateX(-50%) translateY(0) !important;
}

.time-tracking-header {
    padding: 16px;
    border-bottom: 1px solid var(--border);
}

.time-tracking-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 500;
    color: var(--text-primary);
}

.time-tracking-body {
    padding: 16px;
}

.time-tracking-select {
    width: 100%;
    margin-bottom: 12px;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background-color: white;
}

.time-tracking-buttons {
    display: flex;
    gap: 8px;
    margin-top: 16px;
}

.time-tracking-start {
    flex: 1;
    background: #22c55e;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
}

.time-tracking-start:disabled {
    background: #d1d5db;
}

.time-tracking-cancel {
    flex: 1;
    background: var(--bg-light);
    border: 1px solid var(--border);
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
}

.time-tracking-dropdown {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.time-tracking-stop svg {
    width: 18px;
    height: 18px;
    stroke: white;
}

.time-tracking-stop:hover {
    opacity: 0.8;
}

/* KALENDÁŘ */
.calendar-container {
    margin: 20px auto;
    max-width: 1400px;
    width: 90%;
    padding: 20px;
    background: var(--bg-white);
    border-radius: 12px;
    box-shadow: var(--shadow-md);
}

.calendar-container h1 {
    color: var(--text-primary);
    font-size: 24px;
    margin-bottom: 16px;
}

.fc {
    width: 100%;
    height: 70vh;
}

.fc .fc-toolbar.fc-header-toolbar {
    background: var(--primary);
    margin: 0 0 12px 0;
    padding: 10px 16px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.fc .fc-toolbar-title {
    color: white;
    font-size: 18px;
    font-weight: 500;
    text-transform: lowercase;
}

.fc .fc-button {
    background: transparent !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    color: white !important;
    padding: 4px 12px;
    font-size: 14px;
    border-radius: 4px;
    margin: 0 2px;
}

.fc .fc-button:hover {
    background: rgba(255, 255, 255, 0.1) !important;
}

.fc .fc-button-active {
    background: white !important;
    color: var(--primary) !important;
}

.fc .fc-col-header-cell {
    padding: 4px;
    background: var(--bg-white);
}

.fc .fc-col-header-cell-cushion {
    text-transform: lowercase;
    color: var(--text-primary);
    font-weight: normal;
    padding: 4px;
    text-decoration: none;
}

.fc .fc-scrollgrid {
    border: 1px solid var(--border) !important;
}

.fc td,
.fc th {
    border: 1px solid var(--border) !important;
}

.fc .fc-daygrid-day {
    height: auto;
    min-height: 70px;
}

.fc .fc-daygrid-day-number {
    padding: 4px;
    color: var(--text-primary);
    text-decoration: none;
}

.fc-event {
    border: none;
    padding: 4px 8px;
    font-size: 13px;
    border-radius: 4px;
    margin: 2px 4px;
    cursor: pointer;
}

.fc-event.to_do {
    background: #f59e0b;
}

.fc-event.in_progress {
    background: var(--primary);
}

.fc-event.done {
    background: #10b981;
}

.fc .fc-day-today {
    background: var(--bg-light) !important;
}

.fc-event:hover {
    filter: brightness(0.95);
}

.fc-view-harness {
    background: white;
}

.fc-scrollgrid-section-header>td {
    border-bottom: 1px solid var(--border) !important;
}

/* ANIMACE A POMOCNÉ TŘÍDY */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

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

@keyframes spin {
    to {
        transform: translateY(-50%) rotate(360deg);
    }
}

button.loading {
    cursor: wait;
    opacity: 0.7;
    pointer-events: none;
    position: relative;
}

button.loading::after {
    animation: spin 1s linear infinite;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    content: '';
    height: 16px;
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
}

/* MEDIA QUERIES (RESPONSIVE DESIGN) */

@media (min-width: 2000px) {

    .overview-container,
    .kanban-container,
    .settings-container,
    .users-container,
    .calendar-container {
        max-width: 1800px;
    }

    .auth-container {
        max-width: 500px;
    }

    body {
        font-size: 18px;
    }

    .kanban-task h4 {
        font-size: 16px;
    }

    .kanban-task p {
        font-size: 14px;
    }

    input,
    textarea,
    select,
    button {
        font-size: 16px;
        padding: 14px 18px;
    }

    .task-edit-sidebar,
    .comments-sidebar,
    .time-records-sidebar {
        width: 500px;
    }

    .calendar-container {
        padding: 30px;
    }

    .fc .fc-daygrid-day {
        min-height: 100px;
    }

    .fc-event {
        padding: 6px 10px;
        font-size: 15px;
    }

    .nav-center {
        font-size: 18px;
    }

    .nav-link {
        font-size: 16px;
    }
}

@media (max-width: 1920px) {

    .overview-container,
    .kanban-container,
    .settings-container,
    .users-container,
    .calendar-container {
        max-width: 1600px;
    }

    .fc {
        height: 75vh;
    }

    .nav-center {
        font-size: 17px;
    }
}

@media (max-width: 1536px) {

    .overview-container,
    .kanban-container,
    .settings-container,
    .users-container,
    .calendar-container {
        max-width: 1300px;
    }

    .kanban-board {
        gap: 16px;
    }

    .nav-center {
        font-size: 16px;
    }

    .fc {
        height: 72vh;
    }
}

@media (max-width: 1280px) {

    .overview-container,
    .kanban-container,
    .settings-container,
    .users-container,
    .calendar-container {
        max-width: 1100px;
        padding: 16px;
    }

    .task-edit-sidebar,
    .comments-sidebar,
    .time-records-sidebar {
        width: 350px;
    }

    .kanban-column {
        padding: 16px;
    }

    .activity-time {
        min-width: 100px;
    }

    .navbar {
        padding: 6px 10px;
    }

    .nav-left,
    .nav-right {
        gap: 15px;
    }

    .dropdown-content a {
        padding: 10px 14px;
    }

    .calendar-container h1 {
        font-size: 22px;
    }

    .fc .fc-daygrid-day {
        min-height: 60px;
    }
}

@media (max-width: 1024px) {

    .overview-container,
    .kanban-container,
    .settings-container,
    .users-container,
    .calendar-container {
        max-width: 90%;
        padding: 16px;
    }

    .kanban-board {
        grid-template-columns: repeat(2, 1fr);
    }

    .kanban-column:nth-child(3) {
        grid-column: 1 / -1;
    }

    .task-edit-sidebar,
    .comments-sidebar,
    .time-records-sidebar {
        width: 320px;
    }

    .auth-container {
        width: 80%;
    }

    .modal {
        width: 90%;
        max-width: 400px;
    }

    .nav-center {
        font-size: 16px;
    }

    .nav-icon {
        height: 22px;
        width: 22px;
    }

    .time-tracking span {
        display: none;
    }

    .fc .fc-toolbar.fc-header-toolbar {
        flex-direction: column;
        gap: 10px;
        padding: 10px;
    }

    .fc .fc-toolbar-chunk {
        display: flex;
        justify-content: center;
        width: 100%;
    }

    .fc .fc-toolbar-title {
        font-size: 16px;
    }

    .fc {
        height: 68vh;
    }

    .add-dropdown .dropdown-content {
        left: 0;
    }

    .projects-dropdown .dropdown-content {
        width: auto;
        min-width: 160px;
        max-width: 200px;
    }

    .dropdown-content a {
        padding: 12px 16px;
        font-size: 15px;
    }
}

@media (max-width: 768px) {
    :root {
        --navbar-height: 50px;
    }

    .navbar {
        height: var(--navbar-height);
        padding: 4px 8px;
    }

    .nav-left,
    .nav-right {
        gap: 12px;
    }

    .nav-icon {
        width: 20px;
        height: 20px;
    }

    .nav-link {
        font-size: 14px;
        padding: 4px;
    }

    .kanban-board {
        grid-template-columns: 1fr;
    }

    .kanban-column {
        margin-bottom: 16px;
    }

    .auth-container,
    .modal {
        width: 90%;
        margin: 24px auto;
        padding: 20px;
    }

    .task-edit-sidebar,
    .comments-sidebar,
    .time-records-sidebar {
        width: 100%;
        right: -100%;
    }

    .task-edit-sidebar.open,
    .comments-sidebar.open,
    .time-records-sidebar.open {
        right: 0;
    }

    .settings-tabs {
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
    }

    .settings-tab {
        white-space: nowrap;
        padding: 10px 15px;
    }

    input,
    textarea,
    select {
        font-size: 16px;
    }

    .nav-center span {
        display: none;
    }

    .calendar-container {
        width: 95%;
        padding: 12px;
    }

    .fc .fc-toolbar-title {
        font-size: 16px;
    }

    .fc .fc-toolbar.fc-header-toolbar {
        margin-bottom: 8px;
    }

    .fc {
        height: 65vh;
    }

    .fc .fc-daygrid-day {
        min-height: 60px;
    }

    .time-records-sidebar:not(.open),
    .comments-sidebar:not(.open),
    .task-edit-sidebar:not(.open) {
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transform: translateX(100%);
        transition: transform 0.3s ease, opacity 0.3s ease, visibility 0.3s;
    }

    .time-records-sidebar.open,
    .comments-sidebar.open,
    .task-edit-sidebar.open {
        transform: translateX(0);
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    .time-tracking span {
        display: none;
    }

    .dropdown-content {
        font-size: 14px;
    }

    .dropdown-content a {
        padding: 10px 12px;
        font-size: 14px;
    }

    .kanban-task h4 {
        font-size: 13px;
    }

    .kanban-task p {
        font-size: 11px;
    }

    .friends-dropdown .dropdown-content {
        width: 250px;
        right: -10px;
    }
}

@media (max-width: 576px) {

    :root {
        --navbar-height: 45px;
    }

    .navbar {
        height: var(--navbar-height);
        padding: 4px 6px;
    }

    .nav-center {
        font-size: 14px;
    }

    .nav-left,
    .nav-right {
        gap: 10px;
    }

    .nav-icon {
        height: 18px;
        width: 18px;
    }

    .nav-link {
        font-size: 13px;
        padding: 3px;
    }

    .auth-container h2,
    .kanban-container h2 {
        font-size: 20px;
    }

    .kanban-container,
    .overview-container,
    .settings-container,
    .users-container,
    .calendar-container {
        padding: 12px;
        margin: 12px auto;
        width: 95%;
    }

    .kanban-column {
        padding: 12px;
    }

    .modal {
        width: 95%;
    }

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

    .modal-body {
        padding: 16px;
    }

    .activity-item {
        flex-direction: column;
        gap: 4px;
    }

    .activity-time {
        min-width: auto;
    }

    .discussion-header {
        flex-wrap: wrap;
    }

    .discussion-time {
        width: 100%;
        margin-left: 0;
        margin-top: 4px;
    }

    .form-group label {
        font-size: 13px;
    }

    .dropdown-content {
        top: calc(var(--navbar-height) + 1px) !important;
        right: -20px;
        min-width: 180px;
        max-width: 90vw;
    }

    .profile-dropdown .dropdown-content {
        right: -10px;
    }

    .fc .fc-toolbar.fc-header-toolbar {
        padding: 8px;
    }

    .fc .fc-button {
        padding: 3px 6px;
        font-size: 11px;
    }

    .fc-event {
        font-size: 11px;
        padding: 3px 6px;
    }

    .fc {
        height: 60vh;
    }

    .fc .fc-daygrid-day {
        min-height: 50px;
    }

    .fc .fc-col-header-cell-cushion {
        font-size: 12px;
    }

    .time-tracking-content {
        left: auto;
        right: -50px;
        width: 250px;
    }

    .nav-center {
        text-align: center;
        justify-content: center;
    }

    .nav-item.projects-dropdown>a::after {
        display: none;
    }

    .add-dropdown .dropdown-content {
        left: 0;
        min-width: 160px;
    }

    .friends-dropdown .dropdown-content {
        width: 250px !important;
        right: -10px !important;
        max-height: 400px !important;
        overflow-y: auto !important;
    }

    .friends-search {
        padding: 10px !important;
    }

    .search-result-item,
    .friend-item,
    .request-item {
        padding: 10px !important;
        font-size: 13px !important;
    }

    .add-friend-btn,
    .accept-btn,
    .reject-btn {
        padding: 6px 10px !important;
        font-size: 12px !important;
    }

    .dropdown-content {
        font-size: 13px;
    }

    .dropdown-content a {
        padding: 8px 10px;
        font-size: 13px;
    }

    .kanban-task h4 {
        font-size: 12px;
    }

    .kanban-task p {
        font-size: 10px;
    }

    .auth-container {
        width: 92%;
        max-width: 360px;
    }

    .auth-header {
        padding: 20px 20px 5px;
    }

    .auth-header h2 {
        font-size: 22px;
    }

    .auth-form {
        padding: 20px 20px 25px;
    }

    .auth-input-group input {
        font-size: 15px;
        padding: 12px 14px;
    }

    .auth-button {
        font-size: 15px;
        padding: 12px;
    }
}

@media (max-width: 320px) {
    :root {
        --navbar-height: 50px;
    }

    body {
        padding-top: 50px;
    }

    .navbar {
        padding: 6px;
        height: 50px;
    }

    .nav-center {
        font-size: 12px;
    }

    .nav-left,
    .nav-right {
        gap: 8px;
    }

    .nav-icon {
        height: 16px;
        width: 16px;
    }

    .auth-container {
        padding: 16px;
    }

    .auth-container h2 {
        font-size: 18px;
        margin-bottom: 16px;
    }

    .auth-container form {
        padding: 16px;
    }

    .kanban-container,
    .overview-container,
    .settings-container,
    .users-container,
    .calendar-container {
        padding: 10px;
        margin: 10px auto;
    }

    .kanban-column {
        padding: 10px;
    }

    .kanban-column h3 {
        font-size: 14px;
    }

    .kanban-task {
        padding: 12px;
    }

    .kanban-task h4 {
        font-size: 13px;
    }

    .modal {
        width: 98%;
    }

    .modal-header h2 {
        flex: 1;
        text-align: center;
        margin: 0;
        padding: 0 40px; /* Padding aby se text nevěšel do křížku */
    }

    .modal-header .close-btn {
        position: absolute;
        right: 20px;
        top: 50%;
        transform: translateY(-50%);
        flex-shrink: 0;
    }

    .form-group {
        margin-bottom: 12px;
    }

    input,
    textarea,
    select {
        padding: 10px 12px;
    }

    .dropdown-content {
        right: -10px;
        min-width: 160px;
        max-width: 90vw;
    }

    .calendar-container h1 {
        font-size: 18px;
        margin-bottom: 10px;
    }

    .fc {
        height: 60vh;
    }

    .fc .fc-toolbar-title {
        font-size: 14px;
    }

    .fc .fc-daygrid-day-number,
    .fc .fc-col-header-cell-cushion {
        font-size: 11px;
    }

    .time-tracking-content {
        left: auto;
        right: -70px;
        width: 220px;
    }

    .settings-tab {
        padding: 8px 10px;
        font-size: 12px;
    }

    .project-role-card {
        padding: 12px;
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .user-item {
        padding: 16px 10px;
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .remove-member-btn {
        top: 16px;
        right: 10px;
        transform: none;
    }

    .navbar>.nav-center {
        justify-content: flex-start;
        overflow: hidden;
        white-space: nowrap;
        text-overflow: ellipsis;
    }

    .comments-header h2,
    .time-records-header h2,
    .task-edit-header h2 {
        font-size: 16px;
    }

    .comments-content,
    .time-records-content,
    .task-edit-content {
        padding: 16px 12px;
    }

    .dropdown-content a {
        padding: 12px 14px;
        font-size: 14px;
    }

    .add-dropdown .dropdown-content {
        left: -5px;
    }
}

@media (max-height: 500px) and (orientation: landscape) {
    .navbar {
        height: 40px;
    }

    body {
        padding-top: 40px;
    }

    .auth-container {
        margin: 10px auto;
    }

    .task-edit-sidebar,
    .comments-sidebar,
    .time-records-sidebar {
        height: 100%;
        top: 40px;
    }

    .task-edit-content,
    .comments-content,
    .time-records-content {
        padding: 12px;
        max-height: calc(100vh - 70px);
        overflow-y: auto;
    }

    .fc {
        height: 55vh;
    }

    .modal {
        top: 45%;
        max-height: 85vh;
        overflow-y: auto;
    }
}

@media (min-height: 800px) and (max-width: 576px) {
    .fc {
        height: 70vh;
    }

    .auth-container {
        margin: 40px auto;
    }

    body {
        padding-top: 55px;
    }
}

@media (max-height: 400px) {
    .auth-container {
        margin: 5px auto;
    }

    .fc {
        height: 50vh;
    }

    .task-edit-sidebar .task-edit-content,
    .comments-sidebar .comments-content,
    .time-records-sidebar .time-records-content {
        max-height: calc(100vh - 80px);
        overflow-y: auto;
    }

    .navbar {
        height: 36px;
    }

    body {
        padding-top: 36px;
    }
}

@supports (-webkit-touch-callout: none) {

    .nav-link,
    button,
    input,
    select,
    textarea {
        font-size: 16px;
    }

    .dropdown-content,
    .modal,
    .comments-list,
    .search-results,
    .friends-list {
        -webkit-overflow-scrolling: touch;
    }

    .fc-scrollgrid-sync-inner a {
        padding: 8px 6px;
    }

    .navbar {
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
    }

    .add-dropdown .dropdown-content,
    .profile-dropdown .dropdown-content,
    .friends-dropdown .dropdown-content,
    .time-tracking-dropdown .dropdown-content {
        display: none;
    }

    .add-dropdown .dropdown-content.show,
    .profile-dropdown .dropdown-content.show,
    .friends-dropdown .dropdown-content.show,
    .time-tracking-dropdown .dropdown-content.show {
        display: block;
    }
}

@media (min-width: 769px) and (max-width: 1100px) {
    .calendar-container .fc .fc-toolbar.fc-header-toolbar {
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }

    .calendar-container .fc .fc-toolbar-chunk {
        margin: 0 10px;
    }
}

@media (min-width: 1024px) {

    .task-edit-sidebar:not(.open),
    .comments-sidebar:not(.open),
    .time-records-sidebar:not(.open) {
        right: -400px !important;
        visibility: hidden !important;
        opacity: 0 !important;
        pointer-events: none !important;
        transform: translateX(100%) !important;
    }
}

@media (hover: none) and (pointer: coarse) {

    .dropdown-content a {
        padding-top: 14px;
        padding-bottom: 14px;
    }

    .add-to-project-btn,
    .add-friend-btn,
    .remove-friend-btn,
    button.pridat {
        padding-top: 8px;
        padding-bottom: 8px;
        min-height: 36px;
    }
}

/* PRINT STYLES */

@media print {

    .navbar,
    .create-section,
    button {
        display: none;
    }

    .kanban-container {
        box-shadow: none;
        margin: 0;
        padding: 20px;
    }

    .kanban-task {
        break-inside: avoid;
        page-break-inside: avoid;
    }
}

.navbar .dropdown-content,
.time-tracking-content {
    position: fixed !important;
    top: var(--navbar-height) !important;
    margin-top: 0 !important;
    z-index: 9999 !important;
    background: white !important;
    border: 1px solid #e5e7eb !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
    border-radius: 8px !important;
    visibility: hidden !important;
    opacity: 0 !important;
    transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease !important;
}

.navbar .dropdown-content.show,
.time-tracking-content.show {
    visibility: visible !important;
    opacity: 1 !important;
}

.dropdown-content a {
    display: block !important;
    padding: 12px 16px !important;
    color: #111827 !important;
    font-size: 14px !important;
    text-decoration: none !important;
    border-bottom: 1px solid #e5e7eb !important;
    white-space: nowrap !important;
}

.dropdown-content a:last-child {
    border-bottom: none !important;
}

.dropdown-content a:hover {
    background-color: #f8f9fc !important;
}

.projects-dropdown .dropdown-content,
.add-dropdown .dropdown-content,
.profile-dropdown .dropdown-content {
    width: 180px !important;
}

.friends-dropdown .dropdown-content {
    width: 300px !important;
}

.time-tracking-dropdown .dropdown-content {
    width: 320px !important;
}

.projects-dropdown .dropdown-content {
    left: 50% !important;
    transform: translateX(-50%) translateY(-10px) !important;
    border-top-left-radius: 0 !important;
    border-top-right-radius: 0 !important;
}

.projects-dropdown .dropdown-content.show {
    transform: translateX(-50%) translateY(0) !important;
}

.add-dropdown .dropdown-content {
    left: 0 !important;
    right: auto !important;
    transform: translateY(-10px) !important;
    border-top-left-radius: 0 !important;
}

.add-dropdown .dropdown-content.show {
    transform: translateY(0) !important;
}

.profile-dropdown .dropdown-content {
    right: 0 !important;
    left: auto !important;
    transform: translateY(-10px) !important;
    border-top-right-radius: 0 !important;
}

.profile-dropdown .dropdown-content.show {
    transform: translateY(0) !important;
}

.friends-dropdown .dropdown-content {
    right: 0 !important;
    left: auto !important;
    transform: translateY(-10px) !important;
    border-top-right-radius: 0 !important;
}

.friends-dropdown .dropdown-content.show {
    transform: translateY(0) !important;
}

.time-tracking-dropdown .dropdown-content {
    left: 50% !important;
    transform: translateX(-50%) translateY(-10px) !important;
    border-top-left-radius: 0 !important;
    border-top-right-radius: 0 !important;
}

.time-tracking-dropdown .dropdown-content.show {
    transform: translateX(-50%) translateY(0) !important;
}

.time-tracking-header {
    padding: 16px !important;
    border-bottom: 1px solid #e5e7eb !important;
}

.time-tracking-header h3 {
    margin: 0 !important;
    font-size: 16px !important;
    font-weight: 500 !important;
    color: #111827 !important;
}

.time-tracking-body {
    padding: 16px !important;
}

.time-tracking-select {
    width: 100% !important;
    margin-bottom: 12px !important;
    padding: 8px 12px !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 6px !important;
    background-color: white !important;
    font-size: 14px !important;
}

.time-tracking-buttons {
    display: flex !important;
    gap: 8px !important;
    margin-top: 16px !important;
}

.time-tracking-start {
    flex: 1 !important;
    background: #22c55e !important;
    color: white !important;
    border: none !important;
    padding: 8px 16px !important;
    border-radius: 6px !important;
    font-weight: 500 !important;
    cursor: pointer !important;
}

.time-tracking-start:disabled {
    background: #d1d5db !important;
}

.time-tracking-cancel {
    flex: 1 !important;
    background: #f8f9fc !important;
    border: 1px solid #e5e7eb !important;
    padding: 8px 16px !important;
    border-radius: 6px !important;
    cursor: pointer !important;
}

.friends-search {
    padding: 12px !important;
}

.friends-search input {
    width: 100% !important;
    padding: 8px 12px !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 6px !important;
    font-size: 14px !important;
}

.friends-tabs {
    display: flex !important;
    border-bottom: 1px solid #e5e7eb !important;
}

.tab-btn {
    flex: 1 !important;
    padding: 12px !important;
    background: none !important;
    border: none !important;
    cursor: pointer !important;
    font-size: 14px !important;
    color: #6b7280 !important;
}

.tab-btn.active {
    color: #0066ff !important;
    border-bottom: 2px solid #0066ff !important;
}

@media (max-width: 768px) {

    .projects-dropdown .dropdown-content,
    .add-dropdown .dropdown-content,
    .profile-dropdown .dropdown-content {
        width: 160px !important;
    }

    .friends-dropdown .dropdown-content {
        width: 260px !important;
    }

    .time-tracking-dropdown .dropdown-content {
        width: 280px !important;
    }

    .dropdown-content a {
        padding: 10px 14px !important;
    }
}

@media (max-width: 576px) {

    .projects-dropdown .dropdown-content,
    .add-dropdown .dropdown-content,
    .profile-dropdown .dropdown-content {
        width: 145px !important;
    }

    .friends-dropdown .dropdown-content {
        width: 230px !important;
    }

    .time-tracking-dropdown .dropdown-content {
        width: 240px !important;
    }

    .dropdown-content a {
        padding: 8px 12px !important;
        font-size: 13px !important;
    }

}

@media (max-width: 400px) {

    .projects-dropdown .dropdown-content,
    .add-dropdown .dropdown-content,
    .profile-dropdown .dropdown-content {
        width: 130px !important;
    }

    .friends-dropdown .dropdown-content {
        width: 210px !important;
    }

    .time-tracking-dropdown .dropdown-content {
        width: 220px !important;
    }

    .dropdown-content a {
        padding: 8px 10px !important;
        font-size: 12px !important;
    }
}

@media (max-width: 320px) {

    .projects-dropdown .dropdown-content,
    .add-dropdown .dropdown-content,
    .profile-dropdown .dropdown-content {
        width: 120px !important;
    }

    .friends-dropdown .dropdown-content {
        width: 180px !important;
    }

    .time-tracking-dropdown .dropdown-content {
        width: 200px !important;
    }
}

@supports (-webkit-touch-callout: none) {
    .dropdown-content {
        display: none !important;
        transform: none !important;
    }

    .dropdown-content.show {
        display: block !important;
    }
}

.page-navigation {
    background-color: var(--bg-light);
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: center;
    padding: 0;
    margin: 0;
    width: 100%;
}

.page-tab {
    display: inline-block;
    padding: 10px 20px;
    color: var(--text-secondary);
    text-decoration: none;
    border-bottom: 2px solid transparent;
    margin: 0;
    font-size: 14px;
}

.page-tab:hover {
    color: var(--primary);
}

.page-tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

@media (max-width: 768px) {
    .page-navigation {
        margin-top: -10px;
    }

    .page-tab {
        padding: 8px 15px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .page-navigation {
        margin-top: -10px;
    }

    .page-tab {
        padding: 7px 12px;
        font-size: 12px;
    }
}

#transferRoleModal {
    display: none;
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    width: 400px !important;
    height: auto !important;
    max-width: 90% !important;
    max-height: 90vh !important;
    background-color: #ffffff !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15) !important;
    z-index: 1000 !important;
    overflow: hidden !important;
    padding: 0 !important;
    margin: 0 !important;
}

#transferRoleModal .modal-header {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    height: 60px !important;
    padding: 0 16px !important;
    background-color: var(--primary) !important;
    color: white !important;
    border-top-left-radius: 12px !important;
    border-top-right-radius: 12px !important;
}

#transferRoleModal .modal-header h2 {
    margin: 0 !important;
    padding: 0 !important;
    color: white !important;
    font-size: 18px !important;
    font-weight: 500 !important;
    text-align: center !important;
    width: 100% !important;
}

#transferRoleModal .close-btn {
    display: none !important;
}

#transferRoleModal .modal-body {
    position: relative !important;
    margin-top: 0 !important;
    padding: 15px 20px 20px 20px !important;
    /* Kompaktnější padding */
    background-color: #ffffff !important;
    max-height: calc(90vh - 60px) !important;
    overflow-y: auto !important;
}

#transferRoleModal p {
    margin-bottom: 12px !important;
}

#transferRoleModal .warning {
    background-color: #fff8e6 !important;
    border: 1px solid #ffefc6 !important;
    border-radius: 8px !important;
    padding: 12px !important;
    margin: 15px 0 15px 0 !important;
}

#transferRoleModal .warning p {
    color: #976400 !important;
    font-weight: 500 !important;
    margin-top: 0 !important;
    margin-bottom: 8px !important;
}

#transferRoleModal .warning ul {
    margin: 0 !important;
    padding-left: 20px !important;
}

#transferRoleModal .warning li {
    margin-bottom: 4px !important;
    color: #976400 !important;
}

#transferRoleModal form>*:last-child {
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between !important;
    gap: 15px !important;
    margin-top: 15px !important;
    width: 100% !important;
}

#transferRoleModal button[type="button"],
#transferRoleModal button[type="submit"] {
    display: inline-block !important;
    width: calc(50% - 7.5px) !important;
    margin: 0 !important;
    float: left !important;
}

#transferRoleModal button[type="submit"] {
    float: right !important;
}

#transferRoleModal button {
    padding: 12px !important;
    border-radius: 8px !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    text-align: center !important;
}

#transferRoleModal button#cancelTransfer,
#transferRoleModal button[type="button"] {
    background-color: #f3f4f6 !important;
    color: #1f2937 !important;
    border: 1px solid #e5e7eb !important;
}

#transferRoleModal button[type="submit"] {
    background-color: var(--primary) !important;
    color: white !important;
    border: none !important;
}

@media (max-width: 576px) {
    #transferRoleModal {
        width: 95% !important;
    }

    #transferRoleModal .modal-header {
        height: 50px !important;
    }

    #transferRoleModal .modal-header h2 {
        font-size: 16px !important;
    }

    #transferRoleModal .modal-body {
        padding: 12px 15px 15px 15px !important;
    }

    #transferRoleModal .warning {
        padding: 10px !important;
        margin: 12px 0 12px 0 !important;
    }

    #transferRoleModal form>*:last-child {
        gap: 10px !important;
    }

    #transferRoleModal button[type="button"],
    #transferRoleModal button[type="submit"] {
        width: calc(50% - 5px) !important;
    }

    #transferRoleModal button {
        padding: 10px 5px !important;
        font-size: 14px !important;
    }
}

#transferRoleModal form>*:last-child::after {
    content: '';
    display: table;
    clear: both;
}

/* OPRAVENÉ H2 STYLY PRO MODALY */
.modal-header h2 {
    margin: 0 !important;
    padding: 0 !important;
    color: white !important;
    font-size: 18px !important;
    font-weight: 500 !important;
    padding-right: 20px !important;
    display: block !important;
    visibility: visible !important;
}

#deactivateAccountModal .modal-header h2,
#deleteAccountModal .modal-header h2 {
    margin: 0 !important;
    padding: 0 !important;
    padding-right: 40px !important; /* ← Přidán padding aby se text nevěšel do křížku */
    color: white !important;
    font-size: 18px !important;
    font-weight: 500 !important;
    text-align: left !important; /* ← ZMĚNĚNO z center na left */
    width: auto !important; /* ← ZMĚNĚNO z 100% na auto */
    display: block !important;
    visibility: visible !important;
    flex: 1 !important; /* ← Přidáno pro flexbox layout */
}
/* OPRAVENÉ STYLY PRO ACCOUNT SETTINGS MODALY */

/* Přepsání problematických pravidel pro deactivateAccountModal a deleteAccountModal */
#deactivateAccountModal .modal-header,
#deleteAccountModal .modal-header {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    height: 56px !important;
    margin: 0 !important;
    padding: 0 16px !important;
    background-color: var(--primary) !important;
    color: white !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important; /* ← Zpět na center pro centrování textu */
    border-top-left-radius: 12px !important;
    border-top-right-radius: 12px !important;
    z-index: 2 !important;
    position: relative !important; /* ← Pro správné pozicování close buttonu */
}

#deactivateAccountModal .modal-header h2,
#deleteAccountModal .modal-header h2 {
    margin: 0 !important;
    padding: 0 !important;
    padding-left: 40px !important; /* ← Padding zleva aby byl text skutečně na středu */
    padding-right: 40px !important; /* ← Padding zprava aby se text nevěšel do křížku */
    color: white !important;
    font-size: 18px !important;
    font-weight: 500 !important;
    text-align: center !important; /* ← Zpět na center */
    width: 100% !important; /* ← Zpět na 100% pro centrování */
    display: block !important;
    visibility: visible !important;
    flex: 1 !important;
    position: relative !important; /* ← Přidáno pro lepší positioning */
}

/* Zajištění správného pozicování close buttonu */
#deactivateAccountModal .close-btn,
#deleteAccountModal .close-btn,
#closeDeactivateModal,
#closeDeleteModal {
    position: absolute !important;
    right: 15px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    cursor: pointer !important;
    background-color: transparent !important;
    border: none !important;
    color: white !important;
    font-size: 22px !important;
    line-height: 1 !important;
    width: 24px !important;
    height: 24px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    z-index: 10 !important; /* ← Zvýšený z-index proti glitchování */
    pointer-events: auto !important; /* ← Zajistí klikatelnost */
}

#closeDeactivateModal:hover,
#closeDeleteModal:hover {
    background-color: rgba(255, 255, 255, 0.1) !important;
    border-radius: 4px !important;
}

/* Responsive adjustments */
@media (max-width: 576px) {
    #deactivateAccountModal .modal-header,
    #deleteAccountModal .modal-header {
        height: 50px !important;
        padding: 0 14px !important;
    }

    #deactivateAccountModal .modal-header h2,
    #deleteAccountModal .modal-header h2 {
        font-size: 16px !important;
        padding-right: 35px !important;
    }

    #deactivateAccountModal .modal-body,
    #deleteAccountModal .modal-body {
        margin-top: 50px !important;
        padding: 16px !important;
    }
}

@media (max-width: 375px) {
    #deactivateAccountModal .modal-header,
    #deleteAccountModal .modal-header {
        height: 46px !important;
        padding: 0 12px !important;
    }

    #deactivateAccountModal .modal-header h2,
    #deleteAccountModal .modal-header h2 {
        font-size: 15px !important;
        padding-right: 30px !important;
    }

    #deactivateAccountModal .modal-body,
    #deleteAccountModal .modal-body {
        margin-top: 46px !important;
        padding: 14px !important;
    }
}

/* 🔔 @Mentions dropdown - stejný styl jako ostatní dropdowny */
.mentions-autocomplete {
    position: relative;
}

.mentions-dropdown {
    position: absolute;
    bottom: 100%;
    left: 0;
    right: 0;
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: var(--shadow-md);
    opacity: 0;
    visibility: hidden;
    z-index: 1000;
    min-width: 180px;
    transform: translateY(-15px);
    transition: all 0.2s ease;
    max-height: 200px;
    overflow-y: auto;
}

.mentions-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.mention-item {
    color: var(--text-primary);
    display: flex;
    flex-direction: column;
    padding: 12px 16px;
    text-decoration: none;
    border-bottom: 1px solid var(--border);
    transition: background-color 0.2s ease;
    cursor: pointer;
}

.mention-item:last-child {
    border-bottom: none;
}

.mention-item:hover,
.mention-item.selected {
    background-color: var(--bg-light);
}

.mention-username {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 14px;
}

.mention-email {
    color: var(--text-secondary);
    font-size: 12px;
    margin-top: 2px;
}

.mention {
    background-color: #e6f3ff;
    color: var(--primary);
    padding: 2px 6px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 13px;
    border: 1px solid rgba(0, 102, 255, 0.2);
    text-decoration: none;
    display: inline-block;
}
