﻿/*———— Tema ir spalvos ————*/
:root {
    --bg-body: rgb(255, 254, 252);
    --bg-sidebar: rgb(248, 248, 247);
    --bg-main: #ffffff;
    --text-primary: #5f5e5b;
    --border-dark: rgb(238, 238, 236);
    --border-hover: #f1f1f1;
    --accent: #32302c;
}

html[data-theme="dark"] {
    --bg-body: #121212;
    --bg-sidebar: #1e1e1e;
    --bg-main: #1a1a1a;
    --text-primary: #e0e0e0;
    --border-dark: #3a3a3a;
    --border-hover: rgba(35,130,226,0.1);
    --accent: #86b7fe;
}

/*———— Reset ir pagrindiniai flex‘ai ————*/
html, body {
    height: 100%;
    margin: 0;
}

body {
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
    background-color: var(--bg-body);
    color: var(--text-primary);
}

/*———— Pagrindinis konteineris + responsyvus skalavimas ————*/
.app-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    /* Skalavimo sluoksnis */
    transform-origin: top left;
    transform: scale(1);
    transition: transform 0.2s, width 0.2s, height 0.2s;
}

@media (max-width: 1200px) {
    .app-container {
        transform: scale(0.9);
        width: calc(100% / 0.9); /* ≈111.11% */
        height: calc(100% / 0.9); /* ≈111.11% */
    }
}

@media (max-width: 1000px) {
    .app-container {
        transform: scale(0.8);
        width: calc(100% / 0.8); /* 125% */
        height: calc(100% / 0.8);
    }
}

@media (max-width: 800px) {
    .app-container {
        transform: scale(0.7);
        width: calc(100% / 0.7); /* ≈142.86% */
        height: calc(100% / 0.7);
    }
}

/*———— Navigacija ————*/
.navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    background-color: var(--bg-sidebar);
    padding: 15px 24px;
}

