:root {
    --green: #8ebe21;
    --green-dark: #6f9a18;
    --green-light: #a8d44a;
    --navy: #275671;
    --navy-dark: #1a3d4f;
    --navy-light: #3a7a9e;
    --bg: #eef2f6;
    --bg-soft: #f7f9fc;
    --white: #ffffff;
    --border: #dde5ee;
    --border-soft: #e8eef4;
    --text: #275671;
    --text-muted: #6b8499;
    --success: #1f9d63;
    --error: #e25555;
    --warning: #e8a020;
    --shadow-sm: 0 2px 8px rgba(39, 86, 113, 0.06);
    --shadow: 0 8px 32px rgba(39, 86, 113, 0.1);
    --shadow-lg: 0 20px 50px rgba(39, 86, 113, 0.14);
    --radius: 16px;
    --radius-sm: 10px;
    --font: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --sidebar-w: 280px;
    --transition: 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    font-family: var(--font);
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* ===== LOGIN ===== */
.login-body {
    min-height: 100vh;
    background: #ffffff;
}

.login-split {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 40px;
    background: #ffffff;
}

.login-content {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(475px, 725px) minmax(600px, 812px);
    gap: clamp(75px, 8vw, 138px);
    align-items: center;
    width: auto;
    max-width: 1600px;
}

.login-split-bg {
    position: absolute;
    inset: 0;
    background-color: #3d1a6e;
    background-size: cover;
    background-position: left center;
    background-repeat: no-repeat;
    z-index: 0;
}

.login-split-fade {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(
        90deg,
        rgba(25, 8, 50, 0.42) 0%,
        rgba(45, 15, 85, 0.22) 30%,
        rgba(120, 60, 160, 0.08) 48%,
        rgba(220, 200, 235, 0.4) 58%,
        rgba(255, 255, 255, 0.85) 68%,
        #ffffff 78%,
        #ffffff 100%
    );
    pointer-events: none;
}

.login-left {
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.login-brand {
    color: #ffffff;
    max-width: 750px;
}

.login-brand-logo {
    max-height: 203px;
    max-width: 625px;
    margin-bottom: 50px;
    object-fit: contain;
}

.login-brand h1 {
    font-size: 3.9rem;
    font-weight: 800;
    margin-bottom: 25px;
    letter-spacing: -0.02em;
    line-height: 1.15;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.18);
}

.login-brand p {
    font-size: 1.75rem;
    line-height: 1.7;
    opacity: 0.94;
    margin-bottom: 45px;
}

.login-features {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 23px;
}

.login-features li {
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: 1.625rem;
    opacity: 0.95;
}

.login-features li::before {
    content: '';
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 14px rgba(142, 190, 33, 0.7);
    flex-shrink: 0;
}

.login-right {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    background: transparent;
}

.login-card {
    width: 100%;
    max-width: 812px;
    background: #ffffff;
    border-radius: 35px;
    padding: 88px 80px 94px;
    box-shadow: 0 30px 90px rgba(39, 86, 113, 0.12), 0 10px 25px rgba(39, 86, 113, 0.06);
    border: 1px solid var(--border-soft);
}

.login-card h2 {
    font-size: 3.375rem;
    font-weight: 800;
    color: var(--navy);
    margin-bottom: 15px;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.login-subtitle {
    color: var(--text-muted);
    margin-bottom: 60px;
    font-size: 1.625rem;
    line-height: 1.5;
}

.login-form .form-group {
    margin-bottom: 35px;
}

.login-form .form-group label {
    font-size: 1.25rem;
    margin-bottom: 15px;
    letter-spacing: 0.04em;
}

.login-form .form-group input {
    padding: 25px 28px;
    font-size: 1.625rem;
    background: #f8fafb;
    border-radius: 18px;
}

.login-form .btn {
    margin-top: 25px;
    padding: 26px 35px;
    font-size: 1.625rem;
    border-radius: 18px;
}

.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--green), var(--green-dark));
    color: #fff;
    font-weight: 800;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    margin-bottom: 20px;
}

.brand-mark-lg {
    width: 72px;
    height: 72px;
    font-size: 1.1rem;
    border-radius: 20px;
    margin-bottom: 28px;
}

/* ===== APP LAYOUT ===== */
.app {
    display: flex;
    min-height: 100vh;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(26, 61, 79, 0.5);
    backdrop-filter: blur(4px);
    z-index: 199;
    opacity: 0;
    transition: opacity var(--transition);
}

.sidebar-overlay.active {
    display: block;
    opacity: 1;
}

