/* ===========================================================================
   Administration styles (builds on style.css variables).
   =========================================================================== */

.admin { background: #f4f1e9; }

.admin-bar { background: var(--color-ink); color: #fff; }
.admin-bar__inner {
    max-width: 1200px; margin-inline: auto; padding: 10px 18px;
    display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
}
.admin-bar__brand { color: var(--color-honey); font-weight: 800; text-decoration: none; }

.admin-nav { display: flex; gap: 4px; flex-wrap: wrap; flex: 1; }
.admin-nav a {
    color: #eee; text-decoration: none; padding: 8px 12px;
    border-radius: 8px; font-weight: 600;
}
.admin-nav a:hover { background: rgba(255,255,255,.1); }
.admin-nav a.is-active { background: var(--color-honey); color: var(--color-ink); }

.admin-bar__user { display: flex; align-items: center; gap: 12px; font-size: .9rem; }
.admin-bar__user span { color: #cfc9b8; }
.admin-bar__user a { color: var(--color-honey); text-decoration: none; }

.admin-main { padding: 28px 0 60px; }
.admin-container { max-width: 1000px; margin-inline: auto; padding-inline: 18px; }

.admin-container h1 { font-size: 1.7rem; }

.admin-toolbar {
    display: flex; justify-content: space-between; align-items: center;
    gap: 12px; margin-bottom: 20px; flex-wrap: wrap;
}

/* Cards / panels */
.panel {
    background: #fff; border: 1px solid var(--color-border);
    border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow);
}

/* Tables */
.table { width: 100%; border-collapse: collapse; background: #fff;
    border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.table th, .table td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--color-border); }
.table th { background: var(--color-amber); font-size: .85rem; text-transform: uppercase; letter-spacing: .5px; }
.table tr:last-child td { border-bottom: 0; }
.table .actions { white-space: nowrap; text-align: right; }
.table a { text-decoration: none; font-weight: 600; }

.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .8rem; font-weight: 700; }
.badge--on  { background: #e6f6e6; color: #1d6b1d; }
.badge--off { background: #f0ecdf; color: #8a7a3a; }

/* Forms */
.form-row { margin-bottom: 18px; }
.form-row label { display: block; font-weight: 700; margin-bottom: 6px; }
.form-row .hint { color: var(--color-muted); font-size: .85rem; font-weight: 400; }
.input, .textarea, .select {
    width: 100%; padding: 11px 13px; font: inherit;
    border: 1px solid #ccc6b4; border-radius: var(--radius-sm); background: #fff;
}
.input:focus, .textarea:focus, .select:focus {
    outline: 2px solid var(--color-honey); border-color: var(--color-honey);
}
.textarea { min-height: 220px; resize: vertical; }

.form-actions { display: flex; gap: 12px; align-items: center; margin-top: 24px; }

.current-file { margin-top: 8px; font-size: .9rem; }
.current-file img { max-height: 90px; border-radius: 6px; margin-top: 6px; }

/* Login */
.login-wrap { max-width: 380px; margin: 8vh auto; }
.login-wrap h1 { text-align: center; }
.login-logo { text-align: center; font-size: 2.6rem; margin-bottom: 6px; }
.login-logo img { width: 150px; height: auto; margin: 0 auto; }

/* Dashboard tiles */
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 24px; }
.tile {
    background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius);
    padding: 22px 20px; box-shadow: var(--shadow);
    text-decoration: none; color: inherit; display: block;
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.tile:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--color-honey); }
.tile__icon { font-size: 1.4rem; margin-bottom: 8px; }
.tile__num { font-size: 2rem; font-weight: 800; color: var(--color-honey-dark); line-height: 1; }
.tile__label { color: var(--color-muted); margin-top: 4px; font-size: .9rem; }

/* Quill editor */
#body-editor {
    min-height: 320px;
    border: 1px solid var(--color-border);
    border-radius: 0 0 var(--radius) var(--radius);
    background: #fff;
    font-family: var(--font-body);
    font-size: 1rem;
}
.ql-toolbar {
    border: 1px solid var(--color-border) !important;
    border-radius: var(--radius) var(--radius) 0 0 !important;
    background: #faf8f2;
    font-family: var(--font-body) !important;
}
.ql-container { font-size: 1rem !important; }
.ql-editor { min-height: 280px; line-height: 1.7; }

.btn--danger { background: #e74c3c; border-color: #e74c3c; color: #fff; }
.btn--danger:hover { background: #c0392b; border-color: #c0392b; color: #fff; }
.btn--small { padding: 6px 14px; font-size: .9rem; }
.link-danger { color: #c0392b !important; }

/* Album panels (fotky.php, album-edit.php) */
.album-panel__head {
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; gap: 10px;
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--color-border);
}
.album-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 8px;
    margin-top: 12px;
}
.album-grid__item {
    position: relative; border-radius: 6px; overflow: hidden;
    aspect-ratio: 1; background: #eee;
}
.album-grid__item img {
    width: 100%; height: 100%; object-fit: cover; display: block;
}
.album-grid__item form {
    position: absolute; top: 4px; right: 4px; opacity: 0;
    transition: opacity .15s;
}
.album-grid__item:hover form { opacity: 1; }

@media (min-width: 620px) {
    .tiles { grid-template-columns: repeat(4, 1fr); }
}
