/* ===================================
   GEWERBEGRUNDKURS - ADMIN SEITE STYLES
   Modulares Admin-Interface im Western/Gold-Rush Design
   =================================== */

/* ===== ADMIN CONTAINER ===== */
.admin-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 3rem;
    align-items: start;
}

/* ===== MESSAGE SYSTEM ===== */
.message {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    z-index: 9999;
    min-width: 300px;
    font-weight: 500;
    animation: slideInRight 0.3s ease;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}

.message.success {
    background: linear-gradient(135deg, #35A2A2 0%, #2C8A8A 100%);
    color: #F5F5F5;
    border-left: 4px solid #F4C066;
}

.message.error {
    background: linear-gradient(135deg, #FF8232 0%, #E0661A 100%);
    color: #F5F5F5;
    border-left: 4px solid #C8491D;
}

.message-close {
    background: none;
    border: none;
    color: inherit;
    font-size: 1.2rem;
    cursor: pointer;
    margin-left: auto;
    padding: 0;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.message-close:hover {
    opacity: 1;
}

/* ===== ADMIN SIDEBAR ===== */
.admin-sidebar {
    position: sticky;
    top: 2rem;
    height: fit-content;
}

.sidebar-section {
    background: linear-gradient(135deg, #2C2623 0%, #1E1A17 100%);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: inset 0 4px 12px rgba(0,0,0,0.3);
}

.sidebar-section h3 {
    color: #F4C066;
    font-size: 1.1rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid rgba(244, 192, 102, 0.2);
    padding-bottom: 0.5rem;
}

/* ===== ADMIN NAVIGATION ===== */
.admin-nav {
    list-style: none;
    padding: 0;
    margin: 0;
}

.admin-nav li {
    margin-bottom: 0.5rem;
}

.admin-nav a {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.8rem 1rem;
    color: #D8C5B0;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.admin-nav a:hover {
    background: rgba(244, 192, 102, 0.1);
    color: #F4C066;
    transform: translateX(5px);
}

.admin-nav a.active {
    background: linear-gradient(135deg, #F4C066 0%, #D99C45 100%);
    color: #2C2623;
    font-weight: bold;
}

.admin-nav i {
    width: 18px;
    text-align: center;
}

/* ===== QUICK STATS ===== */
.quick-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.stat-item {
    background: rgba(203, 131, 88, 0.1);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
    transition: all 0.3s ease;
}

.stat-item:hover {
    background: rgba(203, 131, 88, 0.2);
    border-color: rgba(244, 192, 102, 0.3);
}

.stat-number {
    display: block;
    font-size: 1.8rem;
    font-weight: bold;
    color: #F4C066;
    line-height: 1;
}

.stat-label {
    font-size: 0.8rem;
    color: #D8C5B0;
    margin-top: 0.3rem;
}

/* ===== CONTENT HEADER ===== */
.content-header {
    background: linear-gradient(135deg, #2C2623 0%, #1E1A17 100%);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: inset 0 4px 12px rgba(0,0,0,0.3);
}

.content-header h1 {
    color: #F4C066;
    font-size: 2rem;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.content-header p {
    color: #D8C5B0;
    margin: 0.5rem 0 0 0;
    font-style: italic;
}

/* ===== BUTTONS ===== */
.btn-primary {
    background: linear-gradient(135deg, #F4C066 0%, #D99C45 100%);
    color: #2C2623;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(244, 192, 102, 0.3);
}

.btn-secondary {
    background: linear-gradient(135deg, #CB8358 0%, #A85F3D 100%);
    color: #F5F5F5;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #A85F3D 0%, #8B4513 100%);
    transform: translateY(-2px);
}

.btn-edit {
    background: #35A2A2;
    color: #F5F5F5;
    border: none;
    padding: 0.4rem 0.6rem;
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.btn-edit:hover {
    background: #2C8A8A;
    transform: scale(1.1);
}

.btn-delete {
    background: #C8491D;
    color: #F5F5F5;
    border: none;
    padding: 0.4rem 0.6rem;
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.btn-delete:hover {
    background: #FF8232;
    transform: scale(1.1);
}

.btn-view {
    background: #A85F3D;
    color: #F5F5F5;
    border: none;
    padding: 0.4rem 0.6rem;
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.btn-view:hover {
    background: #CB8358;
    transform: scale(1.1);
}

/* ===== OVERVIEW GRID ===== */
.overview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.overview-card {
    background: linear-gradient(135deg, #2C2623 0%, #1E1A17 100%);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: inset 0 4px 12px rgba(0,0,0,0.3);
}

.overview-card:hover {
    border-color: #F4C066;
    transform: translateY(-5px);
    box-shadow: 0 12px 32px rgba(244, 192, 102, 0.2);
}

.card-icon {
    font-size: 3rem;
    color: #F4C066;
    margin-bottom: 1rem;
}

.overview-card h3 {
    color: #F5F5F5;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.overview-card p {
    color: #D8C5B0;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.card-action {
    background: linear-gradient(135deg, #F4C066 0%, #D99C45 100%);
    color: #2C2623;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    display: inline-block;
}

.card-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(244, 192, 102, 0.3);
}

/* ===== FORM CONTAINER ===== */
.form-container {
    background: linear-gradient(135deg, #2C2623 0%, #1E1A17 100%);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: inset 0 4px 12px rgba(0,0,0,0.3);
}

.form-container h2 {
    color: #F4C066;
    margin-bottom: 1.5rem;
    font-size: 1.4rem;
    border-bottom: 1px solid rgba(244, 192, 102, 0.2);
    padding-bottom: 0.5rem;
}

/* ===== ADMIN FORM ===== */
.admin-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    color: #F5F5F5;
    font-weight: 500;
    font-size: 0.95rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 0.8rem;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    background: rgba(30, 26, 23, 0.8);
    color: #F5F5F5;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #F4C066;
    box-shadow: 0 0 0 2px rgba(244, 192, 102, 0.2);
    background: rgba(30, 26, 23, 1);
}

.form-group select option {
    background: #1E1A17;
    color: #F5F5F5;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-group input[type="checkbox"] {
    width: auto;
    margin-right: 0.5rem;
    accent-color: #F4C066;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255,255,255,0.1);
}

/* ===== DATA TABLE ===== */
.data-table {
    background: linear-gradient(135deg, #2C2623 0%, #1E1A17 100%);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: inset 0 4px 12px rgba(0,0,0,0.3);
}

.data-table table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th {
    background: rgba(203, 131, 88, 0.2);
    color: #F4C066;
    padding: 1rem;
    text-align: left;
    font-weight: bold;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.data-table td {
    padding: 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    color: #F5F5F5;
    vertical-align: middle;
}

.data-table tr:hover {
    background: rgba(203, 131, 88, 0.1);
}

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

/* ===== TABLE SPECIFIC STYLES ===== */
.actions {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
}

.status {
    padding: 0.3rem 0.8rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: bold;
    text-transform: uppercase;
}

.status.active {
    background: rgba(53, 162, 162, 0.2);
    color: #35A2A2;
    border: 1px solid rgba(53, 162, 162, 0.3);
}

.status.inactive {
    background: rgba(200, 73, 29, 0.2);
    color: #C8491D;
    border: 1px solid rgba(200, 73, 29, 0.3);
}

.kategorie-badge {
    padding: 0.2rem 0.6rem;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: bold;
    text-transform: uppercase;
}

.kategorie-badge.landwirtschaft {
    background: rgba(139, 195, 74, 0.2);
    color: #8BC34A;
}

.kategorie-badge.handwerk {
    background: rgba(255, 152, 0, 0.2);
    color: #FF9800;
}

.kategorie-badge.handel {
    background: rgba(33, 150, 243, 0.2);
    color: #2196F3;
}

.kategorie-badge.gastronomie {
    background: rgba(233, 30, 99, 0.2);
    color: #E91E63;
}

.kategorie-badge.dienstleistung {
    background: rgba(156, 39, 176, 0.2);
    color: #9C27B0;
}

.teilnehmer-count {
    background: rgba(244, 192, 102, 0.2);
    color: #F4C066;
    padding: 0.3rem 0.6rem;
    border-radius: 8px;
    font-weight: bold;
    font-size: 0.9rem;
}

/* ===== RECENT ACTIVITY ===== */
.recent-activity {
    background: linear-gradient(135deg, #2C2623 0%, #1E1A17 100%);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: inset 0 4px 12px rgba(0,0,0,0.3);
}

.recent-activity h2 {
    color: #F4C066;
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.activity-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.activity-item {
    background: rgba(203, 131, 88, 0.1);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 8px;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.activity-item:hover {
    background: rgba(203, 131, 88, 0.2);
    border-color: rgba(244, 192, 102, 0.3);
}

.activity-date {
    color: #F4C066;
    font-weight: bold;
    font-size: 0.9rem;
}

.activity-details {
    flex: 1;
    margin: 0 1rem;
}

.activity-details strong {
    color: #F5F5F5;
    display: block;
}

.activity-details span {
    color: #D8C5B0;
    font-size: 0.9rem;
}

.activity-time {
    color: #CB8358;
    font-size: 0.9rem;
    font-weight: 500;
}

.no-data {
    text-align: center;
    color: #D8C5B0;
    font-style: italic;
    padding: 2rem;
}

/* ===== EXPORT GRID ===== */
.export-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.export-card {
    background: linear-gradient(135deg, #2C2623 0%, #1E1A17 100%);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: inset 0 4px 12px rgba(0,0,0,0.3);
}

.export-card:hover {
    border-color: #F4C066;
    transform: translateY(-5px);
}

.export-card h3 {
    color: #F4C066;
    margin-bottom: 1rem;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.export-card p {
    color: #D8C5B0;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.file-input {
    width: 100%;
    margin-bottom: 1rem;
    padding: 0.5rem;
    border: 1px dashed rgba(244, 192, 102, 0.5);
    border-radius: 8px;
    background: rgba(30, 26, 23, 0.5);
    color: #F5F5F5;
}

/* ===== MODAL ===== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(30, 26, 23, 0.9);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.modal-content {
    background: linear-gradient(135deg, #2C2623 0%, #1E1A17 100%);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 15px;
    padding: 0;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0,0,0,0.6);
}

.modal-header {
    background: rgba(203, 131, 88, 0.1);
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.modal-header h3 {
    color: #F4C066;
    margin: 0;
    font-size: 1.2rem;
}

.modal-close {
    background: #C8491D;
    color: #F5F5F5;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: #FF8232;
    transform: scale(1.1);
}

.modal-body {
    padding: 2rem;
}

.modal-body p {
    color: #F5F5F5;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
}

/* ===== ANIMATIONS ===== */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1200px) {
    .admin-container {
        grid-template-columns: 250px 1fr;
        gap: 2rem;
    }
}

@media (max-width: 992px) {
    .admin-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .admin-sidebar {
        position: static;
        order: -1;
    }
    
    .content-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .overview-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
    
    .quick-stats {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 768px) {
    .admin-container {
        padding: 1rem;
    }
    
    .content-header {
        padding: 1.5rem;
    }
    
    .content-header h1 {
        font-size: 1.6rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .form-container {
        padding: 1.5rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .overview-grid {
        grid-template-columns: 1fr;
    }
    
    .export-grid {
        grid-template-columns: 1fr;
    }
    
    .quick-stats {
        grid-template-columns: 1fr 1fr;
    }
    
    .data-table {
        overflow-x: auto;
    }
    
    .data-table table {
        min-width: 600px;
    }
    
    .actions {
        flex-direction: column;
        gap: 0.3rem;
    }
    
    .message {
        left: 10px;
        right: 10px;
        min-width: auto;
    }
    
    .modal-content {
        width: 95%;
        max-height: 90vh;
    }
    
    .modal-header {
        padding: 1rem 1.5rem;
    }
    
    .modal-body {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .admin-container {
        padding: 0.5rem;
    }
    
    .sidebar-section {
        padding: 1rem;
    }
    
    .content-header {
        padding: 1rem;
    }
    
    .form-container {
        padding: 1rem;
    }
    
    .overview-card {
        padding: 1.5rem;
    }
    
    .export-card {
        padding: 1.5rem;
    }
    
    .activity-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .activity-time {
        align-self: flex-end;
    }
}

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
    .overview-card,
    .export-card,
    .admin-nav a,
    .btn-primary,
    .btn-secondary,
    .btn-edit,
    .btn-delete,
    .btn-view,
    .card-action,
    .message {
        transition: none !important;
        animation: none !important;
    }
}

@media (prefers-contrast: high) {
    .admin-sidebar,
    .content-header,
    .form-container,
    .data-table,
    .overview-card,
    .export-card,
    .recent-activity {
        border: 2px solid #F4C066;
    }
    
    .btn-primary,
    .btn-secondary,
    .btn-edit,
    .btn-delete,
    .btn-view {
        border: 1px solid currentColor;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        border: 1px solid #F4C066;
    }
}