/* ============================================
   pages.css - Spezifische Seiten-Styles
   ============================================ */

/* ============================================
   DASHBOARD
   ============================================ */
.dashboard-header {
    margin-bottom: var(--space-lg);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}

.stat-card {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    padding: var(--space-md);
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    gap: var(--space-md);
    transition: transform 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
}

.stat-icon {
    font-size: 28px;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f7ff;
    border-radius: 50%;
    flex-shrink: 0;
}

.stat-content {
    flex: 1;
    min-width: 0;
}

.stat-value {
    font-size: 22px;
    font-weight: 600;
    color: var(--color-dark);
}

.stat-label {
    font-size: 13px;
    color: var(--color-text-light);
}

/* ============================================
   SETTINGS
   ============================================ */
.settings-grid {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: var(--space-lg);
    margin-top: var(--space-md);
}

.settings-menu {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    padding: var(--space-sm) 0;
    box-shadow: var(--shadow-md);
    height: fit-content;
    position: sticky;
    top: calc(var(--header-height) + var(--space-md));
}

.settings-menu-item {
    padding: 0;
}

.settings-menu-item a {
    display: block;
    padding: 10px var(--space-md);
    color: #495057;
    text-decoration: none;
    transition: var(--transition);
    border-left: 3px solid transparent;
    font-size: 14px;
}

.settings-menu-item a:hover {
    background: var(--color-bg-light);
    border-left-color: var(--color-primary);
}

.settings-menu-item.active a {
    background: #f0f7ff;
    border-left-color: var(--color-primary);
    color: var(--color-primary);
    font-weight: 500;
}

.settings-menu-divider {
    padding: 8px var(--space-md) 4px;
    font-size: 11px;
    font-weight: 600;
    color: var(--color-text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-top: 1px solid var(--color-border);
    margin-top: 4px;
}

.settings-content {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    box-shadow: var(--shadow-md);
    min-width: 0;
}

/* ============================================
   CUSTOMER DETAILS
   ============================================ */
.customer-info-grid,
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}

.info-card {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    padding: var(--space-md);
    box-shadow: var(--shadow-md);
}

.info-card h3 {
    margin-bottom: var(--space-md);
    font-size: 16px;
    color: #495057;
    border-bottom: 1px solid var(--color-border);
    padding-bottom: var(--space-sm);
}

.info-row {
    display: flex;
    padding: 8px 0;
    border-bottom: 1px solid #f1f3f5;
    gap: var(--space-sm);
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    min-width: 120px;
    font-weight: 500;
    color: var(--color-text-light);
    flex-shrink: 0;
}

.info-value {
    flex: 1;
    word-break: break-word;
}

/* ============================================
   LOGO / VORSCHAU
   ============================================ */
.logo-preview,
.current-logo {
    margin-top: var(--space-md);
    padding: var(--space-sm);
    background: var(--color-bg-light);
    border-radius: var(--radius-sm);
}

.logo-preview p,
.current-logo p {
    margin-bottom: 8px;
    font-size: 13px;
    color: var(--color-text-light);
}

/* ============================================
   A4-VORSCHAU (Logo-Einstellungen)
   ============================================ */
.logo-size-preview {
    margin-top: var(--space-md);
    padding: var(--space-md);
    background: var(--color-bg-light);
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
}

.a4-preview {
    display: flex;
    justify-content: center;
    padding: var(--space-md);
    background: var(--color-white);
    border-radius: var(--radius-sm);
    margin-bottom: var(--space-md);
    overflow-x: auto;
}

.a4-page {
    position: relative;
    width: 420px;
    height: 240px;
    background: var(--color-white);
    border: 1px solid #dee2e6;
    box-shadow: var(--shadow-md);
    padding: 10px;
    box-sizing: border-box;
    border-radius: var(--radius-sm);
    flex-shrink: 0;
}

.preview-area {
    position: absolute;
    top: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px dashed var(--color-primary);
    background: repeating-linear-gradient(
        45deg,
        #f8f9fa,
        #f8f9fa 10px,
        #ffffff 10px,
        #ffffff 20px
    );
    padding: 2px;
    transition: all 0.2s ease;
    border-radius: var(--radius-sm);
}

.preview-area[data-position="left"] { left: 10px; }
.preview-area[data-position="right"] { right: 10px; }

.preview-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
    background: var(--color-white);
}

.preview-empty {
    color: var(--color-text-light);
    font-style: italic;
    font-size: 11px;
    padding: 5px;
    text-align: center;
}

.company-info-preview {
    position: absolute;
    top: 15px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.company-info-preview.left {
    left: 15px;
    align-items: flex-start;
}

.company-info-preview.right {
    right: 15px;
    align-items: flex-end;
}

.company-line {
    width: 120px;
    height: 6px;
    background: #dee2e6;
    border-radius: 2px;
}

.company-line.short {
    width: 80px;
    height: 4px;
}

.title-preview {
    position: absolute;
    top: 90px;
    left: 0;
    right: 0;
    text-align: center;
    font-size: 14px;
    font-weight: bold;
    color: #adb5bd;
    letter-spacing: 2px;
}

.preview-info {
    display: flex;
    justify-content: center;
    gap: var(--space-lg);
    font-size: 12px;
    color: #495057;
    flex-wrap: wrap;
}

.preview-info strong {
    color: var(--color-primary);
}

/* ============================================
   RADIO GROUP (Logo-Position)
   ============================================ */
.radio-group {
    display: flex;
    gap: var(--space-md);
    margin-top: 8px;
    flex-wrap: wrap;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
    background: var(--color-bg-light);
    border: 2px solid var(--color-border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
    font-size: 14px;
}

.radio-label:hover {
    background: var(--color-border);
}

.radio-label:has(input:checked) {
    background: #e7f3ff;
    border-color: var(--color-primary);
    font-weight: 500;
}

.radio-icon {
    font-size: 18px;
}