/* base.css - wspólne style dla całego serwisu */

/* Reset + typografia */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--theme-bg);
    color: var(--theme-text);
}

/* Layout */
header {
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--theme-surface);
    border-bottom: 1px solid var(--theme-border);
}

main {
    padding: 2rem;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.groups-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.modal {
    position: fixed;
    inset: 0;
    background: var(--theme-overlay-soft, var(--theme-overlay));
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal.hidden {
    display: none;
}

.modal-content.cycle-access-modal-content {
    width: min(520px, calc(100vw - 2rem));
    text-align: center;
}

.cycle-access-modal-text strong {
    display: block;
    margin-bottom: 0.65rem;
    font-size: 1.1rem;
}

.cycle-access-modal-text span {
    display: block;
    line-height: 1.55;
    color: var(--theme-muted, var(--theme-text));
}

.cycle-access-modal-actions {
    flex-wrap: wrap;
}

.admin-form-fieldset-disabled {
    border: 0;
    margin: 0;
    padding: 0;
}

.admin-form-fieldset-disabled > * {
    opacity: 0.64;
}

/* Karty / boxy */
.card, .group-box, .modal-content {
    padding: 1.2rem;
    border-radius: 12px;
    backdrop-filter: blur(10px);
    margin-bottom: 1.5rem;
    background: var(--theme-surface-glass);
    border: 1px solid var(--theme-surface-border);
}

/* Tabele */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    border-radius: 10px;
    overflow: hidden;
    background: var(--theme-surface);
}

thead {
    font-weight: 600;
    background: var(--theme-surface-muted);
}

th, td {
    padding: 0.8rem 1rem;
    text-align: left;
}

tbody tr:hover {
    filter: brightness(1.05);
}
tbody tr:nth-child(even) {
    background: var(--theme-surface-alt);
}

/* Przyciski */
button, .btn {
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    background: var(--theme-accent);
    color: var(--theme-on-accent, #fff);
    transition: 0.2s;
}
button:hover, .btn:hover {
    background: var(--theme-accent-hover);
    transform: scale(1.05);
}

button:disabled,
.btn[aria-disabled="true"] {
    cursor: not-allowed;
    opacity: 0.58;
    transform: none;
}

button:disabled:hover,
.btn[aria-disabled="true"]:hover {
    background: var(--theme-accent);
    transform: none;
}

/* Linki */
a {
    text-decoration: none;
    font-weight: 600;
    color: var(--theme-accent);
}
a:hover {
    color: var(--theme-accent-hover);
}

/* Utility classes */
.fade-in {
    animation: fadeIn 0.6s ease-out;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

.hover-scale {
    transition: transform 0.2s ease, filter 0.2s ease;
}
.hover-scale:hover {
    transform: scale(1.03);
    filter: brightness(1.1);
}
