/*
 * TrauerDesign.de - Hauptstyles
 * Gediegenes, professionelles Design für Traueranzeigen-Verwaltung
 */

/* ==========================================
   CSS Variables (Farbschema)
   ========================================== */
:root {
    --primary: #1a3a52;          /* Dunkelblau */
    --primary-light: #2d5570;
    --primary-dark: #0f2332;
    
    --secondary: #8b7f7f;        /* Warmgrau */
    --secondary-light: #a39999;
    --secondary-dark: #6b6161;
    
    --accent: #a67c52;           /* Goldbraun */
    --accent-light: #c49670;
    --accent-dark: #8a6442;
    
    --background: #f5f3f0;       /* Cremeweiß */
    --background-light: #ffffff;
    --background-dark: #e5e1dc;
    
    --text: #2d2d2d;             /* Anthrazit */
    --text-light: #666666;
    --text-lighter: #999999;
    
    --border: #d4d0ca;
    --border-light: #e8e4df;
    
    --success: #5a8f5a;
    --warning: #d89a4a;
    --error: #b85450;
    --info: #5a7a8f;
    
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 8px rgba(0,0,0,0.12);
    --shadow-lg: 0 8px 16px rgba(0,0,0,0.15);
    
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    
    --font-serif: Georgia, 'Times New Roman', serif;
    --font-sans: 'Open Sans', 'Segoe UI', Tahoma, sans-serif;
}

/* ==========================================
   Reset & Base Styles
   ========================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text);
    background-color: var(--background);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ==========================================
   Typography
   ========================================== */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-serif);
    font-weight: 600;
    line-height: 1.3;
    color: var(--primary);
    margin-bottom: 0.75rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.1rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: 1rem;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--accent-dark);
    text-decoration: underline;
}

strong {
    font-weight: 600;
}

/* ==========================================
   Layout Components
   ========================================== */

/* Container */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.container-fluid {
    width: 100%;
    padding: 0 20px;
}

/* Header */
.site-header {
    background: var(--primary);
    color: white;
    padding: 1rem 0;
    box-shadow: var(--shadow-md);
}

.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-logo {
    font-family: var(--font-serif);
    font-size: 1.75rem;
    color: white;
    text-decoration: none;
    font-weight: 600;
}

.site-logo:hover {
    text-decoration: none;
    opacity: 0.9;
}

.main-nav ul {
    list-style: none;
    display: flex;
    gap: 2rem;
}

.main-nav a {
    color: white;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    transition: background 0.2s ease;
}

.main-nav a:hover {
    background: var(--primary-light);
    text-decoration: none;
}

/* Footer */
.site-footer {
    background: var(--primary-dark);
    color: var(--background-light);
    padding: 2rem 0;
    margin-top: 4rem;
}

.site-footer a {
    color: var(--accent-light);
}

/* ==========================================
   Cards & Panels
   ========================================== */
.card {
    background: var(--background-light);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.card-header {
    border-bottom: 2px solid var(--border);
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
}

.card-title {
    font-size: 1.5rem;
    margin-bottom: 0;
}

.card-body {
    padding: 0;
}

.card-footer {
    border-top: 1px solid var(--border-light);
    padding-top: 1rem;
    margin-top: 1.5rem;
}

/* ==========================================
   Forms
   ========================================== */
.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text);
}

.label-optional {
    font-weight: normal;
    color: var(--text-light);
    font-size: 0.9rem;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="date"],
input[type="number"],
input[type="tel"],
textarea,
select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: var(--font-sans);
    font-size: 1rem;
    background: white;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(166, 124, 82, 0.1);
}

textarea {
    min-height: 120px;
    resize: vertical;
}

.input-help {
    font-size: 0.875rem;
    color: var(--text-light);
    margin-top: 0.25rem;
}

/* File Upload */
.file-upload {
    border: 2px dashed var(--border);
    border-radius: var(--radius-md);
    padding: 2rem;
    text-align: center;
    background: var(--background-light);
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.file-upload:hover {
    border-color: var(--accent);
}

.file-upload input[type="file"] {
    display: none;
}

/* ==========================================
   Buttons
   ========================================== */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    font-family: var(--font-sans);
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-primary {
    background: var(--accent);
    color: white;
}

.btn-primary:hover {
    background: var(--accent-dark);
    text-decoration: none;
}

.btn-secondary {
    background: var(--secondary);
    color: white;
}

.btn-secondary:hover {
    background: var(--secondary-dark);
    text-decoration: none;
}

.btn-success {
    background: var(--success);
    color: white;
}

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

.btn-outline {
    background: transparent;
    border: 2px solid var(--accent);
    color: var(--accent);
}

.btn-outline:hover {
    background: var(--accent);
    color: white;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-block {
    width: 100%;
    display: block;
}

/* ==========================================
   Tables
   ========================================== */
.table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5rem;
}

.table th,
.table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-light);
}

.table th {
    background: var(--background-dark);
    font-weight: 600;
    color: var(--primary);
}

.table tr:hover {
    background: var(--background-light);
}

/* ==========================================
   Status Badges
   ========================================== */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 12px;
    white-space: nowrap;
}

.badge-entwurf {
    background: var(--text-light);
    color: white;
}

.badge-freigegeben {
    background: var(--warning);
    color: white;
}

.badge-online {
    background: var(--success);
    color: white;
}

.badge-abgelehnt {
    background: var(--error);
    color: white;
}

.badge-archiviert {
    background: var(--secondary-light);
    color: white;
}

/* ==========================================
   Alerts & Messages
   ========================================== */
.alert {
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
    border-left: 4px solid;
}

.alert-success {
    background: rgba(90, 143, 90, 0.1);
    border-color: var(--success);
    color: var(--success);
}

.alert-warning {
    background: rgba(216, 154, 74, 0.1);
    border-color: var(--warning);
    color: var(--warning);
}

.alert-error {
    background: rgba(184, 84, 80, 0.1);
    border-color: var(--error);
    color: var(--error);
}

.alert-info {
    background: rgba(90, 122, 143, 0.1);
    border-color: var(--info);
    color: var(--info);
}

/* ==========================================
   Login Page Specific
   ========================================== */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.login-card {
    background: var(--background-light);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 3rem;
    width: 100%;
    max-width: 450px;
}

.login-logo {
    text-align: center;
    margin-bottom: 2rem;
}

.login-logo h1 {
    font-family: var(--font-serif);
    color: var(--primary);
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.login-logo p {
    color: var(--text-light);
    margin-bottom: 0;
}

/* ==========================================
   Utilities
   ========================================== */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--text-light); }
.text-small { font-size: 0.875rem; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.p-4 { padding: 2rem; }

.d-none { display: none; }
.d-block { display: block; }
.d-flex { display: flex; }
.d-grid { display: grid; }

/* ==========================================
   Responsive
   ========================================== */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.5rem; }
    
    .main-nav ul {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .site-header .container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .login-card {
        padding: 2rem;
    }
}

@media print {
    .site-header,
    .site-footer,
    .main-nav {
        display: none;
    }
    
    body {
        background: white;
    }
}
