/* =====================================================
   Ayurveda7 Admin CSS
   Farben: Gold/Grün/Beige - KEIN Lila/Blau
   ===================================================== */

:root {
    /* Primärfarben */
    --gold-primary: #c17817;
    --gold-light: #d4941e;
    --green-primary: #4caf50;
    --green-light: #81c784;
    
    /* Hintergrundfarben */
    --bg-main: #f9f6f2;
    --bg-warm: #faf0e6;
    --bg-white: #ffffff;
    
    /* Textfarben */
    --text-dark: #2e2e2e;
    --text-medium: #666666;
    --text-light: #999999;
    
    /* Akzentfarben */
    --accent-success: #4caf50;
    --accent-warning: #ff9800;
    --accent-danger: #f44336;
    --accent-info: #2196f3;
    
    /* Schatten & Ränder */
    --shadow-soft: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-medium: 0 4px 12px rgba(0, 0, 0, 0.12);
    --border-radius: 8px;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-main);
    color: var(--text-dark);
    line-height: 1.6;
    font-size: 15px;
}

a {
    color: var(--gold-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--gold-light);
}

/* ===== Layout ===== */
.admin-container {
    display: flex;
    min-height: 100vh;
}

/* ===== Sidebar ===== */
.sidebar {
    width: 260px;
    background: linear-gradient(135deg, var(--gold-primary), var(--gold-light));
    color: white;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
}

.sidebar-header {
    padding: 30px 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.sidebar-header h1 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 5px;
}

.sidebar-header .om-symbol {
    font-size: 32px;
    margin-bottom: 10px;
}

.sidebar-nav {
    padding: 20px 0;
}

.sidebar-nav ul {
    list-style: none;
}

.sidebar-nav li {
    margin-bottom: 5px;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: white;
    transition: all 0.3s ease;
}

.sidebar-nav a:hover {
    background: rgba(255, 255, 255, 0.1);
    padding-left: 25px;
}

.sidebar-nav a.active {
    background: rgba(255, 255, 255, 0.2);
    border-left: 3px solid white;
}

.sidebar-nav .icon {
    margin-right: 10px;
    font-size: 18px;
}

/* ===== Main Content ===== */
.main-content {
    margin-left: 260px;
    flex: 1;
    padding: 30px;
    background: var(--bg-main);
}

/* ===== Header ===== */
.page-header {
    background: white;
    padding: 25px 30px;
    margin: -30px -30px 30px;
    box-shadow: var(--shadow-soft);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.page-header h2 {
    color: var(--text-dark);
    font-size: 24px;
    font-weight: 600;
}

.header-actions {
    display: flex;
    gap: 15px;
    align-items: center;
}

/* ===== Cards ===== */
.card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-soft);
    padding: 25px;
    margin-bottom: 25px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.card-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-dark);
}

/* ===== Dashboard Stats ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 25px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-soft);
    border-left: 4px solid var(--green-primary);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-medium);
}

.stat-card .stat-value {
    font-size: 32px;
    font-weight: bold;
    color: var(--gold-primary);
    margin-bottom: 5px;
}

.stat-card .stat-label {
    color: var(--text-medium);
    font-size: 14px;
}

.stat-card .stat-icon {
    float: right;
    font-size: 48px;
    color: var(--green-light);
    opacity: 0.3;
}

/* ===== Buttons ===== */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: var(--border-radius);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--gold-primary), var(--gold-light));
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(193, 120, 23, 0.3);
}

.btn-success {
    background: linear-gradient(135deg, var(--green-primary), var(--green-light));
    color: white;
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.btn-secondary {
    background: #f5f5f5;
    color: var(--text-dark);
}

.btn-secondary:hover {
    background: #e8e8e8;
}

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

.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

.btn-icon {
    padding: 8px;
    width: 36px;
    height: 36px;
    justify-content: center;
}

/* ===== Forms ===== */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-dark);
    font-weight: 500;
    font-size: 14px;
}

.form-control {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-size: 14px;
    transition: all 0.3s ease;
    background: white;
}

.form-control:focus {
    outline: none;
    border-color: var(--gold-primary);
    box-shadow: 0 0 0 3px rgba(193, 120, 23, 0.1);
}

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

select.form-control {
    cursor: pointer;
}

/* ===== Tables ===== */
.table-responsive {
    overflow-x: auto;
    margin-top: 20px;
}

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

.table th {
    background: var(--bg-warm);
    color: var(--text-dark);
    font-weight: 600;
    text-align: left;
    padding: 12px 15px;
    border-bottom: 2px solid var(--gold-primary);
    font-size: 14px;
}

