/* ----- RESET & OSNOVNO ----- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --gold: #d4af37;
    --gold-light: #f0e0a0;
    --glass-white: rgba(255, 255, 255, 0.2);
    --glass-border: rgba(255, 255, 255, 0.4);
    --shadow-glass: 0 8px 32px rgba(0, 0, 0, 0.15);
    --font-serif: 'Playfair Display', serif;
    --font-sans: 'Inter', sans-serif;
}

body {
    font-family: var(--font-sans);
    color: #1a2a3a;
    min-height: 100vh;
    background: #f4efe6;
    overflow-x: hidden;
    padding: 20px;
}

/* ----- ANIMIRANO OZADJE (povzeto po muzej.td-polhovgradec.si) ----- */
.bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    background: linear-gradient(135deg, #d4c5a0 0%, #f4efe6 30%, #c4d5e8 70%, #e8dcc8 100%);
    background-size: 400% 400%;
    animation: gradientShift 18s ease infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Lebdeče steklene krogle (dekoracija) */
.glass-orb {
    position: fixed;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0.05));
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 0 60px rgba(212, 175, 55, 0.1);
    z-index: -1;
    pointer-events: none;
    animation: floatOrb 12s infinite alternate ease-in-out;
}
.orb1 { width: 300px; height: 300px; top: -50px; left: -100px; }
.orb2 { width: 200px; height: 200px; bottom: 100px; right: -50px; animation-delay: 3s; }
.orb3 { width: 150px; height: 150px; top: 40%; right: 10%; animation-delay: 6s; }

@keyframes floatOrb {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(30px, -40px) scale(1.1); }
}

/* ----- STEKLENI (GLASS) KOMPONENTI ----- */
.glass {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border: 1px solid var(--glass-border);
    border-radius: 2rem;
    box-shadow: var(--shadow-glass), inset 0 0 0 1px rgba(255, 255, 255, 0.4);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.glass-dark {
    background: rgba(26, 42, 58, 0.15);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 2rem;
    box-shadow: var(--shadow-glass);
    color: #1a2a3a;
}

/* ----- PRIJAVA (login) ----- */
.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: #d9c8b2;
}

.login-container {
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(30px) saturate(180%);
    -webkit-backdrop-filter: blur(30px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 2rem;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3), inset 0 0 0 1px rgba(255, 255, 255, 0.3);
    padding: 40px 50px;
    max-width: 400px;
    width: 100%;
    text-align: center;
}

.login-container h1 {
    font-family: var(--font-serif);
    font-size: 2rem;
    color: #6b4c2a;
    margin-bottom: 5px;
}

.login-container h2 {
    font-size: 1.2rem;
    font-weight: normal;
    color: #5a4030;
    margin-bottom: 25px;
}

/* ----- DASHBOARD (admin/poweruser) ----- */
.dashboard {
    max-width: 1200px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 2rem;
    box-shadow: var(--shadow-glass), inset 0 0 0 1px rgba(255, 255, 255, 0.4);
    padding: 30px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 30px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.3);
    padding-bottom: 20px;
}

.dashboard-header h1 {
    font-family: var(--font-serif);
    font-size: 2.2rem;
    color: #4d2f1a;
}

.user-info {
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.3);
    padding: 8px 18px;
    border-radius: 30px;
}

/* ----- STATISTIKA ----- */
.stats {
    display: flex;
    gap: 30px;
    background: rgba(255, 255, 255, 0.3);
    padding: 20px 30px;
    border-radius: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.stat-number {
    font-size: 2rem;
    font-weight: bold;
    color: #3e2c1b;
}

.stat-label {
    font-size: 1rem;
    color: #5a4030;
}

/* ----- GUMBI (AKCIJE) ----- */
.action-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
    margin-bottom: 40px;
}

.action-btn {
    display: inline-block;
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #3e2c1b;
    padding: 15px 10px;
    border-radius: 12px;
    text-align: center;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.2s, transform 0.1s;
    border: 1px solid rgba(255, 255, 255, 0.4);
}
.action-btn:hover {
    background: rgba(255, 255, 255, 0.6);
    transform: translateY(-2px);
}

.action-btn.danger {
    background: rgba(245, 214, 214, 0.5);
    border-color: rgba(212, 160, 160, 0.5);
}
.action-btn.danger:hover {
    background: rgba(236, 196, 196, 0.7);
}

button.action-btn {
    cursor: pointer;
    font-size: 1rem;
    font-family: var(--font-sans);
    width: 100%;
}

