/* ============================================================
   1. IMPORT CZCIONKI I ZMIENNE
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap');

:root {
    --gold: #ffca28;
    --gold-hover: #ffd54f;
    --bg-body: #121212;
    --bg-card: #1e1e1e;
    --bg-input: #161616;
    --text: #e0e0e0;
    --text-muted: #888;
    --border: #333;
    --danger: #ff4444;
}

/* ============================================================
   2. RESET I GŁÓWNE STYLE
   ============================================================ */
* {
    box-sizing: border-box;
}

body {
    background-color: var(--bg-body) !important;
    color: var(--text);
    font-family: 'Inter', sans-serif;
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 20px;
}

/* ============================================================
   3. PASEK MENU (MENU BAR)
   ============================================================ */
.menu-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #1a1a1a;
    padding: 0 20px;
    height: 65px;
    border-bottom: 2px solid var(--gold);
    box-shadow: 0 4px 15px rgba(0,0,0,0.4);
    position: sticky;
    top: 0;
    z-index: 1000;
}

/* Rozmieszczenie 3 sekcji paska */
.menu-items, .user-info, .logout-wrapper {
    flex: 1; /* Każda sekcja zajmuje 33% szerokości */
    display: flex;
    align-items: center;
    height: 100%;
}

/* LEWO: Przyciski nawigacji */
.menu-items {
    justify-content: flex-start;
}

/* ŚRODEK: Napis "Witaj" */
.user-info {
    justify-content: center;
}

/* PRAWO: Przycisk Wyloguj */
.logout-wrapper {
    justify-content: flex-end;
}

/* ============================================================
   4. ELEMENTY MENU (PRZYCISKI I TEKST)
   ============================================================ */
.nav-button {
    appearance: none;
    -webkit-appearance: none;
    outline: none;
    background: transparent;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #888;
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 13px;
    height: 65px;
    padding: 0 25px;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
    white-space: nowrap;
}

.nav-button:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
}

.nav-button.active {
    color: var(--gold) !important;
    border-bottom: 3px solid var(--gold) !important;
    background: rgba(255, 202, 40, 0.05);
}

.welcome-text {
    font-size: 14px;
    color: #aaa;
    white-space: nowrap;
}

.welcome-text b {
    color: var(--gold);
}

.logout-link {
    background: rgba(255, 68, 68, 0.1);
    color: #ff4444;
    text-decoration: none;
    padding: 8px 18px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: bold;
    border: 1px solid rgba(255, 68, 68, 0.2);
    white-space: nowrap;
    transition: 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.logout-link:hover {
    background: #ff4444;
    color: white;
}

/* ============================================================
   5. KARTY, TABELE I FORMULARZE
   ============================================================ */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}

.card-header {
    color: var(--gold);
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 15px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 5px;
}

th {
    color: var(--text-muted);
    font-size: 11px;
    text-transform: uppercase;
    padding: 10px;
    text-align: left;
}

td {
    background: rgba(255, 255, 255, 0.03);
    padding: 12px 10px;
    font-size: 0.9rem;
}

tr:hover td {
    background: rgba(255, 255, 255, 0.07);
}

input[type="text"], input[type="number"], input[type="date"] {
    background: var(--bg-input);
    border: 1px solid var(--border);
    color: #fff;
    padding: 8px 12px;
    border-radius: 6px;
    font-family: inherit;
}

input:focus {
    outline: none;
    border-color: var(--gold);
}

/* Podświetlenie wierszy (np. Twojego wiersza) */
tr.row-me td, tr[style*="background"] td {
    background: rgba(255, 202, 40, 0.1) !important;
    color: var(--gold);
    font-weight: bold;
}

/* Dodatkowe style dla formularzy admina w tabelach */
.edit-input {
    background: var(--bg-input);
    border: 1px solid var(--border);
    color: #fff;
    padding: 5px 8px;
    border-radius: 4px;
    width: 100%;
    font-family: inherit;
    font-size: 13px;
}

.edit-input:focus {
    border-color: var(--gold);
    outline: none;
}

/* Przyciski akcji w tabelach */
.btn-update, .btn-action {
    background: #2e7d32;
    color: white;
    border: none;
    padding: 5px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
    transition: 0.3s;
}

.btn-update:hover { background: #388e3c; }

.btn-del {
    color: var(--danger);
    text-decoration: none;
    font-weight: bold;
    font-size: 11px;
    margin-left: 10px;
}

/* Toolbar w panelu admina */
.toolbar {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
}

.toolbar .btn-nav {
    background: #333;
    color: #fff;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: bold;
    border: 1px solid var(--border);
    transition: 0.3s;
}

.toolbar .btn-nav:hover {
    border-color: var(--gold);
    background: #444;
}


/* SUB-NAVBAR (Podmenu w adminie) */
.sub-navbar {
    background: #1a1a1a;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid var(--border);
}

.sub-button {
    background: #252525;
    color: #888;
    border: 1px solid var(--border);
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    transition: 0.3s;
}

.sub-button:hover {
    border-color: var(--gold);
    color: #fff;
}

.sub-button.active {
    background: var(--gold);
    color: #000;
    border-color: var(--gold);
}

/* Styl dla przycisków akcji w tabelach (Edytuj/Usuń) */
.btn-edit { color: #4caf50; text-decoration: none; font-weight: bold; }
.btn-delete { color: var(--danger); text-decoration: none; font-weight: bold; margin-left: 10px; }

.nav-button {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #888;
    padding: 0 25px;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    height: 65px;
    border-bottom: 3px solid transparent;
    transition: 0.3s;
    text-decoration: none; /* Usuwa podkreślenie linku */
}

.nav-button:hover {
    color: #fff;
    background: rgba(255,255,255,0.05);
}

.nav-button.active {
    color: var(--gold);
    border-bottom: 3px solid var(--gold);
}