.table td {
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
    color: var(--text-medium);
}

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

/* ===== Badges ===== */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.badge-success {
    background: #e8f5e9;
    color: var(--green-primary);
}

.badge-warning {
    background: #fff3e0;
    color: var(--accent-warning);
}

.badge-danger {
    background: #ffebee;
    color: var(--accent-danger);
}

.badge-inactive {
    background: #f5f5f5;
    color: var(--text-medium);
}

/* ===== Toggle Switch ===== */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #ccc;
    border-radius: 24px;
    transition: 0.3s;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background: white;
    border-radius: 50%;
    transition: 0.3s;
}

input:checked + .toggle-slider {
    background: var(--green-primary);
}

input:checked + .toggle-slider:before {
    transform: translateX(26px);
}

/* ===== Copy Button ===== */
.copy-section {
    background: var(--bg-warm);
    padding: 15px;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
}

.copy-content {
    background: white;
    padding: 12px;
    border-radius: 6px;
    font-family: monospace;
    font-size: 13px;
    margin-bottom: 10px;
    word-break: break-all;
}

.btn-copy {
    background: var(--green-primary);
    color: white;
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-copy:hover {
    background: var(--green-light);
}

.btn-copy.copied {
    background: var(--accent-success);
}

/* ===== Login Page ===== */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--bg-main), var(--bg-warm));
}

.login-box {
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: var(--shadow-medium);
    width: 100%;
    max-width: 400px;
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header .om-symbol {
    font-size: 48px;
    margin-bottom: 15px;
}

.login-header h2 {
    color: var(--gold-primary);
    font-size: 24px;
    margin-bottom: 10px;
}

/* ===== Alerts ===== */
.alert {
    padding: 15px 20px;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-success {
    background: #e8f5e9;
    color: var(--green-primary);
    border-left: 4px solid var(--green-primary);
}

.alert-error {
    background: #ffebee;
    color: var(--accent-danger);
    border-left: 4px solid var(--accent-danger);
}

.alert-warning {
    background: #fff3e0;
    color: var(--accent-warning);
    border-left: 4px solid var(--accent-warning);
}

/* ===== Modal ===== */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s ease;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 12px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideIn 0.3s ease;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.modal-close {
    cursor: pointer;
    font-size: 24px;
    color: var(--text-medium);
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: var(--text-dark);
}

/* ===== WhatsApp Message Preview ===== */
.whatsapp-preview {
    background: #e5ddd5;
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
}

.whatsapp-message {
    background: #dcf8c6;
    padding: 12px 15px;
    border-radius: 7px;
    max-width: 80%;
    margin-left: auto;
    font-size: 14px;
    line-height: 1.4;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* ===== Course Links Grid ===== */
.links-grid {
    display: grid;
    gap: 20px;
    margin-top: 20px;
}

.link-card {
    background: white;
    padding: 20px;
    border-radius: var(--border-radius);
    border-left: 4px solid var(--green-primary);
}

.link-card h4 {
    color: var(--text-dark);
    margin-bottom: 15px;
    font-size: 16px;
}

.link-url {
    background: var(--bg-warm);
    padding: 10px;
    border-radius: 6px;
    font-family: monospace;
    font-size: 13px;
    word-break: break-all;
    margin-bottom: 10px;
}

.link-actions {
    display: flex;
    gap: 10px;
}

/* ===== Editor ===== */
.editor-container {
    margin-top: 20px;
}

.editor-toolbar {
    background: #f5f5f5;
    padding: 10px;
    border-radius: 6px 6px 0 0;
    display: flex;
    gap: 5px;
}

.editor-btn {
    padding: 6px 10px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.editor-btn:hover {
    background: var(--gold-primary);
    color: white;
}

.editor-content {
    min-height: 300px;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 0 0 6px 6px;
    background: white;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .sidebar {
        width: 70px;
    }
    
    .sidebar-header h1 {
        display: none;
    }
    
    .sidebar-nav span {
        display: none;
    }
    
    .main-content {
        margin-left: 70px;
        padding: 20px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
}

/* ===== Animations ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideIn {
    from {
        transform: translateY(-30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* ===== Utility Classes ===== */
.text-center {
    text-align: center;
}

.text-muted {
    color: var(--text-medium);
}

.mt-3 {
    margin-top: 30px;
}

.mb-3 {
    margin-bottom: 30px;
}

.d-flex {
    display: flex;
}

.justify-between {
    justify-content: space-between;
}

.align-center {
    align-items: center;
}

.gap-10 {
    gap: 10px;
}

.w-100 {
    width: 100%;
}