.sidebar {
    width: var(--sidebar-w);
    background-color: #3d1a6e;
    background-image: url(../images/login-left-bg.png);
    background-size: cover;
    background-position: left;
    background-repeat: no-repeat;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 200;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.12);
}

.sidebar-brand {
    padding: 28px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    text-align: center;
}

.sidebar-logo {
    max-height: 88px;
    max-width: 360px;
    object-fit: contain;
}

.sidebar-title {
    display: block;
    font-weight: 700;
    color: var(--navy);
    font-size: 0.95rem;
    margin-top: 8px;
}

.sidebar-nav {
    flex: 1;
    padding: 20px 14px;
    overflow-y: auto;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 13px 16px;
    border-radius: var(--radius-sm);
    color: #ffffff;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    margin-bottom: 4px;
    transition: all var(--transition);
    position: relative;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    transform: translateX(2px);
}

.nav-link.active {
    background: #72a11a;
    color: #fff;
    font-weight: 600;
    box-shadow: 0 2px 10px rgba(114, 161, 26, 0.35);
}

.nav-icon {
    width: 22px;
    text-align: center;
    flex-shrink: 0;
}

.nav-icon i {
    font-size: 0.95rem;
    color: #ffffff;
    opacity: 0.85;
    transition: opacity var(--transition), color var(--transition);
}

.nav-link:hover .nav-icon i {
    color: #ffffff;
    opacity: 1;
}

.nav-link.active .nav-icon i {
    color: #fff;
}

.sidebar-footer {
    padding: 20px 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.3);
}

.user-card {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 14px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.94);
    border-radius: var(--radius-sm);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.user-avatar {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--green), var(--green-dark));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.user-info {
    min-width: 0;
}

.user-info strong {
    display: block;
    color: var(--navy);
    font-size: 0.88rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-info small {
    display: block;
    color: var(--text-muted);
    font-size: 0.75rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.role-badge {
    display: inline-block;
    margin-top: 4px;
    padding: 2px 8px;
    border-radius: 20px;
    background: rgba(114, 161, 26, 0.15);
    color: #5a8015;
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.sidebar-footer .btn-ghost {
    background: rgba(255, 255, 255, 0.22);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.45);
}

.sidebar-footer .btn-ghost:hover {
    background: rgba(255, 255, 255, 0.32);
    color: #fff;
}

.main {
    flex: 1;
    margin-left: var(--sidebar-w);
    min-height: 100vh;
    background: #ffffff;
}

.page-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 28px 36px 0;
}

.page-eyebrow {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--green);
    margin-bottom: 4px;
}

.page-header h1 {
    font-size: 1.85rem;
    font-weight: 800;
    color: var(--navy);
    letter-spacing: -0.02em;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 10px;
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--navy);
    border-radius: 2px;
    transition: var(--transition);
}

.page-content {
    padding: 24px 36px 40px;
}

/* ===== ALERTS ===== */
.alert {
    margin: 0 36px 0;
    padding: 14px 20px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideDown 0.3s ease;
    margin: 0 !important;
    margin-bottom: 20px !important;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.alert-success {
    background: rgba(31, 157, 99, 0.1);
    color: var(--success);
    border: 1px solid rgba(31, 157, 99, 0.25);
}

.alert-error {
    background: rgba(226, 85, 85, 0.1);
    color: var(--error);
    border: 1px solid rgba(226, 85, 85, 0.25);
    margin: 0 !important;
    margin-bottom: 20px !important;
}

.alert-info {
    background: rgba(52, 152, 219, 0.1);
    color: #2980b9;
    border: 1px solid rgba(52, 152, 219, 0.25);
    margin: 0 36px 20px !important;
}

.firma-picker-card {
    margin-bottom: 24px;
}

.firma-picker-lead {
    margin: -8px 0 18px;
}

.firma-picker-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    align-items: stretch;
}

.firma-picker-col {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.firma-picker-col-title {
    margin: 0 0 12px;
    color: var(--navy);
    font-size: 0.95rem;
    font-weight: 700;
}

.firma-picker-col .firma-search-field {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 342px;
    max-height: 342px;
}

.firma-search-input-wrap {
    position: relative;
}

.firma-assignment-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 360px;
    overflow-y: auto;
    padding: 6px;
    border: 1.5px solid var(--border-soft);
    border-radius: var(--radius);
    background: linear-gradient(180deg, #f8fafb 0%, #fff 100%);
}

.firma-assignment-section {
    width: 100%;
    margin: 4px 0 24px;
    padding-top: 22px;
    border-top: 1px solid var(--border-soft);
}

.firma-assignment-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}

.firma-assignment-title {
    display: block;
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 6px;
    color: var(--navy);
}

