/* =========================================
   1. GLOBÁLNÍ PROMĚNNÉ & RESET
   ========================================= */
:root {
    /* Rozměry - ZMENŠENO O 20% */
    --sidebar-width: 180px;  /* Původně 220px */
    --header-height: 55px;   /* Původně 70px */

    /* Barvy - Sidebar */
    --sidebar-bg: #1a1a1a;
    --sidebar-text: #e0e0e0;

    /* Barvy - Akcenty */
    --accent-green: #2ecc71;
    --accent-hover: #27ae60;
    --active-bg: rgba(46, 204, 113, 0.15);

    /* Barvy - Karty a UI */
    --card-bg-gradient: linear-gradient(145deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.6) 100%);
    --gradient-primary: linear-gradient(to right, #00b09b, #96c93d);
    --bg-light: #f8faf8;
    --text-dark: #2d3436;

    /* Fonty */
    --font-primary: 'Poppins', 'Open Sans', sans-serif;
    --font-serif: 'Playfair Display', serif;

    
}



body, html {
    margin: 0;
    font-family: var(--font-primary);
    background-color: var(--bg-light);
    color: var(--text-dark);
    font-size: 1rem; /* = 11px */
    line-height: 1.5; /* Trochu menší řádkování */
    background-color: #fdfbf7 !important;
     /* Původně 13px -> Teď 11px. Toto zmenší všechna písma a paddingy v 'rem' */
    font-size: 11px; 
}

/* =========================================
   2. LAYOUT (SIDEBAR & MAIN)
   ========================================= */
.admin-wrapper {
    display: flex;
    min-height: 100vh;
}

/* --- SIDEBAR --- */
.admin-sidebar {
    width: var(--sidebar-width);
    background-color: var(--sidebar-bg);
    color: var(--sidebar-text);
    display: flex;
    flex-direction: column;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    flex-shrink: 0;
    position: relative;
    z-index: 200;
}

.sidebar-header {
    height: 45px; /* Zmenšeno z 55px */
    display: flex;
    align-items: center;
    padding: 0 15px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.logo-text {
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    font-family: var(--font-serif);
}
.logo-text span { color: var(--accent-green); }

.sidebar-nav { padding: 10px 8px; }
.sidebar-nav ul { list-style: none; padding: 0; margin: 0; }
.sidebar-nav li { margin-bottom: 3px; }

.sidebar-nav a {
    display: flex;
    align-items: center;
    padding: 8px 12px; /* Menší padding */
    color: var(--sidebar-text);
    text-decoration: none;
    transition: all 0.3s ease;
    border-radius: 50px;
    font-size: 0.95rem;
}

.sidebar-nav a i {
    width: 18px;
    font-size: 1rem;
    margin-right: 8px;
    opacity: 0.7;
    transition: 0.3s;
}

.sidebar-nav a:hover {
    background-color: rgba(255,255,255,0.05);
    color: #fff;
    padding-left: 18px;
}
.sidebar-nav a:hover i { color: var(--accent-green); opacity: 1; }

.sidebar-nav a.active {
    background-color: var(--accent-green);
    color: #fff;
    box-shadow: 0 2px 8px rgba(46, 204, 113, 0.3);
    font-weight: 600;
}
.sidebar-nav a.active i { opacity: 1; color: #fff; }

.sidebar-divider {
    height: 1px;
    background: rgba(255,255,255,0.1);
    margin: 10px 8px;
}

/* --- HLAVNÍ OBSAH --- */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--bg-light);
    height: 100vh;
    overflow: hidden;
    position: relative;
}

/* --- TOP BAR --- */
.top-bar {
    height: var(--header-height);
    background: #ffffff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px; /* Menší padding boků */
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    z-index: 100;
}

.top-bar-stats {
    display: flex;
    gap: 15px; /* Menší mezera */
    align-items: center;
}

.page-content {
    padding: 20px; /* Menší padding obsahu */
    overflow-y: auto;
    flex: 1;
}

/* =========================================
   3. KOMPONENTY: MINI STAT WIDGET
   ========================================= */