/* logo, meniu, user stiliai, hover efektai */
.menu-list-logo {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-menu ul {
    display: flex;
    gap: 16px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.logo h1 {
    margin: 0;
    font-weight: 600;
    font-size: 22px;
    color: #191918;
}

.user {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

    .user .user-name {
        font-size: 14px;
        font-weight: 600;
    }

.user {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* DROPDOWN MENU STYLES */
.workspace-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    width: 240px;
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    z-index: 100;
}
.user-name {
    font-size: 14px;
    line-height: 20px;
    color: rgb(50, 48, 44);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 500;
    display: flex;
    flex-direction: row;
    gap: 8px;
}
    .workspace-menu.show {
        display: block;
    }


.workspace-header {
    border-bottom: 1px solid var(--border-dark);
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

    .workspace-header strong {
        display: block;
    }

    .workspace-header .plan {
        font-size: 0.9em;
        color: #666;
    }

.dropdown-btn {
    background-color: transparent;
    user-select: none;
    transition: background 20ms ease-in;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    height: 28px;
    padding-inline: 8px;
    border-radius: 0px;
    white-space: nowrap;
    font-size: 12px;
    justify-content: center;
    font-weight: 500;
    line-height: 1.2;
    border: 1px solid rgba(55, 53, 47, 0.16);
    color: rgb(115, 114, 110);
    display: flex;
    gap: 5px;
}


.dropdown-btn:hover {
    background: #f5f5f5;
}


.links-section {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 12px;
    color: rgb(115, 114, 110);
}

    .links-section a {
        color: rgb(115, 114, 110);
        text-decoration: none;
        font-weight: 500;
        padding: 4px;
    }

    .links-section a:hover {
        background: #f5f5f5;
        border-radius: 4px;
    }




.nav-item a {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 5px 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 4px;
    margin: 2px 0;
    transition: background .2s;
}

    .nav-item a .icon {
        width: 24px;
        text-align: center;
        margin-right: 8px;
    }

.nav-item:hover a,
.nav-item.active a {
    background: var(--border-hover);
}

    .nav-item.active a .text {
        color: var(--accent);
    }

/*———— Pagrindinis turinys ————*/
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    
    background-color: var(--bg-main);
}


.save-btn {
    background-color: #78b833;
    border: none;
    padding: 5px 10px;
    color: white;
    font-size: 12px;
    font-weight: 500;
}

    .save-btn:hover {
            background-color: #6fa32a;
}

.white-btn {
    border: 1px solid rgba(55, 53, 47, 0.16);
    color: rgb(115, 114, 110);
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 500;
    background-color: transparent;
    display: inline-flex;
    align-items: center;
    height: 28px;
    gap: 5px;
}
    .white-btn:hover {
        background: #f5f5f5;
    }
/* data + header cells */
td {
    padding: 5px !important;
}

/* Pilnas ekrano overlay – užmodalina foną */
.modal {
    display: none; /* paslepta */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

/* Vidinis langas */
.modal-content {
    background: #fff;
    width: 80%;
    max-width: 900px;
    height: 80%;
    max-height: 600px;
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

/* Uždarymo mygtukas viršuje dešinėje */
.close-btn {
    position: absolute;
    top: 8px;
    right: 12px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
}

/* Kūnas: kairė+dešinė */
.modal-body {
    display: flex;
    height: 100%;
    padding: 0;
}

/* Navigacija kairėje */
.modal-nav {
    width: 220px;
    padding: 16px 0;
    background-color: #f7f7f7;
    padding: 16px;
}

    .modal-nav ul {
        list-style: none;
        margin: 0;
        padding: 0;
    }

    .modal-nav li {
        padding: 6px;
        cursor: pointer;
        color: #32302c;
        font-size: 14px;
        transition: background .2s;
        margin: 2px 0;
    }

        .modal-nav li.active {
            background: #f0f0f0;
            font-weight: 600;
            border-radius: 4px;
        }

        .modal-nav li:hover {
            background: #f0f0f0;
            border-radius: 4px;
        }
/* Turinys dešinėje */
.modal-sections {
    padding: 16px;
    flex: 1;
    overflow-y: auto;
}

.section {
    display: none;
}

    .section.active {
        display: block;
    }
.eclient-table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid #ccc;
}

    .eclient-table th, .eclient-table td {
        border: 1px solid #ccc;
        padding: 8px;
        text-align: left;
        font-size: 12px;
    }

    .eclient-table th {
        background-color: #f0f0f0;
        color: #333333;
    }

    .eclient-table tbody tr {
        transition: background-color 0.2s ease;
    }

        .eclient-table tbody tr:hover {
            background-color: #f5f5f5;
        }


.red-icon {
    color: #ff0000;
    font-size: 16px;
    cursor: pointer;
}


.sub-navigation {
    border-bottom: 1px solid #d0d0d0;
    padding: 0 24px;
}

    .sub-navigation ul {
        display: flex;
        list-style: none;
        padding: 0;
        margin: 0;
    }

.navigation-item a {
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 10px 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 4px;
    margin: 2px 0;
    transition: background .2s;
}

.right-nav-side {
    display: flex;
    align-items: center;
    gap: 10px;
}

.notification {
    position: relative;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
    color: var(--accent);
    font-weight: 500;
    gap: 5px;
    background: var(--border-hover);
    padding: 5px 8px;
    border-radius: 4px;
}

.notification-badge {
    position: absolute;
    top: -11px;
    right: -5px;
    background-color: #78b833; /* ryškesnė žalia */
    color: #fff;
    border-radius: 50%; /* apvalumas */
    padding: 0; /* panaikins pailgėjimą */
    width: 20px;
    height: 20px;
    font-size: 0.75rem;
    line-height: 20px; /* centruoja tekstą vertikaliai */
    text-align: center;
    box-shadow: 0 0 3px rgba(0,0,0,0.3);
    display: none; /* rodyti tik jei >0 */
}

.notification-container {
    padding-top: 50px;
}

.readonly-input {
    background-color: transparent;
    color: #555;
    border: 1px solid #ccc;
}