/**
 * Direktvertrieb360 - D2D Sales Team Management
 * Main Stylesheet
 */

/* ========================================
   1. CSS Variables & Custom Properties
   ======================================== */
:root {
    --primary: #2563EB;
    --primary-dark: #1D4ED8;
    --primary-light: #DBEAFE;
    --accent: #F97316;
    --accent-dark: #EA580C;
    --accent-light: #FFF7ED;
    --secondary: #0F172A;
    --bg: #F8FAFC;
    --text: #334155;
    --text-light: #64748B;
    --border: #E2E8F0;
    --success: #16A34A;
    --warning: #EAB308;
    --danger: #DC2626;
    --info: #0EA5E9;
    --white: #FFFFFF;
    --shadow: 0 2px 8px rgba(0,0,0,0.08);
    --radius: 8px;
}

/* ========================================
   2. Reset & Base Styles
   ======================================== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    -moz-text-size-adjust: 100%;
    text-size-adjust: 100%;
    scroll-behavior: smooth;
}

button, input, select, textarea {
    font-family: inherit;
    font-size: inherit;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

button {
    border: none;
    background: none;
    cursor: pointer;
    color: inherit;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul, ol {
    list-style: none;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
    font-weight: 700;
    line-height: 1.3;
}

code, pre, .monospace {
    font-family: 'JetBrains Mono', monospace;
}

/* ========================================
   3. Auth Pages (Login, Register)
   ======================================== */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--secondary) 0%, #0D1B2A 50%, #1E293B 100%);
    padding: 20px;
}

.auth-container {
    width: 100%;
    max-width: 420px;
}

.auth-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: 0 4px 24px rgba(0,0,0,0.15);
    overflow: hidden;
}

.auth-header {
    background: var(--white);
    color: var(--text);
    padding: 30px;
    text-align: center;
    border-bottom: 3px solid var(--primary);
}

.auth-header h1 {
    font-size: 24px;
    margin-bottom: 5px;
    color: var(--secondary);
}

.auth-header p {
    opacity: 0.9;
    font-size: 14px;
    color: var(--text-light);
}

.auth-body {
    padding: 30px;
}

.auth-footer {
    padding: 0 30px 30px;
    text-align: center;
    font-size: 14px;
    color: var(--text-light);
}

.auth-footer a {
    color: var(--primary);
    font-weight: 500;
}

.auth-footer a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* ========================================
   4. App Layout (Sidebar + Main Content)
   ======================================== */
.app-container {
    display: flex;
    min-height: 100vh;
}

.main-content {
    flex: 1;
    margin-left: 250px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.content {
    padding: 25px;
    flex: 1;
}

/* ========================================
   5. Sidebar Styles
   ======================================== */
.sidebar {
    width: 250px;
    background: var(--secondary);
    color: var(--white);
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 200;
}

.sidebar-header {
    background: var(--white);
    padding: 15px;
    text-align: center;
    border-bottom: 3px solid var(--primary);
    position: relative;
    z-index: 10;
}

.sidebar-header::before,
.sidebar-header::after {
    display: none !important;
}

.sidebar-header h1 {
    font-size: 20px;
    color: var(--secondary);
}

.sidebar-header span {
    font-size: 12px;
    opacity: 0.9;
    color: var(--text-light);
}

/* ========================================
   6. Logo Styles
   ======================================== */
.logo-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.sidebar-logo {
    max-width: 180px;
    max-height: 60px;
    width: auto;
    height: auto;
    filter: none !important;
    opacity: 1 !important;
    mix-blend-mode: normal !important;
}

.logo-fallback {
    text-align: center;
}

.logo-fallback h1 {
    color: var(--secondary);
    margin: 0;
    font-size: 22px;
    font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
    font-weight: 800;
}

.logo-fallback .logo-accent {
    color: var(--accent);
}

.logo-fallback span {
    color: var(--text-light);
    font-size: 11px;
    display: block;
    margin-top: 2px;
}

/* ========================================
   7. Navigation Links
   ======================================== */
.sidebar-nav {
    padding: 15px 0;
}

.nav-section {
    padding: 15px 20px 5px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255,255,255,0.4);
    font-weight: 600;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
    font-size: 14px;
}