/* ----- TABELA ----- */
.table-container {
    overflow-x: auto;
    margin-top: 20px;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

th {
    background: rgba(26, 42, 58, 0.8);
    color: white;
    font-weight: 600;
    padding: 12px 15px;
    text-align: left;
}

td {
    padding: 12px 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    vertical-align: middle;
}

tr:hover {
    background: rgba(255, 255, 255, 0.2);
}

img.thumbnail {
    max-width: 60px;
    max-height: 60px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* ----- ISKALNIK ----- */
.search-box {
    margin: 20px 0;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.search-box input[type="text"] {
    flex: 1;
    min-width: 200px;
    padding: 10px 15px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 30px;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.search-box input[type="text"]:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.2);
}

/* ----- MAJHNI GUMBI (v tabeli) ----- */
.btn-sm {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    border: none;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: background 0.2s;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.btn-edit {
    background: rgba(212, 196, 176, 0.6);
    color: #3e2c1b;
}
.btn-edit:hover { background: rgba(196, 178, 156, 0.8); }

.btn-delete {
    background: rgba(212, 160, 160, 0.6);
    color: #5a1e1e;
}
.btn-delete:hover { background: rgba(196, 138, 138, 0.8); }

.btn-view {
    background: rgba(184, 196, 176, 0.6);
    color: #2a3e1b;
}
.btn-view:hover { background: rgba(168, 184, 156, 0.8); }

.btn-export {
    background: rgba(107, 140, 107, 0.7);
    color: white;
}
.btn-export:hover { background: rgba(90, 122, 90, 0.9); }

/* ----- OBRAZCI ----- */
.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
    color: #4d3824;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 8px;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.2);
}

/* ----- GLAVNI GUMBI (obrazci) ----- */
button[type="submit"],
button[type="button"] {
    background: rgba(26, 42, 58, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 12px 25px;
    border-radius: 30px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s, transform 0.1s;
    width: 100%;
}

button[type="submit"]:hover,
button[type="button"]:hover {
    background: #1a2a3a;
}

button[type="submit"]:active,
button[type="button"]:active {
    transform: scale(0.97);
}

/* ----- POVEZAVA NAZAJ (bolj opazen) ----- */
.back-link {
    display: inline-block;
    margin: 20px 0;
    padding: 10px 25px;
    background: rgba(26, 42, 58, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: white !important;
    text-decoration: none;
    font-weight: bold;
    border-radius: 30px;
    transition: background 0.3s;
    font-size: 1.1rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
}
.back-link:hover {
    background: #1a2a3a;
    text-decoration: none;
}

/* ----- PODROBNOSTI PREDMETA ----- */
.detail-container {
    max-width: 800px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 2rem;
    box-shadow: var(--shadow-glass), inset 0 0 0 1px rgba(255, 255, 255, 0.4);
    padding: 30px;
}

.detail-image {
    max-width: 100%;
    max-height: 400px;
    border-radius: 12px;
    margin: 20px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* ----- NAVIGACIJA (naprej/nazaj) ----- */
.nav-buttons {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 20px 0;
}
.nav-btn {
    background: rgba(26, 42, 58, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: white;
    padding: 10px 20px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: bold;
    transition: background 0.3s;
    display: inline-block;
    border: 1px solid rgba(255, 255, 255, 0.2);
}
.nav-btn:hover {
    background: #1a2a3a;
}

/* ----- SPOROČILA O NAPAKAH ----- */
.error-msg {
    background: rgba(248, 215, 218, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #721c24;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #f5c6cb;
}

/* ----- UPORABNIKI (obrazec) ----- */
.user-form {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
}
.user-form input,
.user-form button {
    padding: 10px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
.user-form button {
    background: rgba(26, 42, 58, 0.8);
    color: white;
    border: none;
    cursor: pointer;
    font-weight: bold;
}
.user-form button:hover {
    background: #1a2a3a;
}

.reset-form {
    display: inline-flex;
    gap: 5px;
    align-items: center;
}
.reset-form input {
    width: 120px;
    padding: 5px;
    border-radius: 5px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.3);
}
.reset-form button {
    background: rgba(212, 160, 160, 0.6);
    color: #5a1e1e;
    border: none;
    padding: 5px 10px;
    border-radius: 5px;
    cursor: pointer;
}
.reset-form button:hover {
    background: rgba(196, 138, 138, 0.8);
}

/* ----- RESPONSIVE (mobilni način) ----- */
@media (max-width: 768px) {
    body { padding: 10px; }
    .dashboard { padding: 15px; }
    .login-container { padding: 30px 20px; }
    .dashboard-header h1 { font-size: 1.5rem; }
    .action-grid { grid-template-columns: 1fr; }
    .stats { flex-direction: column; gap: 10px; align-items: center; }
    .user-form { flex-direction: column; align-items: stretch; }
    .reset-form { flex-wrap: wrap; }
    .reset-form input { width: 100%; }
    .orb1, .orb2, .orb3 { display: none; }
}

/* Popravek za login stran - napis malo nižje */
.note {
    margin-top: 20px;
}