/**
 * TeamRed Allgäu - Stylesheet
 * Vodafone Vertriebsteam
 */

:root {
    --primary: #E60000;
    --primary-dark: #CC0000;
    --secondary: #1E3A5F;
    --accent: #4A9B4E;
    --bg: #F5F5F5;
    --text: #333333;
    --text-light: #666666;
    --border: #E0E0E0;
    --success: #28A745;
    --warning: #FFC107;
    --danger: #DC3545;
    --white: #FFFFFF;
    --shadow: 0 2px 8px rgba(0,0,0,0.1);
    --radius: 8px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

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;
}

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

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

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

.auth-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

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

.auth-header h1 { font-size: 24px; margin-bottom: 5px; }
.auth-header p { opacity: 0.9; font-size: 14px; }

.auth-body { padding: 30px; }

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

.sidebar {
    width: 250px;
    background: var(--secondary);
    color: var(--white);
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

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

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

.sidebar-header h1 { font-size: 20px; }
.sidebar-header span { font-size: 12px; opacity: 0.9; }

/* Logo */
.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(--white);
    margin: 0;
}

.logo-fallback span {
    color: rgba(255,255,255,0.9);
}

.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.5);
}

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

.nav-link:hover {
    background: rgba(255,255,255,0.1);
    color: var(--white);
}

.nav-link.active {
    background: rgba(255,255,255,0.15);
    border-left-color: var(--primary);
    color: var(--white);
}

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

.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; }
}

/* Sidebar Besuchszähler Widget */
.sidebar-visit-widget {
    margin: 12px;
    background: linear-gradient(145deg, rgba(74,155,78,0.15) 0%, rgba(30,58,95,0.3) 100%);
    border-radius: 12px;
    border: 1px solid rgba(74,155,78,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: #6dd47e; }
.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, #4A9B4E, #6dd47e);
    border-radius: 4px;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 6px rgba(74,155,78,0.4);
}
.visit-progress-fill.complete {
    background: linear-gradient(90deg, #28a745, #20c997);
    box-shadow: 0 0 8px rgba(40,167,69,0.5);
}
.visit-progress-stats {
    display: flex;
    align-items: baseline;
    gap: 3px;
    font-family: inherit;
}
.visit-done { font-size: 20px; font-weight: 800; color: #6dd47e; 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, #4A9B4E, #3d8b41);
    color: white;
    box-shadow: 0 2px 6px rgba(74,155,78,0.35);
}
.visit-btn-count:hover {
    background: linear-gradient(135deg, #5aab5e, #4A9B4E);
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(74,155,78,0.4);
}
.visit-btn-count:active { transform: translateY(0); box-shadow: 0 1px 3px rgba(74,155,78,0.3); }

.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-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: #6dd47e; outline: none; box-shadow: 0 0 0 2px rgba(74,155,78,0.2); }
.visit-target-form button {
    width: 28px; height: 28px;
    border: none; border-radius: 6px;
    background: linear-gradient(135deg, #4A9B4E, #3d8b41);
    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(74,155,78,0.3);
}
.visit-target-form button:hover { background: #218838; }

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

.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;
}

.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;
}

.content { padding: 25px; }

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

.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; }

/* 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;
}

.welcome-card h2 { margin-bottom: 10px; }
.welcome-card .text-muted { color: rgba(255,255,255,0.85); }

/* 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);
}

.stat-icon { font-size: 32px; }

.stat-content h3 {
    font-size: 28px;
    color: var(--secondary);
    margin-bottom: 2px;
}

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

/* 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(--bg);
    border-radius: var(--radius);
    border-left: 4px solid var(--primary);
    text-decoration: none;
    color: var(--text);
    transition: all 0.2s;
}

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

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

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

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

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

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

.form-control:focus {
    outline: none;
    border-color: var(--primary);
}

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

/* 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;
}

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

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

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

.btn-success { background: var(--success); color: var(--white); }
.btn-danger { background: var(--danger); color: var(--white); }
.btn-block { width: 100%; }
.btn-small { padding: 8px 15px; font-size: 13px; }

/* 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-danger { background: var(--danger); }
.badge-warning { background: var(--warning); color: var(--text); }
.badge-success { background: var(--success); }

/* Alerts */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    border-left: 4px solid;
}

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

.alert-success {
    background: #D1FAE5;
    border-color: var(--success);
    color: #065F46;
}

.alert-warning {
    background: #FEF3C7;
    border-color: var(--warning);
    color: #92400E;
}

/* Tables */
.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;
}

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

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

.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, 53, 69, 0.05);
}

.announcement-item.priority-important {
    border-left-color: var(--warning);
    background: rgba(255, 193, 7, 0.08);
}

.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: #333;
}

.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;
}

/* Legacy support */
.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; }

/* Utilities */
.text-muted { color: var(--text-light); }
.text-center { text-align: center; }
.mt-1 { margin-top: 10px; }
.mt-2 { margin-top: 20px; }
.mb-1 { margin-bottom: 10px; }
.mb-2 { margin-bottom: 20px; }

/* Actions */
.actions {
    display: flex;
    gap: 8px;
}

.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;
}

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

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s;
}

.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;
}

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

.modal-body { padding: 20px; }

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

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

.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.8);
    text-decoration: none;
    transition: color 0.2s;
}

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

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

.static-page h1 {
    color: var(--secondary);
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px 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;
}

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

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

.static-page a:hover {
    text-decoration: underline;
}

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

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

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

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

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

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

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

/* Content List */
.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;
}

.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;
    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;
}

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

.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;
}

.content-link a:hover {
    text-decoration: underline;
}

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

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

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

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

    .sidebar-toggle {
        display: block;
    }

    .main-content { margin-left: 0; }

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

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

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

    .topbar {
        padding: 15px;
    }

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

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

    .user-email {
        display: none;
    }

    .content {
        padding: 15px;
    }

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

    .table {
        min-width: 600px;
    }

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

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

    .btn-small {
        width: auto;
    }

    .actions {
        flex-direction: column;
    }

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

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

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

/* ========================================
   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);
}

.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(--text);
    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;
}

.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);
}

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

.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;
}

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

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

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

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

.points-display .points-value {
    font-size: 36px;
    font-weight: 700;
}

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

.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);
}

.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%;
}

.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;
}

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

.ranking-item.current-user {
    background: rgba(230, 0, 0, 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;
}

.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);
}

/* Admin Incentive Styles */
.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;
}

.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;
}

.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);
}

.product-point-card label {
    display: block;
    font-weight: 600;
    margin-bottom: 10px;
}

.product-point-card input {
    text-align: center;
    font-size: 20px;
    font-weight: 700;
    width: 80px;
}

@media (max-width: 768px) {
    .incentive-grid {
        grid-template-columns: 1fr;
    }

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

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

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

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

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