/**
 * Softwarebestell-System - Styles
 */

:root {
    --primary: #0066cc;
    --primary-dark: #004499;
    --accent: #ff6b35;
    --bg-light: #f8f9fa;
    --bg-white: #ffffff;
    --text-dark: #1a1a1a;
    --text-medium: #4a4a4a;
    --text-light: #6a6a6a;
    --border: #e0e0e0;
    --shadow: rgba(0, 0, 0, 0.08);
    --success: #28a745;
    --warning: #ffc107;
    --danger: #dc3545;
    --info: #17a2b8;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    color: var(--text-dark);
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 40px;
}

.header h1 {
    font-size: 2em;
    color: var(--primary);
    margin-bottom: 5px;
    font-weight: 700;
}

.header h2 {
    font-size: 1.4em;
    color: var(--text-medium);
    font-weight: 400;
    margin-bottom: 10px;
}

.header p {
    color: var(--text-light);
    font-size: 1em;
}

/* Alerts */
.alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: 500;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Form Card */
.form-card {
    background: var(--bg-white);
    border-radius: 16px;
    box-shadow: 0 10px 40px var(--shadow);
    padding: 40px;
}

/* Verification Box */
.verification-box {
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
    border-left: 4px solid var(--accent);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.verification-box label {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    font-weight: 400;
}

.verification-box input[type="checkbox"] {
    margin-right: 12px;
    margin-top: 3px;
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--accent);
    flex-shrink: 0;
}

.info-link {
    color: var(--primary);
    text-decoration: none;
    font-size: 0.9em;
    display: inline-block;
    margin-top: 5px;
}

.info-link:hover {
    text-decoration: underline;
}

/* Form Sections */
.form-section {
    margin-bottom: 35px;
}

.form-section h2 {
    font-size: 1.2em;
    color: var(--primary);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary);
    font-weight: 600;
}

.section-hint {
    color: var(--text-light);
    font-size: 0.9em;
    margin-bottom: 15px;
}

/* Form Groups */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 6px;
    font-size: 0.95em;
}

.form-group input[type="text"],
.form-group input[type="url"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-family: inherit;
    font-size: 1em;
    transition: all 0.2s;
    background: var(--bg-light);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--bg-white);
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

/* Radio Groups */
.radio-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.radio-option {
    display: flex;
    align-items: flex-start;
    padding: 15px;
    background: var(--bg-light);
    border-radius: 8px;
    transition: all 0.2s;
    cursor: pointer;
    border: 2px solid transparent;
}

.radio-option:hover {
    background: #e3f2fd;
    border-color: var(--primary);
}

.radio-option input[type="radio"] {
    margin-right: 12px;
    margin-top: 3px;
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary);
    flex-shrink: 0;
}

.radio-option > div {
    flex: 1;
}

.radio-option label {
    cursor: pointer;
    color: var(--text-dark);
    display: block;
}

.nested-input {
    margin-top: 10px;
    width: 100%;
    padding: 10px 12px;
    border: 2px solid var(--border);
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.95em;
    background: var(--bg-white);
}

.nested-input:focus {
    outline: none;
    border-color: var(--primary);
}

/* Submit Section */
.submit-section {
    margin-top: 40px;
    text-align: center;
}

.btn-submit,
.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    padding: 14px 40px;
    font-size: 1.05em;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 15px rgba(0, 102, 204, 0.3);
    text-decoration: none;
    display: inline-block;
}

.btn-submit:hover,
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 102, 204, 0.4);
}

.btn-secondary {
    background: #6c757d;
    color: white;
    border: none;
    padding: 10px 20px;
    font-size: 0.95em;
    font-weight: 500;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-block;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-success {
    background: var(--success);
    color: white;
    border: none;
    padding: 10px 20px;
    font-size: 0.95em;
    font-weight: 500;
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}

.btn-success:hover {
    background: #218838;
}

.btn-danger {
    background: var(--danger);
    color: white;
    border: none;
    padding: 10px 20px;
    font-size: 0.95em;
    font-weight: 500;
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}

.btn-danger:hover {
    background: #c82333;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.85em;
}

/* Login Card */
.login-card {
    max-width: 400px;
    margin: 80px auto;
    background: var(--bg-white);
    border-radius: 16px;
    box-shadow: 0 10px 40px var(--shadow);
    padding: 40px;
}

.login-card h1 {
    text-align: center;
    color: var(--primary);
    margin-bottom: 10px;
}

.login-card .login-hint {
    text-align: center;
    color: var(--text-light);
    font-size: 0.9em;
    margin-bottom: 25px;
}

/* Status Badges */
.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8em;
    font-weight: 600;
}