.firma-assignment-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.firma-assignment-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border: 1.5px solid var(--border-soft);
    border-radius: var(--radius-sm);
    background: var(--white);
    cursor: pointer;
    transition: border-color var(--transition), background var(--transition), box-shadow var(--transition);
}

.firma-assignment-card:hover {
    border-color: rgba(142, 190, 33, 0.45);
    background: #f8fafb;
    box-shadow: 0 2px 8px rgba(39, 86, 113, 0.06);
}

.firma-assignment-card:has(.firma-assignment-checkbox:checked) {
    border-color: rgba(142, 190, 33, 0.75);
    background: rgba(142, 190, 33, 0.08);
    box-shadow: 0 2px 10px rgba(142, 190, 33, 0.12);
}

.firma-assignment-checkbox {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    margin: 0;
    accent-color: var(--green);
    cursor: pointer;
}

.firma-assignment-label {
    flex: 1;
    font-size: 0.92rem;
    line-height: 1.45;
    color: var(--text);
}

.firma-assignment-empty {
    margin: 0;
    padding: 20px 16px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.password-field-row {
    display: flex;
    gap: 8px;
}

.firma-picker-list {
    flex: 1;
    min-height: 342px;
    max-height: 342px;
    overflow-y: auto;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--white);
    display: flex;
    flex-direction: column;
}

.firma-picker-list-item {
    display: block;
    width: 100%;
    padding: 12px 16px;
    border: none;
    border-bottom: 1px solid var(--border-soft);
    background: transparent;
    text-align: left;
    font: inherit;
    font-size: 0.9rem;
    color: var(--text);
    cursor: pointer;
    transition: background var(--transition);
}

.firma-picker-list-item:last-child {
    border-bottom: none;
}

.firma-picker-list-item:hover,
.firma-picker-list-item.is-selected {
    background: rgba(39, 86, 113, 0.08);
    color: var(--navy);
}

.firma-picker-empty {
    padding: 16px;
    margin: 0;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.firma-picker-card .form-actions {
    margin-top: 16px;
}

.sukcesy-summary .badge {
    font-size: 0.85rem;
    padding: 8px 14px;
}

.sukcesy-filters {
    margin-bottom: 20px;
}

.sukcesy-card {
    margin-bottom: 24px;
}

.sukcesy-lead {
    margin: 0 0 18px;
}

.sukcesy-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sukcesy-row {
    display: grid;
    grid-template-columns: 36px 1fr auto;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    border: 1.5px solid var(--border-soft);
    border-radius: var(--radius-sm);
    background: #fff;
    transition: border-color var(--transition), background var(--transition), box-shadow var(--transition);
}

.sukcesy-row.is-success {
    border-color: rgba(142, 190, 33, 0.55);
    background: rgba(142, 190, 33, 0.07);
    box-shadow: 0 2px 10px rgba(142, 190, 33, 0.1);
}

.sukcesy-row.is-pending {
    border-color: var(--border-soft);
    background: #f8fafb;
}

.sukcesy-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    line-height: 1;
}

.sukcesy-row.is-success .sukcesy-icon {
    color: var(--green);
}

.sukcesy-row.is-pending .sukcesy-icon {
    color: #b8c5d0;
}

.sukcesy-label {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--navy);
    line-height: 1.4;
}

.sukcesy-status {
    font-size: 0.82rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.sukcesy-row.is-success .sukcesy-status {
    color: var(--green-dark);
}

.sukcesy-row.is-pending .sukcesy-status {
    color: var(--text-muted);
}

.firma-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.firma-row {
    padding: 14px;
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-sm);
    background: #f8fafb;
    align-items: end;
}

.firma-row-actions {
    display: flex;
    align-items: end;
}

.firma-choice-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 18px 0;
}

.firma-choice-item {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 14px 16px;
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-sm);
    background: #fff;
    cursor: pointer;
}

.firma-choice-item input {
    margin-top: 4px;
}

.firma-choice-body strong {
    display: block;
    color: var(--navy);
    margin-bottom: 4px;
}

.firma-choice-body small {
    display: block;
    color: var(--text-muted);
}

.sidebar-firma-switch {
    padding: 0 18px 18px;
}

.sidebar-firma-switch label {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.75);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.sidebar-firma-switch select {
    width: 100%;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.selected-firma-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.filters .firma-search-field {
    grid-column: 1 / -1;
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 22px;
    border: none;
    border-radius: var(--radius-sm);
    font-family: var(--font);
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all var(--transition);
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, var(--green), var(--green-dark));
    color: #fff;
    box-shadow: 0 4px 14px rgba(142, 190, 33, 0.35);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(142, 190, 33, 0.4);
}

