:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --secondary-color: #64748b;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --background: #f8fafc;
    --card-background: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border-color: #8496ad;
    --background-new: #ced2d9;
    --background-transactions: #f0f0f4;
    --background-transactions-hover: #f2f2f7;
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/*html, body {*/
/*    height: 100%;*/
/*    margin: 0;*/

/*}*/
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--background-new);
    color: var(--text-primary);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow: hidden;
}



#app {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0rem 1rem;

}

/* Přidáme specifický padding pro obsah dashboardu */
#dashboardPage > .container {
    padding-top: 2rem;
    padding-bottom: 2rem;
}

.container-header {
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding: 0rem 0rem !important;

}

.page {
    display: none;
    min-height: 100vh;
}

.page.active {
    display: block;
    flex-direction: column;
    flex: 1;
}


/*!* Zajistí, že login page bude mít výšku viewportu pouze když je aktivní *!*/
/*#loginPage.active {*/
/*    !*height: 100vh;*!*/
/*    !*overflow: hidden;*!*/
/*    display: flex;*/
/*}*/

#loginPage.active {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    display: flex;
}

body.login-active {
    overflow: hidden;
}

body.dashboard-active {
    overflow: auto;
}

.card {
    background: #edf0f8;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

/* Specifické pozadí pro transakce */
.transactions-section .card {
    background: var(--background-transactions);
    /* Nebo můžete přidat další vlastnosti: */
    /* border: 2px solid #ddd; */
    /* box-shadow: none; */
}


/* Login Page */
.login-card {
    max-width: 500px;
    margin: 0 auto; /* Odstraňte 4rem */
    padding-bottom: 0.2rem !important;
    animation: fadeInUp 0.5s ease-in;
    background: #edf0f8b8 !important;
}

.logo {

    text-align: center;
    margin-bottom: 2rem;
}

.logo h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.logo .logo-icon {
    max-width: 400px;
    max-height: 400px;
    width: auto;
    height: auto;
}

.subtitle {
    color: #6e6e6e;
    font-size: 2rem;
    font-weight: 1000;
    font-family: "Times", "Times New Roman", "Georgia", serif;
}

.subtitle-regular {
    color: #908157bd;
    font-size: 1rem;
    justify-content: center;
    font-weight: 500;
}

.subtitle-form {
    border-top: 1px solid #8898b485;
    border-bottom: 1px solid #8898b485;
}

.subtitle-small {
    padding-top: 1rem;
    padding-bottom: 0rem;
    color: #7d8fad;
    font-size: 0.7rem;
    justify-content: right;
    text-align: right;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
}

.labelSignIn {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #7d8fad !important;
}

.form-group input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.btn {
    width: 100%;
    padding: 0.875rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background: #6e6e6e;
    color: white;
}

.btn-primary:hover {
    background: #4d4d4d;
    /*transform: translateY(-1px);*/
    box-shadow: var(--shadow-lg);
}

.btn-primary:disabled {
    background: var(--secondary-color);
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: #6e6245;
    color: white;
    width: auto;
}

.btn-secondary:hover {
    background: #475569;
}

.error-message {
    margin-top: 1rem;
    padding: 0.75rem;
    background: #fee2e2;
    color: var(--danger-color);
    border-radius: 8px;
    font-size: 0.875rem;
}

.hidden {
    display: none !important;
}

/* Dashboard */
.header {
    background: #f6f4ee;
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.header h1 {
    font-size: 1.5rem;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.header .logo-icon {
    max-width: 300px;
    max-height: 300px;
    width: auto;
    height: auto;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0rem 0 0.5rem 0;
    flex-wrap: nowrap;  /* Zakáže zalamování na nový řádek */
}

.header-title {
    text-align: center;
    padding-bottom: 0.5rem;
    background: #090f3d;
    width: 100%;
}

.header-title h1 {
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    margin: 0 auto;
    color: #c5a462;
    max-width: 1200px;
    padding: 0 1rem;
    justify-content: center;
}

.footer {
    background: var(--card-background);
    border-top: 1px solid var(--border-color);
    padding: 0.5rem 0;
    margin-top: 0rem;
    text-align: center;
    display: block;
}

body.login-active .footer {
    display: none;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.footer-content p {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin: 0;
}

.footer-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.footer-link:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

/* Balance Section */
.balance-section {
    margin-bottom: 1rem;
}

.balance-card {
    background: linear-gradient(135deg, #1a243f 50%, #25335b 50%);
    color: white;
    border: none;
    padding: 1rem 2rem;  /* horní/dolní 1rem, levý/pravý 2rem */

}

.balance-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    align-items: center;
}

/* Levý sloupec */
.balance-left {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    text-align: left;
}

.balance-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.balance-label {
    font-size: 0.875rem;
    opacity: 0.8;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.balance-value {
    font-size: 1.125rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* Pravý sloupec */
.balance-right {
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: right;
}

.balance-main {
    width: 100%;
}

.balance-main-label {
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 1rem;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.balance-amount {
    font-size: 2rem;
    font-weight: 700;
}

/* Transactions Section */
.transactions-section h2 {
    margin-bottom: 1.5rem;
    color: var(--text-primary);

}

.transaction-item {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 1rem;
    padding: 1.25rem;
    border-bottom: 4px solid var(--border-color);

    transition: background 0.2s;
}

.transaction-item:last-child {
    border-bottom: none;
}

.transaction-item:hover {
    background: var(--background-transactions-hover);


}

.transaction-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--background);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    min-width: 80px;
}

.transaction-date .day {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1;
}

.transaction-date .month {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.transaction-details {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.transaction-name {
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* Tooltip */
.tooltip-container {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.tooltip-icon {
    font-size: 0.875rem;
    cursor: help;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.tooltip-icon:hover {
    opacity: 1;
}

.tooltip-text {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    bottom: 100%;
    left: 0;
    margin-bottom: 0.5rem;
    background: var(--text-primary);
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 400;
    white-space: nowrap;
    z-index: 1000;
    box-shadow: var(--shadow-lg);
    transition: opacity 0.2s, visibility 0.2s;
    pointer-events: none;
}

.tooltip-text::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 1rem;
    border: 5px solid transparent;
    border-top-color: var(--text-primary);
}

.tooltip-container:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

.transaction-account {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.transaction-reference {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-style: italic;
}

.transaction-amount {
    display: flex;
    align-items: center;
    font-size: 1.25rem;
    font-weight: 700;
}

.transaction-amount.credit {
    color: var(--success-color);
}

.transaction-amount.debit {
    color: var(--danger-color);
}

.loading {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
}

.no-transactions {
    text-align: center;
    padding: 3rem;
    color: var(--text-secondary);
}

/*#loginPage {*/
/*    background-image: url('../images/Background1.png');*/
/*    background-size: cover;*/
/*    background-position: center;*/
/*    background-repeat: no-repeat;*/
/*    background-attachment: fixed;*/
/*    position: fixed;*/
/*    top: 0;*/
/*    left: 0;*/
/*    width: 100vw;*/
/*    height: 100vh;*/
/*    display: none;*/
/*    align-items: center;*/
/*    justify-content: center;*/
/*    overflow: hidden;*/
/*}*/

#loginPage {
    background-image: url('../images/Background1.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    display: none;
    align-items: center;
    justify-content: center;

}


@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        /*transform: translateY(30px);*/
    }
    to {
        opacity: 1;
        /*transform: translateY(0);*/
    }
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }

    .login-card {
        /*margin: 2rem auto;*/

        flex-direction: column;
        flex: 1;
        animation: fadeInUp 0.8s linear;
    }

    .balance-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .balance-amount {
        font-size: 2rem;
    }

    .transaction-item {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .transaction-date {
        flex-direction: row;
        justify-content: flex-start;
        width: fit-content;
        min-width: auto;
    }

    .transaction-date .day {
        font-size: 1.25rem;
        margin-right: 0.5rem;
    }

    .transaction-amount {
        justify-content: flex-start;
    }

    .header-logo {
        font-size: 1rem;
    }

    .header-logo .logo-icon {
        max-width: 250px;
        max-height: 250px;
    }



    .btn-secondary {
        padding: 0.625rem 1rem;
        font-size: 0.875rem;
    }

    .logo .logo-icon {
        max-width: 300px;
        max-height: 300px;
    }
}
