/* Základní styly pro Investment Tracker */

:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --danger-color: #e74c3c;
    --light-color: #ecf0f1;
    --dark-color: #34495e;
    --border-color: #ddd;
    --shadow: 0 2px 5px rgba(0,0,0,0.1);
    --shadow-hover: 0 4px 12px rgba(0,0,0,0.15);
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--dark-color);
    background-color: #f8f9fa;
}

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

/* Header */
.header {
    background: var(--primary-color);
    color: white;
    padding: 1rem 0;
    box-shadow: var(--shadow);
}

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

.language-sidebar {
    position: absolute;
    right: -140px;
    top: 50%;
    transform: translateY(-50%);
}

.language-dropdown {
    position: relative;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    border: 1px solid #e0e0e0;
    min-width: 140px;
}

.language-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    width: 100%;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.language-toggle:hover {
    background: #f8f9fa;
}

.flag {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    font-size: 0.7rem;
    font-weight: bold;
}

.lang-name {
    flex: 1;
    text-align: left;
    color: #333;
    font-weight: 500;
}

.dropdown-arrow {
    color: #666;
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.language-dropdown.open .dropdown-arrow {
    transform: rotate(180deg);
}

.language-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    border: 1px solid #e0e0e0;
    border-top: none;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 1000;
}

.language-dropdown.open .language-menu {
    max-height: 200px;
    opacity: 1;
}

.lang-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    text-decoration: none;
    color: #333;
    transition: background-color 0.2s ease;
    border-bottom: 1px solid #f0f0f0;
}

.lang-option:last-child {
    border-bottom: none;
}

.lang-option:hover {
    background: #f8f9fa;
}

.lang-option.active {
    background: var(--secondary-color);
    color: white;
}

.lang-option.active .flag {
    background: white;
    color: var(--secondary-color);
}

.lang-option.active .lang-name {
    color: white;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
}

.nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav a {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.nav a:hover,
.nav a.active {
    background-color: var(--secondary-color);
}

/* Main */
.main {
    padding: 2rem 0;
    min-height: calc(100vh - 140px);
}

.welcome-section {
    margin-bottom: 2rem;
}

.welcome-section h2 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

/* Dashboard */
.dashboard {
    display: grid;
    gap: 2rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.stat-card h3 {
    color: var(--dark-color);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--secondary-color);
}

.recent-activities {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.recent-activities h3 {
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.activity-list {
    max-height: 300px;
    overflow-y: auto;
}

.activity-item {
    padding: 0.75rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.activity-date {
    color: #666;
    font-size: 0.9rem;
}

/* Formuláře */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

/* Tlačítka */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.3s, transform 0.2s;
}

.btn:hover {
    transform: translateY(-1px);
}

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

.btn-primary:hover {
    background: #2980b9;
}

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

.btn-success:hover {
    background: #229954;
}

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

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

.btn-secondary {
    background: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background: #7f8c8d;
}

/* Alert zprávy */
.alert {
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 4px;
    border-left: 4px solid;
}

.alert-success {
    background: #d4edda;
    border-color: var(--success-color);
    color: #155724;
}

.alert-error {
    background: #f8d7da;
    border-color: var(--danger-color);
    color: #721c24;
}

.alert-warning {
    background: #fff3cd;
    border-color: var(--warning-color);
    color: #856404;
}

/* Tabulky */
.table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    box-shadow: var(--shadow);
    border-radius: 8px;
    overflow: hidden;
}

.table th,
.table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.table th {
    background: var(--light-color);
    font-weight: 600;
    color: var(--dark-color);
}

.table tbody tr:hover {
    background: #f8f9fa;
}

/* Login stránka */
.login-page {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-container {
    position: relative;
    width: 100%;
    max-width: 400px;
}

.language-switcher-login {
    position: absolute;
    right: -140px;
    top: 50%;
    transform: translateY(-50%);
}

.language-switcher-login .language-dropdown {
    position: relative;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    min-width: 140px;
    backdrop-filter: blur(10px);
}

.language-switcher-login .language-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    width: 100%;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    color: #333;
}

.language-switcher-login .language-toggle:hover {
    background: rgba(255, 255, 255, 1);
}

.language-switcher-login .language-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 0 0 8px 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-top: none;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.language-switcher-login .lang-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    text-decoration: none;
    color: #333;
    transition: background-color 0.2s ease;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.language-switcher-login .lang-option:last-child {
    border-bottom: none;
}

.language-switcher-login .lang-option:hover {
    background: rgba(255, 255, 255, 0.8);
}

.login-form {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow-hover);
    width: 100%;
    max-width: 400px;
}

.login-form h1 {
    text-align: center;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

/* Paginace */
.pagination {
    margin: 2rem 0;
}

.pagination-list {
    display: flex;
    justify-content: center;
    list-style: none;
    gap: 0.5rem;
}

.pagination-list li {
    display: inline-block;
}

.pagination-list a {
    display: block;
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    text-decoration: none;
    color: var(--dark-color);
    transition: all 0.3s;
}

.pagination-list a:hover {
    background: var(--secondary-color);
    color: white;
    border-color: var(--secondary-color);
}

.pagination-list .active a {
    background: var(--secondary-color);
    color: white;
    border-color: var(--secondary-color);
}

/* Footer */
.footer {
    background: var(--dark-color);
    color: white;
    text-align: center;
    padding: 1rem 0;
    margin-top: auto;
}

/* Responzivní design */
@media (max-width: 768px) {
    .header .container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .language-sidebar {
        position: static;
        transform: none;
        margin-top: 1rem;
        width: 100%;
        max-width: 200px;
    }
    
    .language-dropdown {
        width: 100%;
    }
    
    .language-switcher-login {
        position: static;
        transform: none;
        margin-bottom: 1rem;
        width: 100%;
        max-width: 200px;
    }
    
    .language-switcher-login .language-dropdown {
        width: 100%;
    }
    
    .nav ul {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .container {
        padding: 0 10px;
    }
    
    .login-form {
        margin: 1rem;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .table {
        font-size: 0.9rem;
    }
    
    .table th,
    .table td {
        padding: 0.5rem;
    }
}