.btn-secondary {
    background: var(--navy);
    color: #fff;
    box-shadow: 0 4px 14px rgba(39, 86, 113, 0.25);
}

.btn-secondary:hover {
    background: var(--navy-dark);
    transform: translateY(-2px);
}

.btn-accent {
    background: linear-gradient(135deg, #f5b731, #e8a020);
    color: #fff;
    box-shadow: 0 4px 14px rgba(232, 160, 32, 0.3);
}

.btn-outline {
    background: var(--white);
    border: 1.5px solid var(--border);
    color: var(--text);
}

.btn-outline:hover {
    border-color: var(--green);
    color: var(--green-dark);
    background: rgba(142, 190, 33, 0.04);
}

.btn-ghost {
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
}

.btn-danger {
    background: var(--error);
    color: #fff;
}

.btn-danger:hover {
    background: #c94444;
    transform: translateY(-1px);
}

.btn-sm { padding: 7px 14px; font-size: 0.8rem; }
.btn-block { width: 100%; }
.btn-group { display: flex; gap: 8px; flex-wrap: wrap; }

/* ===== FORMS ===== */
.form-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 28px 32px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-soft);
    margin-bottom: 24px;
    animation: fadeIn 0.35s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.form-card h3 {
    color: var(--navy);
    margin-bottom: 22px;
    font-size: 1.1rem;
    font-weight: 700;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 18px;
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-weight: 600;
    font-size: 0.82rem;
    margin-bottom: 8px;
    color: var(--navy);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: var(--font);
    font-size: 0.92rem;
    color: var(--text);
    background: var(--bg-soft);
    transition: all var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--green);
    background: var(--white);
    box-shadow: 0 0 0 4px rgba(142, 190, 33, 0.12);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #a0b4c4;
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 8px;
    flex-wrap: wrap;
}

.inline-form { display: inline; }

/* ===== TOOLBAR & FILTERS ===== */
.toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.toolbar p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.filters {
    background: var(--white);
    border-radius: var(--radius);
    padding: 22px 26px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-soft);
    margin-bottom: 24px;
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: flex-end;
}

.filters .form-group {
    margin-bottom: 0;
    flex: 1;
    min-width: 150px;
}

.field-hint {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin: 4px 0 10px;
}

.email-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.email-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.email-row input {
    flex: 1;
}

.btn-remove-email {
    min-width: 38px;
    padding-left: 0;
    padding-right: 0;
    font-size: 1.1rem;
    line-height: 1;
}

.simple-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.simple-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 14px;
    background: var(--bg-soft);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-soft);
}

.inline-toolbar {
    display: flex;
    gap: 12px;
    align-items: flex-end;
    flex-wrap: wrap;
}

/* ===== TABLE ===== */
.data-table {
    width: 100%;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border-soft);
    border-collapse: separate;
    border-spacing: 0;
    overflow: hidden;
}

.data-table th,
.data-table td {
    padding: 16px 20px;
    text-align: left;
    border-bottom: 1px solid var(--border-soft);
    font-size: 0.9rem;
}

.data-table th {
    background: linear-gradient(180deg, var(--bg-soft), #f0f4f8);
    color: var(--navy);
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.data-table tr:last-child td {
    border-bottom: none;
}

.data-table tbody tr {
    transition: background var(--transition);
}

.data-table tbody tr:hover td {
    background: rgba(142, 190, 33, 0.03);
}

/* ===== STRIPES (RAPORTY) ===== */
.stripes {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.stripe {
    display: flex;
    align-items: center;
    gap: 20px;
    background: var(--white);
    border-radius: var(--radius);
    padding: 20px 24px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-soft);
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
}

.stripe::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, var(--green), var(--green-dark));
    border-radius: 4px 0 0 4px;
}

.stripe:hover {
    box-shadow: var(--shadow);
    transform: translateY(-2px);
    border-color: rgba(142, 190, 33, 0.25);
}