.nav-link:hover {
    background: rgba(255,255,255,0.08);
    color: var(--white);
    border-left-color: rgba(37,99,235,0.4);
}

.nav-link.active {
    background: rgba(37,99,235,0.15);
    border-left-color: var(--primary);
    color: var(--white);
    font-weight: 500;
}

.nav-link i {
    width: 20px;
    text-align: center;
    font-size: 15px;
}

.nav-badge {
    margin-left: auto;
    background: var(--danger);
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
    animation: pulse-badge 2s infinite;
}

@keyframes pulse-badge {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* ========================================
   8. Sidebar Visit Counter Widget
   ======================================== */
.sidebar-visit-widget {
    margin: 12px;
    background: linear-gradient(145deg, rgba(37,99,235,0.15) 0%, rgba(15,23,42,0.3) 100%);
    border-radius: 12px;
    border: 1px solid rgba(37,99,235,0.25);
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.visit-widget-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 14px 8px;
    font-size: 11px;
    font-weight: 600;
    color: rgba(255,255,255,0.75);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-family: inherit;
}

.visit-widget-header i {
    font-size: 13px;
    color: #60A5FA;
}

.visit-widget-header span {
    flex: 1;
}

.visit-settings-toggle {
    margin-left: auto;
    width: 24px;
    height: 24px;
    border: none;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.45);
    font-size: 11px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    -webkit-appearance: none;
    appearance: none;
    font-family: inherit;
}

.visit-settings-toggle:hover {
    background: rgba(255,255,255,0.18);
    color: white;
}

.visit-widget-progress {
    padding: 2px 14px 10px;
}

.visit-progress-bar {
    height: 8px;
    background: rgba(255,255,255,0.08);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.2);
}

.visit-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), #60A5FA);
    border-radius: 4px;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 6px rgba(37,99,235,0.4);
}

.visit-progress-fill.complete {
    background: linear-gradient(90deg, var(--accent), #FDBA74);
    box-shadow: 0 0 8px rgba(249,115,22,0.5);
}

.visit-progress-stats {
    display: flex;
    align-items: baseline;
    gap: 3px;
    font-family: inherit;
}

.visit-done {
    font-size: 20px;
    font-weight: 800;
    color: #60A5FA;
    line-height: 1;
}

.visit-separator {
    color: rgba(255,255,255,0.3);
    font-size: 14px;
}

.visit-target-num {
    color: rgba(255,255,255,0.5);
    font-weight: 600;
    font-size: 14px;
}

.visit-widget-actions {
    display: flex;
    gap: 8px;
    padding: 0 14px 12px;
}

.visit-widget-actions form {
    flex: 1;
    display: flex;
}

.visit-action-btn {
    width: 100%;
    padding: 9px 14px;
    border: none;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s;
    font-family: inherit;
    -webkit-appearance: none;
    appearance: none;
    letter-spacing: 0.3px;
}

.visit-btn-count {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    box-shadow: 0 2px 6px rgba(37,99,235,0.35);
}

.visit-btn-count:hover {
    background: linear-gradient(135deg, #3B82F6, var(--primary));
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(37,99,235,0.4);
}

.visit-btn-count:active {
    transform: translateY(0);
    box-shadow: 0 1px 3px rgba(37,99,235,0.3);
}

.visit-btn-reset {
    background: rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.6);
    border: 1px solid rgba(255,255,255,0.12);
}

.visit-btn-reset:hover {
    background: rgba(255,255,255,0.15);
    color: white;
}

.visit-target-form {
    display: none;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: rgba(0,0,0,0.2);
    border-top: 1px solid rgba(255,255,255,0.06);
}

.visit-target-form.active {
    display: flex;
}

.visit-target-label {
    font-size: 11px;
    color: rgba(255,255,255,0.55);
    white-space: nowrap;
    font-family: inherit;
}

.visit-target-form input[type="number"] {
    width: 58px;
    padding: 6px 8px;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 6px;
    background: rgba(255,255,255,0.08);
    color: white;
    font-size: 14px;
    font-weight: 700;
    text-align: center;
    font-family: inherit;
    -webkit-appearance: none;
    -moz-appearance: textfield;
}

.visit-target-form input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
}