.status-new {
    background: #e3f2fd;
    color: #1976d2;
}

.status-review {
    background: #fff3e0;
    color: #f57c00;
}

.status-correction {
    background: #fce4ec;
    color: #c2185b;
}

.status-approved {
    background: #e8f5e9;
    color: #388e3c;
}

.status-rejected {
    background: #ffebee;
    color: #d32f2f;
}

.status-sent {
    background: #e0f2f1;
    color: #00796b;
}

.status-pending {
    background: #fff8e1;
    color: #ff8f00;
}

.status-completed {
    background: #e8f5e9;
    color: #2e7d32;
}

/* Tables */
.data-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px var(--shadow);
}

.data-table th,
.data-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.data-table th {
    background: var(--primary);
    color: white;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85em;
    letter-spacing: 0.5px;
}

.data-table tr:hover {
    background: #f5f5f5;
}

.data-table td a {
    color: var(--primary);
    text-decoration: none;
}

.data-table td a:hover {
    text-decoration: underline;
}

.data-table td a.btn-primary,
.data-table td a.btn-success,
.data-table td a.btn-danger,
.data-table td a.btn-secondary {
    color: white;
    text-decoration: none;
}

/* Admin Layout */
.admin-header {
    background: var(--primary);
    color: white;
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-header h1 {
    font-size: 1.4em;
    font-weight: 600;
}

.admin-header .user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.admin-header .user-info span {
    font-size: 0.9em;
}

.admin-header a {
    color: white;
    text-decoration: none;
}

.admin-header a:hover {
    text-decoration: underline;
}

.admin-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px;
}

/* Filters */
.filters {
    background: var(--bg-white);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px var(--shadow);
}

.filters form {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    align-items: flex-end;
}

.filters .form-group {
    margin-bottom: 0;
    flex: 1;
    min-width: 150px;
}

.filters .form-group label {
    font-size: 0.85em;
    margin-bottom: 4px;
}

.filters input,
.filters select {
    padding: 8px 12px;
    font-size: 0.95em;
}

/* Detail View */
.detail-card {
    background: var(--bg-white);
    border-radius: 12px;
    box-shadow: 0 4px 20px var(--shadow);
    padding: 30px;
    margin-bottom: 20px;
}

.detail-card h2 {
    color: var(--primary);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border);
}

.detail-row {
    display: flex;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    font-weight: 600;
    color: var(--text-medium);
    width: 200px;
    flex-shrink: 0;
}

.detail-value {
    flex: 1;
    color: var(--text-dark);
}

/* Actions */
.actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 20px;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-top: 20px;
}

.pagination a,
.pagination span {
    padding: 8px 14px;
    border-radius: 6px;
    text-decoration: none;
    background: var(--bg-white);
    color: var(--text-dark);
    border: 1px solid var(--border);
}

.pagination a:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.pagination .current {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* History */
.history-list {
    font-size: 0.9em;
}

.history-item {
    padding: 10px;
    border-bottom: 1px solid #f0f0f0;
}

.history-item:last-child {
    border-bottom: none;
}

.history-item .meta {
    color: var(--text-light);
    font-size: 0.85em;
    margin-bottom: 5px;
}

.history-item .change {
    display: flex;
    gap: 10px;
}

.history-item .old-value {
    text-decoration: line-through;
    color: var(--danger);
}

.history-item .new-value {
    color: var(--success);
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 20px 15px;
    }

    .form-card {
        padding: 25px 20px;
    }

    .header h1 {
        font-size: 1.6em;
    }

    .btn-submit {
        width: 100%;
        padding: 14px 30px;
    }

    .admin-header {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

    .filters form {
        flex-direction: column;
    }

    .detail-row {
        flex-direction: column;
    }

    .detail-label {
        width: 100%;
        margin-bottom: 5px;
    }

    .data-table {
        font-size: 0.85em;
    }

    .data-table th,
    .data-table td {
        padding: 8px 10px;
    }
}