.stripe-pending::before {
    background: linear-gradient(180deg, var(--warning), #d4920f);
}

.stripe-unpublished::before {
    background: linear-gradient(180deg, #3498db, #2980b9);
}

.stripe-publish-check {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.stripe-publish-check input {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.publish-toolbar {
    margin-bottom: 18px;
    padding: 16px 20px;
    background: var(--white);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

.publish-toolbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.publish-select-all {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    color: var(--text);
    cursor: pointer;
}

.publish-select-all input {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.publish-toolbar .form-hint {
    margin: 10px 0 0;
}

.publish-confirm-list {
    list-style: none;
    margin: 18px 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 280px;
    overflow-y: auto;
}

.publish-confirm-list li {
    padding: 12px 14px;
    border: 1px solid var(--border-soft);
    border-radius: 10px;
    background: #f8fafb;
}

.publish-confirm-list strong {
    display: block;
    color: var(--navy);
    margin-bottom: 4px;
}

.publish-confirm-list span {
    display: block;
    font-size: 0.9rem;
    color: #5f7385;
}

.stripe-left {
    display: flex;
    align-items: center;
    gap: 18px;
    flex: 1;
    min-width: 0;
}

.stripe-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, rgba(142, 190, 33, 0.12), rgba(142, 190, 33, 0.04));
    border-radius: 14px;
    flex-shrink: 0;
}

.stripe-day {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--navy);
    line-height: 1;
}

.stripe-month {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--green-dark);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stripe-info strong {
    display: block;
    font-size: 0.95rem;
    color: var(--navy);
    margin-bottom: 4px;
}

.stripe-info small {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.stripe-files {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
    min-width: 0;
    max-width: 420px;
}

.stripe-file-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: var(--bg-soft);
    border-radius: var(--radius-sm);
}

.stripe-file-name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.88rem;
    color: var(--text-muted);
}

.stripe-file-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
    flex-wrap: wrap;
}

.existing-files-list {
    margin: 0;
    padding: 0 0 0 18px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.stripe-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
    flex-shrink: 0;
    margin-left: auto;
}

.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 600;
    margin-top: 6px;
}

.badge-warning {
    background: rgba(232, 160, 32, 0.12);
    color: var(--warning);
}

.badge-success {
    background: rgba(31, 157, 99, 0.12);
    color: var(--success);
}

.badge-info {
    background: rgba(39, 86, 113, 0.1);
    color: var(--navy);
}

.odczytanie-quick-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin: 0 0 20px;
    padding: 14px 16px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.odczytanie-quick-filters-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-right: 4px;
}

.odczytanie-quick-filters-label-spaced {
    margin-left: 12px;
    padding-left: 12px;
    border-left: 1px solid var(--border);
}

.odczytanie-quick-filters .btn.is-active {
    border-color: var(--navy);
    background: rgba(39, 86, 113, 0.08);
    color: var(--navy);
}

.odczytanie-quick-filters .btn-filter-success.is-active {
    border-color: var(--success);
    background: rgba(31, 157, 99, 0.12);
    color: var(--success);
}

.odczytanie-quick-filters .btn-filter-warning.is-active {
    border-color: var(--warning);
    background: rgba(232, 160, 32, 0.12);
    color: var(--warning);
}

/* ===== SEARCH ===== */
.search-box { position: relative; }

.search-results {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: var(--white);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    max-height: 220px;
    overflow-y: auto;
    z-index: 50;
    display: none;
    box-shadow: var(--shadow);
}

.search-results.active { display: block; }

.search-results div {
    padding: 12px 16px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background var(--transition);
}

.search-results div:hover {
    background: rgba(142, 190, 33, 0.08);
    color: var(--green-dark);
}

/* ===== DROPZONE ===== */
.dropzone {
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    padding: 48px 24px;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition);
    background: linear-gradient(180deg, var(--bg-soft), var(--white));
    position: relative;
}

.dropzone:hover,
.dropzone.dragover {
    border-color: var(--green);
    background: rgba(142, 190, 33, 0.04);
    transform: scale(1.01);
}

.dropzone-icon {
    font-size: 3rem;
    margin-bottom: 12px;
    opacity: 0.7;
}

.dropzone p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.dropzone input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.form-hint {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin: -4px 0 20px;
}

.upload-progress { margin-top: 16px; display: none; }
.upload-progress.active { display: block; }

.progress-bar {
    height: 8px;
    background: var(--border);
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, var(--green), var(--green-light));
    border-radius: 4px;
    transition: width 0.12s linear;
}

.upload-progress.complete .progress-bar-fill {
    transition: none;
}

.upload-progress.error .progress-bar-fill {
    background: linear-gradient(90deg, #c0392b, #e74c3c);
}

.upload-progress-label {
    margin-top: 8px;
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

.upload-progress.error .upload-progress-label {
    color: #c0392b;
}

/* ===== PAGINATION ===== */
.pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.pagination-summary {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.pagination-links {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

.pagination-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--white);
    color: var(--navy);
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}

a.pagination-link:hover {
    border-color: var(--green);
    color: var(--green-dark);
}

.pagination-link.active {
    background: var(--navy);
    border-color: var(--navy);
    color: var(--white);
}

.pagination-link.disabled,
.pagination-ellipsis {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.pagination-link.disabled {
    opacity: 0.55;
}

/* ===== FILE GALLERY ===== */
.file-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 24px;
}

.file-tab {
    padding: 11px 22px;
    border-radius: var(--radius-sm);
    background: var(--white);
    border: 1.5px solid var(--border);
    cursor: pointer;
    font-family: var(--font);
    font-weight: 600;
    font-size: 0.88rem;
    color: var(--text-muted);
    transition: all var(--transition);
}

.file-tab:hover {
    border-color: var(--green);
    color: var(--green-dark);
}

.file-tab.active {
    background: linear-gradient(135deg, var(--green), var(--green-dark));
    border-color: transparent;
    color: #fff;
    box-shadow: 0 4px 14px rgba(142, 190, 33, 0.3);
}

.file-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 18px;
}

.file-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-soft);
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
}