.visit-target-form input[type="number"]:focus {
    border-color: #60A5FA;
    outline: none;
    box-shadow: 0 0 0 2px rgba(37,99,235,0.2);
}

.visit-target-form button {
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 6px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    font-size: 11px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    -webkit-appearance: none;
    appearance: none;
    font-family: inherit;
    box-shadow: 0 1px 4px rgba(37,99,235,0.3);
}

.visit-target-form button:hover {
    background: var(--primary-dark);
}

/* ========================================
   9. Topbar
   ======================================== */
.topbar {
    background: var(--white);
    padding: 15px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.topbar h2 {
    font-size: 20px;
    color: var(--secondary);
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.sidebar-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 20px;
    color: var(--secondary);
    cursor: pointer;
    padding: 5px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: var(--text);
}

.user-info i {
    color: var(--primary);
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 13px;
}

/* ========================================
   10. Cards
   ======================================== */
.card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 20px;
    border: 1px solid var(--border);
}

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

.card-header h3 {
    font-size: 16px;
    color: var(--secondary);
}

.card-body {
    padding: 20px;
}

.card-footer {
    padding: 15px 20px;
    border-top: 1px solid var(--border);
    background: var(--bg);
    border-radius: 0 0 var(--radius) var(--radius);
}

/* ========================================
   11. Welcome Card
   ======================================== */
.welcome-card {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    padding: 30px;
    border-radius: var(--radius);
    margin-bottom: 25px;
    position: relative;
    overflow: hidden;
}

.welcome-card::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 300px;
    height: 300px;
    background: rgba(255,255,255,0.05);
    border-radius: 50%;
    pointer-events: none;
}

.welcome-card h2 {
    margin-bottom: 10px;
    position: relative;
}

.welcome-card p {
    position: relative;
}

.welcome-card .text-muted {
    color: rgba(255,255,255,0.85);
}

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

.stat-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.stat-icon {
    font-size: 32px;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
    flex-shrink: 0;
}

.stat-content h3 {
    font-size: 28px;
    color: var(--secondary);
    margin-bottom: 2px;
    font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
}

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

/* ========================================
   13. Section Grid
   ======================================== */
.section-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 15px;
}

.section-card {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: var(--white);
    border-radius: var(--radius);
    border-left: 4px solid var(--primary);
    text-decoration: none;
    color: var(--text);
    transition: all 0.2s;
    box-shadow: var(--shadow);
}

.section-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    border-left-color: var(--primary-dark);
}

.section-icon {
    width: 45px;
    height: 45px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 18px;
    flex-shrink: 0;
}

.section-info h4 {
    margin-bottom: 3px;
    color: var(--secondary);
    font-size: 15px;
}

.section-info p {
    font-size: 13px;
    color: var(--text-light);
}

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

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

.form-label .required {
    color: var(--danger);
    margin-left: 2px;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 15px;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: var(--white);
    color: var(--text);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}

.form-control::placeholder {
    color: var(--text-light);
}

.form-control.error {
    border-color: var(--danger);
}

.form-control.error:focus {
    box-shadow: 0 0 0 3px rgba(220,38,38,0.1);
}

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

select.form-control {
    appearance: none;
    background: var(--white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23334155'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E") no-repeat right 10px center;
    background-size: 20px;
    padding-right: 35px;
}

.form-hint {
    font-size: 12px;
    color: var(--text-light);
    margin-top: 4px;
}

.form-error {
    font-size: 12px;
    color: var(--danger);
    margin-top: 4px;
}

.form-check {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.form-check input[type="checkbox"],
.form-check input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
}

/* ========================================
   15. Buttons
   ======================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    border: none;
    border-radius: var(--radius);
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
    box-shadow: 0 2px 8px rgba(37,99,235,0.3);
}

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

.btn-accent:hover {
    background: var(--accent-dark);
    box-shadow: 0 2px 8px rgba(249,115,22,0.3);
}

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

.btn-secondary:hover {
    background: #1E293B;
    box-shadow: 0 2px 8px rgba(15,23,42,0.3);
}

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

.btn-success:hover {
    background: #15803D;
    box-shadow: 0 2px 8px rgba(22,163,74,0.3);
}

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

.btn-danger:hover {
    background: #B91C1C;
    box-shadow: 0 2px 8px rgba(220,38,38,0.3);
}

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

.btn-warning:hover {
    background: #CA8A04;
}

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

.btn-info:hover {
    background: #0284C7;
}

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

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-light);
}

.btn-block {
    width: 100%;
}

.btn-small {
    padding: 8px 15px;
    font-size: 13px;
}

.btn-large {
    padding: 15px 28px;
    font-size: 16px;
}

.btn-icon {
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 50%;
}

/* ========================================
   16. Badges
   ======================================== */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    background: var(--secondary);
    color: var(--white);
}