.mini-stat {
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: transform 0.2s;
}
.mini-stat:hover { transform: translateY(-2px); }

.mini-stat .icon {
    width: 32px;  /* Zmenšeno z 40px */
    height: 32px; /* Zmenšeno z 40px */
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
    margin-right: 10px;
}

.mini-stat .icon.blue { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }
.mini-stat .icon.green { background: linear-gradient(135deg, #2af598 0%, #009efd 100%); }
.mini-stat .icon.orange { background: linear-gradient(135deg, #f6d365 0%, #fda085 100%); }

.mini-stat .info { display: flex; flex-direction: column; line-height: 1.1; }
.mini-stat .value { font-weight: 700; font-size: 1.1rem; color: #333; }
.mini-stat .label { font-size: 0.8rem; color: #888; text-transform: uppercase; font-weight: 600; }


/* =========================================
   4. DATAGRID (ULTRA KOMPAKTNÍ)
   ========================================= */
.datagrid {
    background: #ffffff;
    border-radius: 6px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.05);
    overflow: hidden;
    border: 1px solid #f0f0f0;
    margin-bottom: 12px;
}

.datagrid table thead th {
    background-color: #f8f9fa !important;
    color: #6c757d !important;
    font-weight: 700;
    font-size: 0.85rem;
    vertical-align: middle !important;
    border-bottom: 1px solid #e9ecef !important;
    padding: 8px 10px !important; /* Ještě menší padding */
}

.datagrid table tbody td {
    padding: 6px 10px; /* Ultra kompaktní */
    vertical-align: middle;
    color: #344767;
    font-size: 0.9rem;
    border-bottom: 1px solid #f0f0f0;
}

.datagrid table tbody tr { transition: all 0.2s ease; }
.datagrid table tbody tr:hover {
    background-color: #fdfdfd;
    transform: scale(1.001);
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
    z-index: 2;
    position: relative;
}

.datagrid .btn-xs {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 20px; /* Zmenšeno z 24px */
    padding: 0 6px;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 3px;
    margin: 0 !important;
}

.datagrid table tbody td.col-action {
    display: flex !important;
    align-items: center;
    gap: 3px;
    white-space: nowrap;
    border-bottom: none;
}


/* =========================================
   5. 3D KARTY (TILT & GLASS - ZMENŠENO)
   ========================================= */
.card-container {
    perspective: 1000px;
    margin-bottom: 15px;
}

.tilt-card {
    position: relative;
    background: var(--card-bg-gradient);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 15px; /* Menší radius */
    padding: 20px 15px;  /* Menší padding */
    text-align: center;
    min-height: 230px;   /* Zmenšeno z 280px */
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-bottom: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform-style: preserve-3d;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
}

.tilt-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 15px 30px -5px rgba(0,0,0,0.1);
}

/* Vnitřní záře */
.tilt-card::before {
    content: '';
    position: absolute;
    bottom: -30px; left: 0;
    width: 100%; height: 80px;
    background: var(--card-theme, #ccc);
    filter: blur(30px);
    opacity: 0.15;
    transition: opacity 0.4s, transform 0.4s;
    z-index: 0;
    border-radius: 50%;
}
.tilt-card:hover::before { opacity: 0.3; transform: translateY(-10px) scale(1.1); }

/* Glass Button Card */
.glass-button-card {
    background: rgba(255, 255, 255, 0.25);
    box-shadow: 0 5px 20px 0 rgba(31, 38, 135, 0.15);
    backdrop-filter: blur(8px);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    transition: all 0.4s;
    transform-style: preserve-3d;
}
.card-link:hover .glass-button-card {
    transform: translateY(-5px) rotateX(5deg) rotateY(-5deg) scale(1.02);
}

/* Ikony v kartách */
.icon-bubble {
    width: 55px;   /* Zmenšeno z 70px */
    height: 55px;  /* Zmenšeno z 70px */
    margin: 0 auto 10px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    color: white;
    background: var(--card-gradient, linear-gradient(135deg, #aaa, #ccc));
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
    position: relative;
    z-index: 2;
    transition: transform 0.3s ease;
}
.card-link:hover .icon-bubble { transform: translateZ(15px); }

.card-title {
    font-family: var(--font-serif);
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 3px;
    color: #222;
    transition: transform 0.3s ease;
}
.card-subtitle {
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
    display: block;
    color: var(--card-theme, #666);
    transition: transform 0.3s ease;
}
.card-desc { color: #666; font-size: 0.85rem; line-height: 1.4; }

.watermark-letter {
    top: -8px; right: -4px; 
    font-size: 4.5rem; /* Zmenšeno */
    font-weight: 900; 
    opacity: 0.04; 
    color: #000;
    pointer-events: none; 
    z-index: 1;
    font-family: var(--font-serif);
}

/* =========================================
   6. FORMULÁŘE (STYLED FORM - KOMPAKTNÍ)
   ========================================= */
.styled-form input[type="text"], 
.styled-form input[type="email"], 
.styled-form input[type="tel"],
.styled-form input[type="date"], 
.styled-form textarea,
.styled-form select {
    width: 100%;
    padding: 6px 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    background-color: #fcfcfc;
    color: #555;
    transition: all 0.3s ease;
    box-sizing: border-box;
    height: 36px; /* Zmenšeno z 45px na 36px */
}

.styled-form select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2327ae60' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 14px;
}

.styled-form textarea {
    height: auto;
    min-height: 80px; /* Zmenšeno */
    background-image: none;
}

.styled-form input:focus, .styled-form select:focus, .styled-form textarea:focus {
    border-color: #2ecc71;
    background-color: #fff;
    box-shadow: 0 0 0 2px rgba(46, 204, 113, 0.15);
    outline: none;
}

/* =========================================
   7. FLASH MESSAGES & UI ELEMENTY
   ========================================= */
.flash-message {
    max-width: 600px; /* Užší */
    margin: 10px auto;
    padding: 8px 12px;
    border-radius: 5px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
    animation: slideDown 0.5s ease-out;
    background-color: #fff;
    border: 1px solid transparent;
}

.flash-icon {
    flex-shrink: 0;
    width: 22px; height: 22px; /* Zmenšeno */
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: bold; font-size: 0.9rem;
    color: white;
}

/* Varianty Flash */
.flash-success { background-color: #e8f5e9; border-left: 3px solid #27ae60; color: #1b5e20; }
.flash-success .flash-icon { background-color: #27ae60; }
.flash-error { background-color: #ffebee; border-left: 3px solid #c0392b; color: #b71c1c; }
.flash-error .flash-icon { background-color: #c0392b; }
.flash-info { background-color: #e3f2fd; border-left: 3px solid #2980b9; color: #0d47a1; }
.flash-info .flash-icon { background-color: #2980b9; }

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-15px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Tlačítka */
.btn-gradient {
    background: var(--gradient-primary);
    color: white !important;
    border: none;
    transition: transform 0.2s, box-shadow 0.2s;
    font-size: 0.9rem;
    padding: 6px 20px; /* Menší padding */
    border-radius: 50px;
    font-weight: 700;
}
.btn-gradient:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

/* Dropdown */
@media (min-width: 992px) {
    .dropdown:hover .dropdown-menu {
        display: block; margin-top: 0; animation: fadeIn 0.3s ease;
    }
}
.navbar-nav .nav-link { font-weight: 500; color: #333; padding: 0.6rem; }

/* =========================================
   8. PŘEDNÍ STRANA (FRONTEND) & FOOTER
   ========================================= */
header:not(.scrolled) { padding: 10px 0; background: linear-gradient(to bottom, rgba(0,0,0,0.5), transparent); }
header.scrolled { padding: 5px 0; }

.foggy-section {
    background: linear-gradient(rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0.95)), url('../images/bg-forest.jpg'); 
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    padding: 40px 0;
}

footer {
    background: #222;
    color: #eee;
    padding: 30px 0 10px;
    font-size: 0.85rem;
}
footer h4 { color: #fff; margin-bottom: 15px; font-size: 1rem; text-transform: uppercase; letter-spacing: 1px; }

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    text-align: left;
}