/* custom.css */

/* Tmavší pozadí těla - ODSTRANĚN PADDING-TOP */
body {
    background-color: #f2f2f2;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

/* Navbar */
.navbar {
    background-color: #1B171F !important;
    font-weight: 600;
    padding: 0.5rem 1rem;
    z-index: 1040;
    height: 60px;
}

/* Logo v navbaru */
.navbar-brand img {
    height: 32px;
    vertical-align: middle;
    transition: transform 0.2s ease;
}

.nav-link {
    font-size: 0.95rem;
    font-weight: 500;
}

/* barva textu v nav */
.navbar-dark .navbar-nav .nav-link {
    color: #e1e1e1;
}
.navbar-dark .navbar-nav .nav-link:hover {
    color: #fff;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

h3, h4 {
    margin-top: 1rem;
    margin-bottom: 0.7rem;
}

.table th, .table td {
    vertical-align: middle;
}

/* Switch - DUZP */
.form-check-input[type="checkbox"] {
    width: 1.4em;
    height: 1.4em;
}

/* Tlačítka pro splatnost */
.splatnost-buttons .btn {
    margin-right: 0.2rem;
    margin-bottom: 0.4rem;
}

/* .btn-purple (použito pro login a "Nahrát fakturu") */
.btn-purple {
    background-color: #5E35F3;
    color: #fff;
    border: none;
}
.btn-purple:hover {
    filter: brightness(1.1);
}

/* Plovoucí tlačítko pro vytváření úkolů */
.floating-task-button {
    position: fixed;
    bottom: 20px;
    right: 20px; /* Přesunuto vpravo, protože vlevo je teď sidebar */
    z-index: 1000;
}

.task-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background-color: #5E35F3;
    color: white;
    border-radius: 50%;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(94, 53, 243, 0.3);
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.task-btn:hover {
    background-color: #4a2bc7;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(94, 53, 243, 0.4);
    text-decoration: none;
}

.task-btn:active {
    transform: translateY(0);
}

.task-icon {
    font-size: 28px;
    line-height: 1;
    font-style: normal;
    font-weight: bold;
    display: inline-block;
}

/* Responzivní úpravy */
@media (max-width: 768px) {
    .floating-task-button {
        bottom: 15px;
        right: 15px;
    }
    
    .task-btn {
        width: 50px;
        height: 50px;
    }
    
    .task-icon {
        font-size: 20px;
    }
}

/* Zajistíme, že tlačítko nebude překrývat obsah na malých obrazovkách */
@media (max-width: 480px) {
    .container {
        padding-bottom: 80px;
    }
}

/* Vlastní tooltip - vpravo od tlačítka */
.custom-tooltip {
    position: relative;
}

.custom-tooltip .tooltip-text {
    visibility: hidden;
    position: absolute;
    left: 70px; /* Posune tooltip vpravo od tlačítka */
    top: 50%;
    transform: translateY(-50%); /* Vycentruje vertikálně */
    background-color: #333;
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none;
    z-index: 1001;
}

/* Šipka vlevo od tooltipů (ukazuje na tlačítko) */
.custom-tooltip .tooltip-text::before {
    content: '';
    position: absolute;
    right: 100%; /* Umístí šipku vlevo od tooltipů */
    top: 50%;
    transform: translateY(-50%);
    border: 5px solid transparent;
    border-right-color: #333; /* Šipka ukazuje doleva */
}

.custom-tooltip:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* Pro mobilní zařízení - tooltip na dotek */
@media (max-width: 768px) {
    .custom-tooltip .tooltip-text {
        left: 60px; /* Menší vzdálenost na mobilu */
        white-space: normal;
        width: 150px;
        text-align: center;
    }
}

/* === SIDEBAR MENU STYLES === */

/* Hamburger tlačítko */
.hamburger-btn {
    background: none;
    border: none;
    padding: 8px;
    width: 45px;
    height: 45px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.hamburger-line {
    display: block;
    width: 25px;
    height: 3px;
    background-color: #fff;
    margin: 3px 0;
    transition: all 0.3s ease;
    border-radius: 2px;
}

/* Animace hamburger menu */
.hamburger-btn.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.hamburger-btn.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.hamburger-btn.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Sidebar */
.sidebar {
    position: fixed;
    top: 0;
    left: -300px;
    width: 300px;
    height: 100vh;
    background: linear-gradient(180deg, #1B171F 0%, #2d2a35 100%);
    color: white;
    transition: left 0.3s ease;
    z-index: 1050;
    overflow-y: auto;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
}

.sidebar.show {
    left: 0;
}

/* Sidebar header */
.sidebar-header {
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.05);
}

.sidebar-logo {
    height: 40px;
    margin-bottom: 10px;
}

.sidebar-title {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
    color: #fff;
}

/* User info */
.user-info {
    padding: 15px 20px;
    display: flex;
    align-items: center;
    background: rgba(94, 53, 243, 0.2);
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.user-info i {
    font-size: 1.5rem;
    margin-right: 10px;
    color: #5E35F3;
}

.user-info span {
    font-size: 0.9rem;
    font-weight: 500;
}

/* Sidebar navigation */
.sidebar-nav {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-nav .nav-item {
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.sidebar-nav .nav-link {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    color: #e1e1e1;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.sidebar-nav .nav-link:hover {
    background: rgba(94, 53, 243, 0.2);
    color: #fff;
    padding-left: 25px;
}

.sidebar-nav .nav-link i {
    width: 20px;
    margin-right: 15px;
    text-align: center;
    font-size: 1.1rem;
}

/* Sidebar footer */
.sidebar-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    border-top: 1px solid rgba(255,255,255,0.1);
    background: rgba(0,0,0,0.2);
}

.sidebar-footer .nav-link {
    padding: 12px 20px;
    font-size: 0.9rem;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.sidebar-footer .logout-link:hover {
    background: rgba(220, 53, 69, 0.2);
    color: #dc3545;
}

.sidebar-footer .info-link:hover {
    background: rgba(23, 162, 184, 0.2);
    color: #17a2b8;
}

/* Guest user styling */
.sidebar-guest {
    padding: 20px;
    text-align: center;
}

.sidebar-guest p {
    margin-bottom: 15px;
    color: #ccc;
}

/* Overlay */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1045;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

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

/* Main content */
.main-content {
    margin-top: 60px;
    transition: margin-left 0.3s ease;
}

/* Body adjustments */
body.sidebar-opened {
    overflow: hidden;
}

/* Desktop sidebar behavior (volitelné - sidebar zůstane viditelný) */
@media (min-width: 1200px) {
    .sidebar {
        left: 0;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
        transition: margin-left 0.3s ease;
    }
    
    body.sidebar-opened .main-content {
        margin-left: 300px;
    }
    
    .sidebar-overlay {
        display: none;
    }
}

/* Mobile responsivita */
@media (max-width: 767px) {
    .sidebar {
        width: 280px;
        left: -280px;
    }
    
    .navbar-brand img {
        height: 28px;
    }
    
    .hamburger-btn {
        width: 40px;
        height: 40px;
    }
    
    .hamburger-line {
        width: 22px;
    }
}

/* Active link styling - NOVĚ PŘIDÁNO */
.sidebar-nav .nav-link.active {
    background: rgba(94, 53, 243, 0.3);
    color: #fff;
    border-left: 4px solid #5E35F3;
    padding-left: 21px; /* Kompenzace pro border */
}

.sidebar-nav .nav-link.active i {
    color: #5E35F3;
}

.sidebar-nav .nav-link.active:hover {
    background: rgba(94, 53, 243, 0.4);
    padding-left: 26px; /* Kompenzace pro border při hover */
}

/* Scrollbar styling pro sidebar */
.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.1);
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.3);
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.5);
}