.badge-small {
    padding: 2px 8px;
    font-size: 11px;
}

.badge-primary {
    background: var(--primary);
}

.badge-accent {
    background: var(--accent);
}

.badge-danger {
    background: var(--danger);
}

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

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

.badge-info {
    background: var(--info);
}

/* ========================================
   17. Alerts
   ======================================== */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    border-left: 4px solid;
    font-size: 14px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.alert i {
    margin-top: 2px;
    flex-shrink: 0;
}

.alert-success {
    background: #DCFCE7;
    border-color: var(--success);
    color: #166534;
}

.alert-danger {
    background: #FEE2E2;
    border-color: var(--danger);
    color: #991B1B;
}

.alert-warning {
    background: #FEF9C3;
    border-color: var(--warning);
    color: #854D0E;
}

.alert-info {
    background: #E0F2FE;
    border-color: var(--info);
    color: #075985;
}

/* ========================================
   18. Tables
   ======================================== */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

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

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

.table th {
    background: var(--bg);
    font-weight: 600;
    color: var(--secondary);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

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

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

.table td .actions {
    justify-content: flex-end;
}

/* ========================================
   19. Announcements
   ======================================== */
.announcements-card .card-body {
    max-height: 500px;
    overflow-y: auto;
    padding: 0;
}

.announcement-item {
    padding: 20px;
    border-bottom: 1px solid var(--border);
    border-left: 4px solid transparent;
    transition: background 0.2s;
}

.announcement-item:last-child {
    border-bottom: none;
}

.announcement-item:hover {
    background: var(--bg);
}

.announcement-item.priority-urgent {
    border-left-color: var(--danger);
    background: rgba(220,38,38,0.03);
}

.announcement-item.priority-important {
    border-left-color: var(--warning);
    background: rgba(234,179,8,0.05);
}

.announcement-item.priority-normal {
    border-left-color: var(--border);
}

.announcement-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.announcement-date {
    font-size: 12px;
    color: var(--text-light);
}

.priority-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}

.priority-badge.urgent {
    background: var(--danger);
    color: white;
}

.priority-badge.important {
    background: var(--warning);
    color: var(--secondary);
}

.priority-badge.normal {
    background: var(--border);
    color: var(--text);
}

.announcement-item h4 {
    margin: 0 0 8px;
    color: var(--secondary);
    font-size: 16px;
}

.announcement-item p {
    margin: 0;
    color: var(--text);
    line-height: 1.6;
}

.announcement {
    padding: 15px;
    border-bottom: 1px solid var(--border);
}

.announcement:last-child {
    border-bottom: none;
}

.announcement h4 {
    margin: 5px 0;
    color: var(--secondary);
}

.announcement p {
    color: var(--text-light);
    margin: 10px 0;
}

.announcement.urgent {
    border-left: 4px solid var(--danger);
    padding-left: 20px;
}

.announcement.important {
    border-left: 4px solid var(--warning);
    padding-left: 20px;
}

/* ========================================
   20. Modals
   ======================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15,23,42,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s;
    padding: 20px;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--white);
    border-radius: var(--radius);
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
    transform: scale(0.95);
    transition: transform 0.2s;
}

.modal-overlay.active .modal {
    transform: scale(1);
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 18px;
    color: var(--secondary);
}

.modal-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: var(--text-light);
    transition: all 0.2s;
}

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

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 15px 20px;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

/* ========================================
   21. Site Footer
   ======================================== */
