* { box-sizing: border-box; }

/* --- Layout z sidebarem po lewej --- */
.layout { display: flex; gap: 2em; max-width: 1280px; margin: 2em auto; padding: 0 1em; }
.layout .sidebar { width: 160px; flex-shrink: 0; }
.layout .content { flex: 1; }

/* --- Look platformy morele — spójny ze stylem managera --- */
body { font: 16px/1.4 system-ui, sans-serif; color: #222; }
a { color: #2563eb; }

/* Sidebar - prosty, jak linki w menu */
.sidebar { display: flex; flex-direction: column; gap: 1em; padding-top: 1em; }
.sidebar .item {
    display: block;
    color: #666;
    text-decoration: none;
    font-size: .95em;
}
.sidebar .item:hover { text-decoration: underline; }
.sidebar .item.active { color: #2563eb; font-weight: 600; }

/* Nagłówek platformowy (jak header.top managera) */
header.top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5em; padding-bottom: 1em; border-bottom: 1px solid #eee; }
header.top h1 { margin: 0; font-size: 1.05em; font-weight: 600; }
header.top h1 a { color: #2563eb; text-decoration: none; }
header.top h1 a:hover { text-decoration: underline; }
header.top .left { display: flex; align-items: baseline; gap: 1.5em; }
header.top .menu { display: flex; gap: 1em; }
header.top .menu a { color: #2563eb; text-decoration: none; font-size: .9em; }
header.top .menu a:hover { text-decoration: underline; }
header.top .right { display: flex; align-items: center; gap: 1em; }
header.top .who { color: #666; font-size: .9em; }
header.top a.logout { color: #666; text-decoration: none; font-size: .9em; }
header.top a.logout:hover { color: #c00; }

/* Typografia */
h1.page-title, .page-title { margin: 0 0 .5em; font-size: 1.6em; font-weight: 700; color: #222; line-height: 1.2; }
h2 { font-size: 1.05em; margin: 1.5em 0 .8em; color: #444; font-weight: 600; }
.meta { color: #666; font-size: .9em; margin-bottom: 1.5em; }
.error { background: #fee; color: #c00; padding: 1em; border-radius: 4px; margin-bottom: 1em; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; background: #f4f4f4; padding: .1em .35em; border-radius: 3px; font-size: .9em; }
ul { padding-left: 1.4em; }
li { margin: .3em 0; }
small { color: #999; }

/* Akcenty hello-world w palecie managera */
.big-number { font-size: 2.8em; font-weight: 700; margin: .3em 0 .2em; color: #2563eb; }
blockquote { margin: 1.2em 0; padding: 1em 1.3em; background: #f6f7f9; border-left: 4px solid #2563eb; font-size: 1.1em; border-radius: 0 6px 6px 0; }

/* Formularze/przyciski — jeden standard jak w managerze */
input, select, textarea, button, .btn { font-family: inherit; font-size: .95em; line-height: 1.3; border-radius: 5px; box-sizing: border-box; }
input, select, textarea { padding: .45em .7em; border: 1px solid #ccc; background: #fff; color: #222; }
/* Select: własna strzałka (appearance:none) — natywna jest ściśnięta przy prawej krawędzi,
   a padding-right nie kontroluje odstępu strzałka→krawędź. Dajemy jej oddech (right .7em). WAŻNE. */
select {
    appearance: none; -webkit-appearance: none;
    padding-right: 2em;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23888' stroke-width='1.6'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right .7em center; background-size: .8em;
}
button, .btn { padding: .45em 1em; border: 1px solid #2563eb; background: #2563eb; color: #fff; cursor: pointer; text-decoration: none; display: inline-block; }
button:hover, .btn:hover { background: #1d4ed8; border-color: #1d4ed8; }
button:disabled { opacity: .5; cursor: not-allowed; }

/* --- Interaktywne widgety (Alpine.js) --- */
[x-cloak] { display: none; }
.muted { color: #888; font-size: .85em; }

/* Tabele - prosty styl */
table { width: 100%; border-collapse: collapse; margin: 1em 0; font-size: .95em; }
th, td { padding: .4em .6em; border-bottom: 1px solid #eee; text-align: left; }
th { font-weight: 600; }
tr:hover { background: #f8f9fa; }
