/* Admin Panel Styles for Coffee Label Generator - Coffee Theme */

/* Import base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #2c3e50;
    background: linear-gradient(135deg, #6B4E3D 0%, #3C2A21 50%, #8B4513 100%);
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 10;
}

/* Coffee background elements */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(107, 78, 61, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(139, 69, 19, 0.1) 0%, transparent 50%);
    pointer-events: none;
    z-index: 1;
}

/* Header */
.header {
    margin-bottom: 40px;
    background: rgba(255, 255, 255, 0.95);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.app-branding {
    display: flex;
    align-items: center;
    gap: 16px;
}

.header-coffee-icon {
    font-size: 3em;
    animation: bounce 2s infinite ease-in-out;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

.app-branding h1 {
    font-size: 2.2em;
    font-weight: 700;
    margin: 0;
    background: linear-gradient(135deg, #6B4E3D, #8B4513);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header-subtitle {
    color: #666;
    font-size: 1em;
    margin: 0;
    font-weight: 500;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #6B4E3D;
    font-weight: 500;
}

.user-info button {
    background: linear-gradient(135deg, #6B4E3D, #8B4513);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.9em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.user-info button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(107, 78, 61, 0.3);
}

.admin-nav {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(107, 78, 61, 0.1);
    backdrop-filter: blur(10px);
}

.nav-btn {
    padding: 12px 24px;
    border: none;
    background: rgba(107, 78, 61, 0.1);
    color: #6B4E3D;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.nav-btn:hover {
    background: rgba(107, 78, 61, 0.2);
    transform: translateY(-1px);
}

.nav-btn.active {
    background: linear-gradient(135deg, #6B4E3D, #8B4513);
    color: white;
    box-shadow: 0 4px 12px rgba(107, 78, 61, 0.3);
}

.admin-section {
    display: none;
    padding: 20px;
}

.admin-section.active {
    display: block;
}

.admin-form {
    max-width: 500px;
    background: #f8f9fa;
    padding: 30px;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.admin-form .form-group {
    margin-bottom: 20px;
}

.admin-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #495057;
}

.admin-form input,
.admin-form select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
}

.admin-form small {
    display: block;
    margin-top: 5px;
    color: #6c757d;
    font-size: 12px;
}

.admin-form input[type="checkbox"] {
    width: auto;
    margin-right: 8px;
}

.result-message {
    margin-top: 15px;
    padding: 10px;
    border-radius: 4px;
    font-size: 14px;
}

.result-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.result-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.users-container {
    margin-top: 20px;
}

.user-card {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.user-card.deactivated {
    background: #f8f9fa;
    border-color: #dc3545;
    opacity: 0.8;
}

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

.user-header h3 {
    margin: 0;
    color: #495057;
    font-size: 18px;
}

.user-badges {
    display: flex;
    gap: 8px;
}

.badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.badge.admin {
    background: #dc3545;
    color: white;
}

.badge.tier {
    background: #17a2b8;
    color: white;
}

.badge.status.active {
    background: #28a745;
    color: white;
}

.badge.status.inactive {
    background: #dc3545;
    color: white;
}

.user-details p {
    margin: 5px 0;
    color: #6c757d;
    font-size: 14px;
}

.system-info {
    margin-top: 20px;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.info-card {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.info-card h3 {
    margin: 0 0 15px 0;
    color: #495057;
    font-size: 16px;
    border-bottom: 1px solid #dee2e6;
    padding-bottom: 10px;
}

.info-card p {
    margin: 8px 0;
    color: #6c757d;
    font-size: 14px;
}

.status.healthy {
    color: #28a745;
    font-weight: 600;
}

.error-container {
    text-align: center;
    padding: 50px 20px;
    background: #f8f9fa;
    border-radius: 8px;
    margin: 20px 0;
}

.error-container h2 {
    color: #dc3545;
    margin-bottom: 15px;
}

.loading {
    text-align: center;
    padding: 20px;
    color: #6c757d;
    font-style: italic;
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #6c757d;
    background: #f8f9fa;
    border-radius: 8px;
    font-style: italic;
}

.error {
    background: #f8d7da;
    color: #721c24;
    padding: 15px;
    border-radius: 4px;
    border: 1px solid #f5c6cb;
}

/* Auth form styles for admin panel */

/* User Actions */
.user-actions {
    display: flex;
    gap: 8px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(107, 78, 61, 0.1);
}

.btn-small {
    padding: 6px 12px;
    font-size: 0.85em;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    font-weight: 500;
}

.btn-secondary {
    background: rgba(107, 78, 61, 0.1);
    color: #6B4E3D;
    border: 1px solid rgba(107, 78, 61, 0.2);
}

.btn-secondary:hover {
    background: rgba(107, 78, 61, 0.2);
    transform: translateY(-1px);
}

.btn-warning {
    background: linear-gradient(135deg, #f39c12, #e67e22);
    color: white;
    border: none;
}

.btn-warning:hover {
    background: linear-gradient(135deg, #e67e22, #d35400);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(243, 156, 18, 0.3);
}

.btn-danger {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
    border: none;
}

.btn-danger:hover:not(:disabled) {
    background: linear-gradient(135deg, #c0392b, #a93226);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
}

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

.btn-success {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    border: none;
}

.btn-success:hover {
    background: linear-gradient(135deg, #20c997, #17a2b8);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

/* Edit User Form */
.edit-user-form {
    background: rgba(255, 255, 255, 0.95);
    padding: 24px;
    border-radius: 12px;
    border: 2px solid #6B4E3D;
    backdrop-filter: blur(10px);
}

.edit-user-form h3 {
    color: #6B4E3D;
    margin-bottom: 20px;
    font-size: 1.3em;
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.result-message.success {
    background: rgba(46, 204, 113, 0.1);
    color: #27ae60;
    border: 1px solid rgba(46, 204, 113, 0.3);
}

.result-message.error {
    background: rgba(231, 76, 60, 0.1);
    color: #e74c3c;
    border: 1px solid rgba(231, 76, 60, 0.3);
}

/* Mobile responsive for actions */
@media (max-width: 768px) {
    .user-actions {
        flex-wrap: wrap;
    }
    
    .btn-small {
        flex: 1;
        min-width: 100px;
    }
    
    .form-actions {
        flex-direction: column;
    }
}
.auth-form {
    max-width: 400px;
    margin: 50px auto;
    padding: 40px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    text-align: center;
}

.auth-form h2 {
    margin-bottom: 10px;
    color: #495057;
}

.auth-form p {
    margin-bottom: 30px;
    color: #6c757d;
}

.auth-form .form-group {
    margin-bottom: 20px;
    text-align: left;
}

.auth-form label {
    display: block;
    margin-bottom: 5px;
    color: #495057;
    font-weight: 600;
}

.auth-form input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
}

.auth-form .btn {
    width: 100%;
    padding: 12px;
    font-size: 16px;
}

.error-message {
    margin-top: 15px;
    padding: 10px;
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    font-size: 14px;
    text-align: center;
}

/* Feedback Section Styles */
.feedback-container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.feedback-actions {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.feedback-actions .btn {
    min-width: 150px;
}

.feedback-stats {
    margin-bottom: 25px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.stat-card {
    background: rgba(107, 78, 61, 0.05);
    padding: 20px;
    border-radius: 12px;
    border-left: 4px solid #6B4E3D;
}

.stat-card h4 {
    color: #6B4E3D;
    margin-bottom: 10px;
    font-size: 1.1em;
}

.stat-card p {
    margin-bottom: 8px;
    color: #555;
}

.stat-card small {
    color: #666;
    font-style: italic;
}

.feedback-notice {
    background: rgba(139, 69, 19, 0.05);
    padding: 25px;
    border-radius: 12px;
    border-left: 4px solid #8B4513;
}

.feedback-notice h4 {
    color: #8B4513;
    margin-bottom: 15px;
    font-size: 1.2em;
}

.feedback-notice p {
    margin-bottom: 12px;
    color: #555;
    line-height: 1.6;
}

.feedback-notice ul {
    margin-left: 20px;
    color: #555;
}

.feedback-notice li {
    margin-bottom: 5px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .feedback-actions {
        flex-direction: column;
    }
    
    .feedback-actions .btn {
        width: 100%;
        min-width: unset;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

/* =================================
   NOTIFICATIONS DASHBOARD STYLES
   ================================= */

/* Dashboard Metrics Cards */
.dashboard-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.metric-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 2px solid transparent;
}

.metric-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.metric-card.alert {
    border-color: #e74c3c;
    background: linear-gradient(135deg, rgba(231, 76, 60, 0.05) 0%, rgba(255, 255, 255, 0.95) 100%);
}

.metric-icon {
    font-size: 2.5rem;
    margin-right: 15px;
    opacity: 0.8;
}

.metric-content {
    flex: 1;
}

.metric-label {
    font-size: 0.9rem;
    color: #7f8c8d;
    font-weight: 500;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.metric-value {
    font-size: 2rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 5px;
    line-height: 1;
}

.metric-detail {
    font-size: 0.85rem;
    color: #95a5a6;
    font-weight: 500;
}

/* Dashboard Actions */
.dashboard-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.dashboard-filters {
    display: flex;
    gap: 10px;
    align-items: center;
}

.dashboard-filters select {
    min-width: 140px;
}

/* Activity Timeline */
.activity-timeline {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.activity-timeline h3 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 1.3rem;
    font-weight: 600;
    display: flex;
    align-items: center;
}

.activity-timeline h3:before {
    content: '📊';
    margin-right: 10px;
    font-size: 1.2rem;
}

.timeline-container {
    position: relative;
}

.timeline-feed {
    max-height: 600px;
    overflow-y: auto;
    padding-right: 10px;
}

.timeline-event {
    position: relative;
    padding: 15px 0;
    border-left: 3px solid #3498db;
    padding-left: 25px;
    margin-left: 10px;
    margin-bottom: 15px;
}

.timeline-event:last-child {
    margin-bottom: 0;
}

.timeline-event::before {
    content: '';
    position: absolute;
    left: -7px;
    top: 20px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #3498db;
    border: 3px solid rgba(255, 255, 255, 0.95);
}

/* Event type specific colors */
.timeline-event.signup {
    border-left-color: #27ae60;
}

.timeline-event.signup::before {
    background: #27ae60;
}

.timeline-event.upgrade {
    border-left-color: #f39c12;
}

.timeline-event.upgrade::before {
    background: #f39c12;
}

.timeline-event.issue {
    border-left-color: #e74c3c;
}

.timeline-event.issue::before {
    background: #e74c3c;
}

.timeline-event.admin {
    border-left-color: #9b59b6;
}

.timeline-event.admin::before {
    background: #9b59b6;
}

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

.event-title {
    font-weight: 600;
    color: #2c3e50;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.event-icon {
    font-size: 1.1rem;
}

.event-time {
    font-size: 0.85rem;
    color: #95a5a6;
    font-weight: 500;
}

.event-details {
    color: #7f8c8d;
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 8px;
}

.event-meta {
    display: flex;
    gap: 15px;
    font-size: 0.8rem;
    color: #bdc3c7;
}

.event-actions {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.event-actions .btn {
    padding: 4px 12px;
    font-size: 0.8rem;
    border-radius: 15px;
}

/* Revenue indicators */
.revenue-positive {
    color: #27ae60;
    font-weight: 600;
}

.revenue-negative {
    color: #e74c3c;
    font-weight: 600;
}

.revenue-neutral {
    color: #95a5a6;
    font-weight: 500;
}

/* Loading states */
#timeline-loading {
    text-align: center;
    padding: 40px;
    color: #95a5a6;
    font-style: italic;
}

#load-more-container {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #ecf0f1;
}

/* Empty state */
.timeline-empty {
    text-align: center;
    padding: 60px 20px;
    color: #95a5a6;
}

.timeline-empty::before {
    content: '📭';
    display: block;
    font-size: 3rem;
    margin-bottom: 15px;
    opacity: 0.5;
}

/* Responsive design for notifications */
@media (max-width: 768px) {
    .dashboard-metrics {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .dashboard-actions {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .dashboard-filters {
        justify-content: center;
    }
    
    .dashboard-filters select {
        min-width: 120px;
    }
    
    .event-header {
        flex-direction: column;
        gap: 5px;
    }
    
    .event-time {
        align-self: flex-start;
    }
    
    .event-meta {
        flex-direction: column;
        gap: 5px;
    }
    
    .timeline-feed {
        max-height: 400px;
    }
}

@media (max-width: 480px) {
    .metric-card {
        flex-direction: column;
        text-align: center;
        padding: 15px;
    }
    
    .metric-icon {
        margin-right: 0;
        margin-bottom: 10px;
    }
    
    .timeline-event {
        margin-left: 5px;
        padding-left: 20px;
    }
    
    .dashboard-filters {
        flex-direction: column;
        width: 100%;
    }
    
    .dashboard-filters select {
        width: 100%;
        min-width: unset;
    }
}