.site-footer {
    background: var(--secondary);
    color: rgba(255,255,255,0.7);
    padding: 15px 25px;
    margin-left: 250px;
    border-top: 1px solid rgba(255,255,255,0.08);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    font-size: 13px;
}

.footer-nav {
    display: flex;
    gap: 20px;
}

.footer-nav a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-nav a:hover {
    color: var(--white);
    text-decoration: underline;
}

/* ========================================
   22. Static Pages (Impressum, Datenschutz)
   ======================================== */
.static-page {
    max-width: 800px;
}

.static-page h1 {
    color: var(--secondary);
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 3px solid var(--primary);
}

.static-page h2 {
    color: var(--secondary);
    margin: 30px 0 15px;
    font-size: 20px;
}

.static-page h3 {
    color: var(--text);
    margin: 20px 0 10px;
    font-size: 16px;
}

.static-page p {
    margin-bottom: 15px;
    line-height: 1.7;
}

.static-page ul,
.static-page ol {
    margin: 15px 0 15px 25px;
    list-style: disc;
}

.static-page ol {
    list-style: decimal;
}

.static-page li {
    margin-bottom: 8px;
    line-height: 1.6;
}

.static-page a {
    color: var(--primary);
    text-decoration: none;
}

.static-page a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.static-page .back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    color: var(--secondary);
    text-decoration: none;
    font-weight: 500;
}

.static-page .back-link:hover {
    color: var(--primary);
}

/* ========================================
   23. Section Tabs (Admin)
   ======================================== */
.section-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.section-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--white);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    text-decoration: none;
    transition: all 0.2s;
    font-size: 14px;
    font-weight: 500;
}

.section-tab:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-light);
}

.section-tab.active {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--white);
}

.section-tab .badge {
    background: rgba(0,0,0,0.2);
    font-size: 11px;
}

.section-tab.active .badge {
    background: rgba(255,255,255,0.25);
}

/* ========================================
   24. Content List / Items
   ======================================== */
.content-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.content-item {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 25px;
    position: relative;
    border: 1px solid var(--border);
}

.content-item.pinned {
    border-left: 4px solid var(--primary);
}

.pinned-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--primary);
    color: var(--white);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
}

.content-header {
    margin-bottom: 15px;
}

.content-header h3 {
    color: var(--secondary);
    margin: 0 0 8px;
    font-size: 18px;
}

.content-meta {
    display: flex;
    gap: 20px;
    color: var(--text-light);
    font-size: 13px;
}

.content-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.content-body {
    color: var(--text);
    line-height: 1.7;
    margin-bottom: 15px;
}

.content-attachment {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.attachment-image img {
    max-width: 100%;
    max-height: 400px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.attachment-file {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 15px 20px;
    background: var(--bg);
    border-radius: var(--radius);
    color: var(--text);
    text-decoration: none;
    transition: all 0.2s;
    border: 1px solid var(--border);
}

.attachment-file:hover {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

.attachment-file i {
    font-size: 24px;
    color: var(--primary);
}

.attachment-file:hover i {
    color: var(--white);
}

.attachment-file small {
    color: var(--text-light);
    font-size: 12px;
}

.attachment-file:hover small {
    color: rgba(255,255,255,0.8);
}

.content-link {
    margin-top: 15px;
}

.content-link a {
    color: var(--primary);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.content-link a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* ========================================
   25. Sidebar Overlay (Mobile)
   ======================================== */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15,23,42,0.5);
    z-index: 150;
}

.sidebar-overlay.active {
    display: block;
}

/* ========================================
   26. Incentive Dashboard Cards
   ======================================== */
.incentive-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.incentive-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 20px;
    border-left: 4px solid var(--primary);
    box-shadow: var(--shadow);
    border-top: 1px solid var(--border);
    border-right: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    transition: transform 0.2s, box-shadow 0.2s;
}

.incentive-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

.incentive-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
    gap: 10px;
}

.incentive-header h4 {
    font-size: 16px;
    color: var(--secondary);
    margin: 0;
}

.days-badge {
    background: var(--secondary);
    color: var(--white);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
}

