/* /var/www/stavebni-den/public/style.css */

/* --- Základní a globální styly --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f3f4f6;
    color: #1f2937;
}

/* --- Styly pro přihlašovací obrazovku --- */
.login-body {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

.login-container {
    background-color: #ffffff;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05), 0 10px 15px rgba(0, 0, 0, 0.05);
    width: 100%;
    max-width: 400px;
}

.login-container h2 {
    text-align: center;
    color: #1f2937;
    margin-bottom: 24px;
    font-weight: 600;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #4b5563;
    font-size: 14px;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 16px;
    outline: none;
    transition: border-color 0.2s;
}

.form-group input:focus {
    border-color: #6b7280;
}

.btn-submit {
    width: 100%;
    background-color: #374151;
    color: white;
    padding: 12px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.2s;
    font-weight: 500;
}

.btn-submit:hover {
    background-color: #1f2937;
}

#message {
    margin-top: 15px;
    text-align: center;
    font-size: 14px;
    display: none;
    padding: 10px;
    border-radius: 6px;
}

.msg-error {
    background-color: #fee2e2;
    color: #b91c1c;
    border: 1px solid #f87171;
}

.msg-success {
    background-color: #d1fae5;
    color: #047857;
    border: 1px solid #34d399;
}

/* --- Styly pro Dashboard --- */
.dashboard-body {
    display: flex;
    min-height: 100vh;
}

/* Levý panel Menu */
.sidebar {
    width: 250px;
    background-color: #ffffff;
    border-right: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
}

/* UPRAVENO: Tmavý rámeček pro název aplikace */
.sidebar-header {
    padding: 20px;
    font-size: 1.2rem;
    font-weight: bold;
    background-color: #374151;
    color: #ffffff;
    text-align: center;
}

.sidebar-menu {
    list-style: none;
    padding: 10px 0;
    flex-grow: 1;
}

.sidebar-menu li a {
    display: block;
    padding: 15px 20px;
    color: #4b5563;
    text-decoration: none;
    transition: background-color 0.2s, color 0.2s;
}

/* UPRAVENO: Tmavší šedá při najetí myší na položky menu */
.sidebar-menu li a:hover {
    background-color: #d1d5db;
    color: #111827;
    font-weight: 500;
}

/* Tlačítko odhlásit */
.logout-btn {
    display: block;
    padding: 15px 20px;
    text-align: center;
    background-color: #fee2e2;
    color: #b91c1c;
    text-decoration: none;
    border-top: 1px solid #e5e7eb;
    transition: background-color 0.2s, color 0.2s;
    font-weight: 500;
}

.logout-btn:hover {
    background-color: #fca5a5;
    color: #991b1b;
}

/* Hlavní obsah */
.main-content {
    flex-grow: 1;
    padding: 30px;
}

.card {
    background-color: #ffffff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* --- Styly pro Tabulky --- */
.table-container {
    overflow-x: auto;
    margin-top: 15px;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
    font-size: 14px;
}

.data-table th {
    background-color: #f9fafb;
    color: #4b5563;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.05em;
}

.data-table tbody tr:hover {
    background-color: #f3f4f6;
}

.action-btn {
    padding: 6px 10px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    margin-right: 5px;
}

.btn-edit {
    background-color: #e5e7eb;
    color: #374151;
}

.btn-edit:hover {
    background-color: #d1d5db;
}

.btn-delete {
    background-color: #fee2e2;
    color: #b91c1c;
}

.btn-delete:hover {
    background-color: #fca5a5;
}

/* --- Záložky (Tabs) --- */
.tabs {
    display: flex;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 20px;
}

.tab-btn {
    padding: 10px 20px;
    background: none;
    border: none;
    font-size: 16px;
    font-weight: 500;
    color: #6b7280;
    cursor: pointer;
    border-bottom: 2px solid transparent;
}

.tab-btn.active {
    color: #111827;
    border-bottom: 2px solid #374151;
}

.tab-btn:hover:not(.active) {
    color: #374151;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* --- Modální okna (Formuláře) --- */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 10px;
}

.close-modal {
    cursor: pointer;
    font-size: 1.5rem;
    color: #9ca3af;
    border: none;
    background: none;
}

.close-modal:hover {
    color: #111827;
}

.form-row {
    display: flex;
    gap: 15px;
}

.form-row .form-group {
    flex: 1;
}

.btn-primary {
    background-color: #374151;
    color: white;
    padding: 10px 15px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

.btn-primary:hover {
    background-color: #1f2937;
}

/* --- Styly pro rozbalovací podsložky menu --- */
.submenu-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.submenu-toggle::after {
    content: '\25BC';
    font-size: 10px;
    transition: transform 0.3s;
}

.submenu-toggle.open::after {
    transform: rotate(-180deg);
}

.submenu {
    list-style: none;
    padding-left: 0;
    display: none;
    background-color: #f9fafb;
    border-y: 1px solid #e5e7eb;
}

.submenu.open {
    display: block;
}

.submenu li a {
    padding: 10px 20px 10px 40px;
    font-size: 14px;
    border-left: 3px solid transparent;
}

.submenu li a:hover {
    border-left: 3px solid #374151;
    background-color: #e5e7eb;
}