.file-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--green), var(--navy-light));
}

.file-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow);
}

.file-card-icon {
    font-size: 2.5rem;
    margin-bottom: 14px;
}

.file-card-name {
    font-weight: 700;
    font-size: 0.92rem;
    color: var(--navy);
    margin-bottom: 8px;
    word-break: break-word;
}

.file-card-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 16px;
    line-height: 1.5;
}

.file-card-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.prosba-links-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.prosba-link-item {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
    padding: 16px 18px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #fafcfd;
}

.prosba-link-item strong {
    display: block;
    word-break: break-all;
    margin-bottom: 6px;
    font-size: 14px;
}

.checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    cursor: pointer;
}

.form-group--checkbox {
    margin-bottom: 20px;
}

.form-group--checkbox label.checkbox-option {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    width: 100%;
    margin-bottom: 0;
    padding: 16px 18px;
    border: 1.5px solid var(--border);
    border-radius: 12px;
    background: var(--bg-soft);
    cursor: pointer;
    text-transform: none;
    letter-spacing: normal;
    font-weight: 400;
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.form-group--checkbox label.checkbox-option:hover {
    border-color: #c5d4e0;
    background: var(--white);
}

.form-group--checkbox label.checkbox-option:has(input:checked) {
    border-color: var(--green);
    background: rgba(142, 190, 33, 0.1);
    box-shadow: 0 0 0 4px rgba(142, 190, 33, 0.08);
}

.form-group--checkbox input[type="checkbox"] {
    width: 20px;
    height: 20px;
    min-width: 20px;
    margin-top: 2px;
    padding: 0;
    border-radius: 4px;
    accent-color: var(--green);
    cursor: pointer;
    flex-shrink: 0;
    background: var(--white);
}

.checkbox-option-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.checkbox-option-text strong {
    color: var(--navy);
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.35;
}

.checkbox-option-text small {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 400;
    line-height: 1.45;
    text-transform: none;
    letter-spacing: normal;
}

/* ===== STARS ===== */
.stars { display: flex; gap: 4px; }

.star {
    font-size: 1.5rem;
    color: #dde3ea;
    cursor: default;
    transition: all 0.15s;
}

.stars-interactive .star { cursor: pointer; }
.stars-interactive .star:hover { transform: scale(1.25); }
.star.filled { color: #f5b731; }

/* ===== MODAL ===== */
.modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.hidden { display: none; }

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(26, 61, 79, 0.55);
    backdrop-filter: blur(6px);
    animation: fadeIn 0.2s ease;
}

.modal-content {
    position: relative;
    background: var(--white);
    border-radius: 20px;
    padding: 32px;
    width: 100%;
    max-width: 480px;
    box-shadow: var(--shadow-lg);
    z-index: 1;
    animation: modalIn 0.3s ease;
}

.modal-content--prosba {
    max-width: 520px;
    padding: 28px 28px 24px;
}

.modal-content--prosba .modal-header {
    margin-bottom: 12px;
}

.modal-content--prosba .modal-header h3 {
    margin: 0;
    padding-right: 12px;
    line-height: 1.3;
}

.modal-lead {
    margin: 0 0 22px;
    color: var(--text-muted);
    font-size: 0.92rem;
    line-height: 1.55;
}

.modal-content--prosba .form-group:last-of-type {
    margin-bottom: 0;
}

.modal-content--prosba .modal-actions {
    margin-top: 20px;
    padding-top: 4px;
}

.modal-pdf {
    padding: 10px;
    align-items: stretch;
}

.modal-pdf .modal-content-pdf {
    width: min(98vw, 1280px);
    max-width: none;
    height: min(96vh, 920px);
    max-height: 96vh;
    padding: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 3px solid var(--green);
    border-radius: 18px;
}

.modal-header-pdf {
    margin-bottom: 0;
    padding: 16px 22px;
    background: linear-gradient(135deg, #275671, #1e4358);
    color: #fff;
    border-radius: 14px 14px 0 0;
    gap: 16px;
}

.modal-header-pdf-text {
    min-width: 0;
    flex: 1;
}

.modal-header-pdf-label {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--green);
    margin-bottom: 4px;
}

.modal-header-pdf h3 {
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.modal-header-pdf-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.btn-pdf-open-new {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.35);
    color: #fff;
}

.btn-pdf-open-new:hover {
    background: rgba(255, 255, 255, 0.16);
    border-color: #fff;
    color: #fff;
}

.modal-close-light {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.modal-close-light:hover {
    background: rgba(255, 255, 255, 0.22);
    color: #fff;
}

.pdf-viewer-wrap {
    flex: 1;
    min-height: 0;
    padding: 14px;
    background: #e8eef4;
}

.pdf-frame {
    width: 100%;
    height: 100%;
    min-height: calc(96vh - 110px);
    border: none;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 8px 32px rgba(39, 86, 113, 0.12);
}

@keyframes modalIn {
    from { opacity: 0; transform: scale(0.95) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.modal-header h3 {
    color: var(--navy);
    font-size: 1.2rem;
    font-weight: 700;
}

.modal-close-btn {
    background: var(--bg-soft);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    font-size: 1.4rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--transition);
    line-height: 1;
}

.modal-close-btn:hover {
    background: var(--border);
    color: var(--navy);
}

.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 24px;
}

.hidden { display: none !important; }

.empty-state {
    text-align: center;
    padding: 72px 24px;
    color: var(--text-muted);
    background: var(--white);
    border-radius: var(--radius);
    border: 1px dashed var(--border);
}

.empty-state-icon {
    font-size: 3.5rem;
    margin-bottom: 16px;
    opacity: 0.5;
}

.rating-box {
    padding: 16px 24px 20px;
    background: var(--white);
    border-radius: 0 0 var(--radius) var(--radius);
    margin-top: -10px;
    margin-bottom: 14px;
    border: 1px solid var(--border-soft);
    border-top: none;
    box-shadow: var(--shadow-sm);
}

.rating-box small {
    color: var(--text-muted);
    font-size: 0.78rem;
}

.rating-box p {
    font-size: 0.88rem;
    margin-top: 8px;
    color: var(--text);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .login-split {
        justify-content: center;
        padding: 40px 24px;
    }

    .login-content {
        grid-template-columns: 1fr;
        gap: 50px;
        width: 100%;
        max-width: 750px;
    }

    .login-brand-logo {
        max-height: 160px;
    }

    .login-brand h1 { font-size: 2.8rem; }

    .login-brand p { font-size: 1.375rem; }

    .login-features li { font-size: 1.3rem; }

    .login-card {
        padding: 65px 50px 70px;
    }

    .login-card h2 { font-size: 2.5rem; }

    .login-subtitle { font-size: 1.375rem; }

    .login-form .form-group input {
        font-size: 1.25rem;
        padding: 20px 22px;
    }

    .login-form .btn {
        font-size: 1.25rem;
    }

    .login-split-fade {
        background: linear-gradient(
            180deg,
            rgba(25, 8, 50, 0.4) 0%,
            rgba(120, 60, 160, 0.12) 35%,
            rgba(255, 255, 255, 0.9) 55%,
            #ffffff 65%
        );
    }

    .login-left,
    .login-right {
        justify-content: center;
        padding: 0;
    }

    .login-brand {
        max-width: none;
        text-align: center;
    }

    .login-brand-logo {
        margin-left: auto;
        margin-right: auto;
    }

    .login-features {
        align-items: center;
    }

    .login-card {
        max-width: 100%;
    }
}

@media (max-width: 991px) {
    .login-brand-logo {
        max-height: 96px;
        max-width: 393px;
        margin-bottom: 19px;
        object-fit: contain;
    }

    .login-brand h1 {
        font-size: 34px;
    }

    .login-brand p {
        font-size: 18px;
    }

    .login-features {
        display: none;
    }

    .login-card {
        width: 100%;
        background: #ffffff;
        border-radius: 13px;
        box-shadow: 0 30px 90px rgba(39, 86, 113, 0.12), 0 10px 25px rgba(39, 86, 113, 0.06);
        border: 1px solid var(--border-soft);
        margin-top: -56px;
    }

    .login-card h2 {
        font-size: 23px;
        text-align: center;
    }

    .login-subtitle {
        color: var(--text-muted);
        font-size: 15px;
        text-align: center;
        margin-bottom: 22px;
    }

    .login-form .form-group label {
        font-size: 15px;
        margin-bottom: 9px;
        letter-spacing: 0.04em;
    }

    .login-form .form-group input {
        font-size: 1.25rem;
        padding: 12px 22px;
        border-radius: 9px;
    }

    .login-form .btn {
        margin-top: -6px;
        padding: 12px 35px;
        border-radius: 8px;
    }
}

@media (max-width: 900px) {
    .menu-toggle { display: flex; }

    .sidebar {
        transform: translateX(-100%);
        transition: transform var(--transition);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .sidebar-logo {
        max-width: 208px;
    }

    .main {
        margin-left: 0;
    }

    .page-header,
    .page-content,
    .alert {
        padding-left: 20px;
        padding-right: 20px;
    }

    .alert { margin-left: 20px; margin-right: 20px; }

    .stripe {
        flex-direction: column;
        align-items: stretch;
        gap: 14px;
    }

    .modal-pdf {
        padding: 0;
    }

    .modal-pdf .modal-content-pdf {
        width: 100vw;
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
        border-width: 0;
        border-top: 3px solid var(--green);
    }

    .modal-header-pdf {
        border-radius: 0;
        padding: 14px 16px;
    }

    .modal-header-pdf-actions {
        flex-wrap: wrap;
        justify-content: flex-end;
    }

    .btn-pdf-open-new {
        font-size: 0.78rem;
        padding: 8px 12px;
    }

    .pdf-viewer-wrap {
        padding: 10px;
    }

    .pdf-frame {
        min-height: calc(100vh - 96px);
        border-radius: 8px;
    }

    .stripe-files { max-width: none; }
    .stripe-file-item { flex-wrap: wrap; }
    .stripe-file-actions { width: 100%; }
    .stripe-actions { justify-content: flex-start; }

    .page-content {
        padding: 20px 16px 32px;
    }

    .toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .toolbar .btn {
        width: 100%;
    }

    .filters {
        padding: 16px;
        flex-direction: column;
        align-items: stretch;
    }

    .filters .form-group {
        flex: 1 1 100%;
        min-width: 0;
    }

    .filters .btn {
        width: 100%;
    }

    .data-table.data-table--responsive {
        display: block;
        background: transparent;
        border: none;
        box-shadow: none;
        overflow: visible;
    }

    .data-table.data-table--responsive thead {
        display: none;
    }

    .data-table.data-table--responsive tbody {
        display: flex;
        flex-direction: column;
        gap: 12px;
    }

    .data-table.data-table--responsive tbody tr {
        display: block;
        background: var(--white);
        border-radius: var(--radius);
        border: 1px solid var(--border-soft);
        box-shadow: var(--shadow-sm);
        overflow: hidden;
    }

    .data-table.data-table--responsive tbody tr:hover td {
        background: transparent;
    }

    .data-table.data-table--responsive td {
        display: grid;
        grid-template-columns: 1fr;
        gap: 4px;
        padding: 11px 16px;
        font-size: 0.88rem;
        border-bottom: 1px solid var(--border-soft);
        text-align: left;
        word-break: break-word;
    }

    .data-table.data-table--responsive td::before {
        content: attr(data-label);
        font-weight: 700;
        font-size: 0.68rem;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        color: var(--navy);
        line-height: 1.35;
    }

    .data-table.data-table--responsive td:last-child {
        border-bottom: none;
    }

    .data-table.data-table--responsive td[colspan] {
        display: block;
        text-align: center;
        padding: 28px 16px;
        color: var(--text-muted) !important;
    }

    .data-table.data-table--responsive td[colspan]::before {
        content: none;
    }

    .data-table.data-table--responsive td.data-table-actions::before {
        margin-bottom: 2px;
    }

    .data-table.data-table--responsive .btn-group {
        flex-direction: column;
        width: 100%;
        gap: 8px;
    }

    .data-table.data-table--responsive .btn-group .inline-form {
        display: block;
        width: 100%;
    }

    .data-table.data-table--responsive .btn-group .btn {
        width: 100%;
    }

    .firma-picker-split {
        grid-template-columns: 1fr;
    }

    .firma-assignment-header {
        flex-direction: column;
        align-items: stretch;
    }

    .firma-assignment-actions {
        width: 100%;
    }

    .firma-assignment-actions .btn {
        flex: 1;
    }

    .sukcesy-row {
        grid-template-columns: 32px 1fr;
        gap: 12px;
    }

    .sukcesy-status {
        grid-column: 2;
        justify-self: start;
        margin-top: -4px;
    }
}

@media (max-width: 480px) {
    .login-card { padding: 32px 24px; }
    .form-card { padding: 20px; }
    .page-header h1 { font-size: 1.4rem; }
}
