
.form-card {
    background: #fff;
    border-radius: 1rem;
    box-shadow: 0 2px 16px 0 rgba(60,72,88,.10);
    padding: 2.5rem 1.5rem 2rem 1.5rem;
    max-width: 500px;
    margin: 2rem auto 0 auto;
}
.form-label {
    font-weight: 500;
    color: #495057;
}
.input-group-text {
    cursor: pointer;
}

.preview-container {
    background: #fff;
    border-radius: 1rem;
    box-shadow: 0 2px 16px 0 rgba(60,72,88,.10);
    padding: 2rem 1.5rem;
    margin: 2rem auto;
    max-width: 900px;
}
.preview-header {
    margin-bottom: 2rem;
}
.preview-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.5rem;
    display: block;
}
.preview-html {
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    background: #f8f9fa;
    padding: 1.5rem;
    margin-bottom: 2rem;
    min-height: 120px;
}
.preview-text {
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    background: #f8f9fa;
    padding: 1rem;
    font-family: monospace;
    min-height: 60px;
}
.btn-back {
    margin-bottom: 1.5rem;
}
/* Main application stylesheet - all custom styles consolidated here */

body { background: #f8f9fa; }
html, body { height: 100%; overflow-x: hidden; }

.sidebar {
    min-height: 100vh;
    background: linear-gradient(160deg, #212529 80%, #0d6efd 100%);
    color: #fff;
    box-shadow: 2px 0 16px 0 rgba(60,72,88,.10);
    position: fixed;
    left: 0; top: 0; bottom: 0;
    width: 220px;
    z-index: 1030;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.sidebar .nav-link {
    color: #adb5bd;
    font-size: 1.08em;
    border-radius: 0.5rem;
    margin-bottom: 0.3rem;
    padding: 0.65rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: background 0.15s, color 0.15s;
}
.sidebar .nav-link.active, .sidebar .nav-link:hover {
    color: #fff;
    background: #0d6efd;
    box-shadow: 0 2px 8px 0 rgba(13,110,253,.10);
}
.sidebar .nav-link i {
    font-size: 1.2em;
    margin-right: 8px;
}
.user-info {
    font-size: 1em;
    color: #e3eaf5;
    margin-bottom: 2.5rem;
}
.user-avatar {
    width: 44px; height: 44px; border-radius: 50%; background: #0d6efd; color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.3em; font-weight: 700; margin-bottom: 0.7rem;
    box-shadow: 0 2px 8px 0 rgba(13,110,253,.10);
}
.sidebar h3 {
    font-weight: 700; letter-spacing: 0.03em; margin-bottom: 2.2rem;
}
.main-content-fixed {
    margin-left: 220px; min-height: 100vh; padding: 2rem 2vw 2rem 2vw;
    max-width: calc(100vw - 220px);
}
@media (max-width: 991.98px) {
    .sidebar { position: static; width: 100%; min-height: auto; margin-bottom: 1rem; }
    .main-content-fixed { margin-left: 0; padding: 1.2rem 0.5rem; max-width: 100vw; }
}

.table-container {
    background: #fff;
    border-radius: 1rem;
    box-shadow: 0 2px 16px 0 rgba(60,72,88,.10);
    padding: 2rem 1.5rem;
    margin-bottom: 2rem;
}
.filter-card {
    background: #f8f9fa;
    border-radius: 0.75rem;
    box-shadow: 0 1px 6px 0 rgba(60,72,88,.07);
    padding: 1.5rem 1rem 1rem 1rem;
    margin-bottom: 2rem;
}
.filter-label { font-weight: 500; color: #495057; margin-bottom: 0.25rem; }
.filter-actions { gap: 0.5rem; }
.form-check-label { font-size: 0.97em; }
.form-check-input:checked { background-color: #0d6efd; border-color: #0d6efd; }
.add-company-btn { margin-bottom: 1.5rem; }
.badge-tag {
    background: #e3f0ff; color: #0d47a1; font-size: 0.92em; margin-right: 4px;
    border-radius: 0.5rem; padding: 0.35em 0.8em; font-weight: 600;
    box-shadow: 0 1px 4px 0 rgba(13,110,253,.08); display: inline-block; letter-spacing: 0.01em;
}
.alert-dismissible { transition: opacity 0.3s; }

/* Legenda zmiennych dla szablonów email */
.variables-legend {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    margin-bottom: 2rem;
    overflow: hidden;
}
.variables-legend-header {
    padding: 1rem 1.25rem;
    background: #fff;
    border-bottom: 1px solid #dee2e6;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background 0.2s;
}
.variables-legend-header:hover {
    background: #f8f9fa;
}
.variables-legend-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: #495057;
    margin: 0;
}
.variables-legend-title svg {
    color: #6c757d;
}
.toggle-icon {
    color: #6c757d;
    transition: transform 0.3s;
    font-size: 1.2rem;
}
.toggle-icon.expanded {
    transform: rotate(180deg);
}
.variables-legend-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}
.variables-legend-content.expanded {
    max-height: 800px;
}
.variables-legend-description {
    padding: 1rem 1.25rem;
    font-size: 0.875rem;
    color: #6c757d;
    background: #fff;
    margin: 0;
    border-bottom: 1px solid #dee2e6;
}
.variables-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 0.75rem;
    padding: 1.25rem;
}
.variable-item {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 0.375rem;
    padding: 0.875rem;
    transition: all 0.2s ease;
    cursor: pointer;
}
.variable-item:hover {
    border-color: #0d6efd;
    box-shadow: 0 2px 8px rgba(13, 110, 253, 0.1);
}
.variable-code {
    font-family: 'Courier New', monospace;
    font-weight: 600;
    font-size: 0.85rem;
    color: #0d6efd;
    margin-bottom: 0.4rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.variable-code .copy-icon {
    opacity: 0;
    font-size: 0.85rem;
    transition: opacity 0.2s;
    color: #6c757d;
}
.variable-item:hover .copy-icon {
    opacity: 1;
}
.variable-desc {
    font-size: 0.8rem;
    color: #6c757d;
    margin: 0;
    line-height: 1.4;
}
.variable-category {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #adb5bd;
    margin-bottom: 0.4rem;
    font-weight: 600;
}
.copy-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #28a745;
    color: white;
    padding: 0.875rem 1.25rem;
    border-radius: 0.375rem;
    box-shadow: 0 2px 12px rgba(40, 167, 69, 0.3);
    opacity: 0;
    animation: slideIn 0.3s forwards, slideOut 0.3s 2s forwards;
    z-index: 9999;
    font-size: 0.9rem;
}
@keyframes slideIn {
    from { opacity: 0; transform: translateX(100%); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes slideOut {
    from { opacity: 1; transform: translateX(0); }
    to { opacity: 0; transform: translateX(100%); }
}