.days-badge.urgent {
    background: var(--danger);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.incentive-desc {
    color: var(--text-light);
    font-size: 14px;
    margin-bottom: 15px;
    line-height: 1.5;
}

.incentive-stats {
    display: flex;
    gap: 20px;
    padding: 15px;
    background: var(--bg);
    border-radius: var(--radius);
    margin-bottom: 15px;
}

.incentive-stats .stat {
    text-align: center;
    flex: 1;
}

.incentive-stats .stat-value {
    display: block;
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
    font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
}

.incentive-stats .stat-label {
    font-size: 11px;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

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

.incentive-period i {
    margin-right: 5px;
    color: var(--primary);
}

/* Incentive Page Styles */
.incentive-hero {
    background: linear-gradient(135deg, var(--secondary) 0%, #0D1B2A 100%);
    color: var(--white);
    padding: 30px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}

.incentive-hero::after {
    content: '';
    position: absolute;
    top: -30%;
    right: -10%;
    width: 250px;
    height: 250px;
    background: rgba(37,99,235,0.1);
    border-radius: 50%;
    pointer-events: none;
}

.incentive-hero h2 {
    margin-bottom: 10px;
    position: relative;
}

.incentive-hero .period {
    opacity: 0.8;
    position: relative;
}

.points-display {
    display: flex;
    gap: 30px;
    margin-top: 20px;
    position: relative;
}

.points-display .points-box {
    text-align: center;
}

.points-display .points-value {
    font-size: 36px;
    font-weight: 700;
    font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
}

.points-display .points-label {
    font-size: 12px;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sales-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.sales-input-group {
    text-align: center;
}

.sales-input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text);
    font-size: 14px;
}

.sales-input-group .points-info {
    font-size: 12px;
    color: var(--text-light);
    margin-top: 5px;
}

.sales-input-group input[type="number"] {
    text-align: center;
    font-size: 24px;
    font-weight: 700;
    padding: 15px;
    width: 100%;
    font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
}

/* ========================================
   27. Ranking List
   ======================================== */
.ranking-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ranking-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    border-bottom: 1px solid var(--border);
    gap: 15px;
    transition: background 0.2s;
}

.ranking-item:last-child {
    border-bottom: none;
}

.ranking-item:hover {
    background: var(--bg);
}

.ranking-item.current-user {
    background: rgba(37,99,235,0.05);
    border-left: 3px solid var(--primary);
}

.rank-number {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    border-radius: 50%;
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
    flex-shrink: 0;
}

.rank-number.gold {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #333;
}

.rank-number.silver {
    background: linear-gradient(135deg, #C0C0C0, #A0A0A0);
    color: #333;
}

.rank-number.bronze {
    background: linear-gradient(135deg, #CD7F32, #A0522D);
    color: #fff;
}

.ranking-name {
    flex: 1;
    font-weight: 500;
}

.ranking-points {
    font-weight: 700;
    color: var(--primary);
    font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
}

/* ========================================
   28. Prize Rows (Admin Incentive)
   ======================================== */
.prize-row {
    display: grid;
    grid-template-columns: 60px 1fr 1fr 80px;
    gap: 15px;
    align-items: center;
    padding: 15px;
    background: var(--bg);
    border-radius: var(--radius);
    margin-bottom: 10px;
    border: 1px solid var(--border);
}

.prize-row .place-badge {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: 700;
    font-size: 16px;
}

.prize-row .place-badge.place-1 {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #333;
}

.prize-row .place-badge.place-2 {
    background: linear-gradient(135deg, #C0C0C0, #A0A0A0);
    color: #333;
}

.prize-row .place-badge.place-3 {
    background: linear-gradient(135deg, #CD7F32, #A0522D);
    color: #fff;
}

.prize-row .place-badge.place-4,
.prize-row .place-badge.place-5 {
    background: var(--secondary);
    color: #fff;
}

/* ========================================
   29. Product Points Grid
   ======================================== */
.product-points-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.product-point-card {
    text-align: center;
    padding: 20px;
    background: var(--bg);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    transition: border-color 0.2s;
}

.product-point-card:hover {
    border-color: var(--primary);
}

.product-point-card label {
    display: block;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text);
    font-size: 14px;
}

.product-point-card input {
    text-align: center;
    font-size: 20px;
    font-weight: 700;
    width: 80px;
    font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
}

/* ========================================
   30. Utilities
   ======================================== */
.text-muted {
    color: var(--text-light);
}

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

.text-right {
    text-align: right;
}

.text-primary {
    color: var(--primary);
}

.text-accent {
    color: var(--accent);
}

.text-success {
    color: var(--success);
}

.text-danger {
    color: var(--danger);
}

.text-warning {
    color: var(--warning);
}

.text-small {
    font-size: 13px;
}

.font-bold {
    font-weight: 700;
}

.mt-1 {
    margin-top: 10px;
}

.mt-2 {
    margin-top: 20px;
}

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

.mb-1 {
    margin-bottom: 10px;
}

.mb-2 {
    margin-bottom: 20px;
}

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

.p-1 {
    padding: 10px;
}

.p-2 {
    padding: 20px;
}

.d-flex {
    display: flex;
}

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

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

.gap-1 {
    gap: 10px;
}

.gap-2 {
    gap: 20px;
}

.hidden {
    display: none !important;
}

/* ========================================
   31. Action Buttons
   ======================================== */
.actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.action-btn {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.2s;
    font-weight: 500;
}

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

.action-btn-edit:hover {
    background: var(--primary-dark);
}

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

.action-btn-delete:hover {
    background: #B91C1C;
}

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

.action-btn-view:hover {
    background: #1E293B;
}

/* ========================================
   32. Responsive Breakpoints (768px)
   ======================================== */
@media (max-width: 768px) {
    /* Sidebar Mobile */
    .sidebar {
        transform: translateX(-100%);
        z-index: 200;
        transition: transform 0.3s ease;
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .sidebar-toggle {
        display: block;
    }

    /* Layout */
    .main-content {
        margin-left: 0;
    }

    .site-footer {
        margin-left: 0;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .footer-nav {
        justify-content: center;
    }

    /* Topbar */
    .topbar {
        padding: 12px 15px;
    }

    .topbar h2 {
        font-size: 16px;
    }

    .user-info {
        font-size: 12px;
    }

    .user-email {
        display: none;
    }

    /* Content Area */
    .content {
        padding: 15px;
    }

    /* Grids */
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .section-grid {
        grid-template-columns: 1fr;
    }

    /* Tables */
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .table {
        min-width: 600px;
    }

    /* Cards */
    .card-header {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }

    /* Forms & Buttons */
    .btn {
        width: 100%;
        justify-content: center;
    }

    .btn-small {
        width: auto;
    }

    .actions {
        flex-direction: column;
    }

    .actions .btn,
    .actions .action-btn {
        width: 100%;
        justify-content: center;
    }

    /* Welcome Card */
    .welcome-card {
        padding: 20px;
    }

    .welcome-card h2 {
        font-size: 18px;
    }

    /* Announcements */
    .announcement-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    /* Incentive */
    .incentive-grid {
        grid-template-columns: 1fr;
    }

    .incentive-stats {
        flex-wrap: wrap;
    }

    .incentive-stats .stat {
        min-width: calc(50% - 10px);
    }

    .points-display {
        flex-direction: column;
        gap: 15px;
    }

    .sales-form-grid {
        grid-template-columns: 1fr;
    }

    .prize-row {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 10px;
    }

    .prize-row .place-badge {
        margin: 0 auto;
    }

    .product-points-grid {
        grid-template-columns: 1fr;
    }

    /* Section Tabs */
    .section-tabs {
        flex-direction: column;
    }

    .section-tab {
        width: 100%;
        justify-content: center;
    }

    /* Modal */
    .modal {
        width: 95%;
        max-height: 85vh;
    }

    /* Content Meta */
    .content-meta {
        flex-direction: column;
        gap: 5px;
    }

    /* Ranking */
    .ranking-item {
        padding: 10px 12px;
    }
}

/* Small mobile adjustments */
@media (max-width: 480px) {
    .auth-card {
        border-radius: var(--radius);
    }

    .auth-header,
    .auth-body {
        padding: 20px;
    }

    .stat-card {
        padding: 15px;
    }

    .stat-content h3 {
        font-size: 22px;
    }

    .section-card {
        padding: 15px;
    }
}
