/* ========================================
   STITCH PREMIUM DESIGN SYSTEM
   Bento Grid & Teal Theme (No Purple)
   ======================================== */

/* Overrides for design-premium.css to eliminate purple and replace with Teal/Blue */

:root {
    /* Stitch Teal Theme */
    --stitch-teal: #0d9488;
    --stitch-teal-light: #14b8a6;
    --stitch-teal-dark: #0f766e;
    --teal-alpha: rgba(13, 148, 136, 0.1);
    
    --stitch-blue: #2563eb;
    --stitch-blue-light: #3b82f6;
    --stitch-blue-dark: #1d4ed8;
    --blue-alpha: rgba(37, 99, 235, 0.1);
    
    /* Overriding Purple variables from design-premium.css if they exist */
    --primary-color: #0d9488 !important;
    --primary-dark: #0f766e !important;
    --primary-light: #14b8a6 !important;
    --primary-alpha: rgba(13, 148, 136, 0.1) !important;
}

/* Background utilities */
.bg-teal-alpha { background-color: var(--teal-alpha) !important; }
.bg-blue-alpha { background-color: var(--blue-alpha) !important; }

/* Text utilities */
.text-teal { color: var(--stitch-teal) !important; }
.text-blue { color: var(--stitch-blue) !important; }

/* Bento Grid System additions */
.bento-grid-premium {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
    width: 100%;
}

.bento-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
    width: 100%;
}

@media (max-width: 1200px) {
    .bento-grid-premium {
        grid-template-columns: repeat(2, 1fr);
    }
    .bento-grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .bento-grid-premium, .bento-grid-3 {
        grid-template-columns: 1fr;
    }
}

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

.bento-col-span-12 {
    grid-column: 1 / -1 !important;
}

.bento-item {
    background: #ffffff;
    border-radius: 16px;
    padding: 1.5rem 1.25rem;
    border: 1px solid rgba(0,0,0,0.05);
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    text-decoration: none;
    color: inherit;
    position: relative;
    overflow: hidden;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.bento-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(13, 148, 136, 0.15); /* Teal shadow */
    border-color: var(--stitch-teal);
}

.bento-item-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    margin-bottom: 1rem;
    background: var(--teal-alpha);
    color: var(--stitch-teal);
    transition: transform 0.3s ease;
}

.bento-item:hover .bento-item-icon {
    transform: scale(1.1);
}

.bento-item-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.bento-item-label {
    font-size: 0.9rem;
    color: #6b7280;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.bento-item-value {
    font-size: 1.75rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    color: #1f2937;
}

.bento-item-sub {
    font-size: 0.85rem;
    color: #9ca3af;
}

/* Page Header Premium */
.page-header-premium {
    background: #ffffff;
    border-radius: 20px;
    padding: 2rem;
    color: #1f2937;
    margin-top: calc(var(--header-height, 80px) + 1rem); /* Clear the fixed header */
    margin-bottom: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 2rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
    border: 1px solid rgba(0,0,0,0.05);
    position: relative;
    overflow: hidden;
}

.page-header-premium::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, var(--teal-alpha) 0%, transparent 70%);
    border-radius: 50%;
}

.page-header-title {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    position: relative;
    z-index: 2;
}

.page-header-icon {
    font-size: 3rem;
    background: var(--teal-alpha);
    color: var(--stitch-teal);
    padding: 1rem;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.page-header-text h1 {
    margin: 0 0 0.5rem 0;
    font-size: 2rem;
    font-weight: 800;
    color: #1f2937;
}

.page-header-text p {
    margin: 0;
    font-size: 1.1rem;
    color: #6b7280;
}

.page-header-actions {
    position: relative;
    z-index: 2;
}

/* Button overrides for Teal on White Background */
.btn-action {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid transparent;
    cursor: pointer;
    font-size: 0.95rem;
}

.btn-action-primary {
    background: var(--teal-alpha);
    color: var(--stitch-teal-dark);
    border: 1px solid rgba(13, 148, 136, 0.2);
}
.btn-action-primary:hover {
    background: var(--stitch-teal);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(13, 148, 136, 0.2);
}

.btn-action-success {
    background: rgba(34, 197, 94, 0.1);
    color: #166534;
    border: 1px solid rgba(34, 197, 94, 0.2);
}
.btn-action-success:hover {
    background: #22c55e;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.2);
}

.btn-action-danger {
    background: rgba(239, 68, 68, 0.1);
    color: #991b1b;
    border: 1px solid rgba(239, 68, 68, 0.2);
}
.btn-action-danger:hover {
    background: #ef4444;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2);
}

.btn-action-warning {
    background: rgba(245, 158, 11, 0.1);
    color: #92400e;
    border: 1px solid rgba(245, 158, 11, 0.2);
}
.btn-action-warning:hover {
    background: #f59e0b;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.2);
}

/* Eradicate any purple specifically */
.text-purple, .text-purple-600 { color: var(--stitch-teal) !important; }
.bg-purple-100 { background-color: var(--teal-alpha) !important; }
.card-premium-header-purple { background: linear-gradient(135deg, var(--stitch-teal) 0%, var(--stitch-teal-light) 100%) !important; }
.badge-premium-purple { background-color: var(--teal-alpha) !important; color: var(--stitch-teal) !important; border-color: var(--stitch-teal) !important; }

/* General utility class */
.text-muted { color: #6b7280; }

/* ===== NOTIFICATIONS GRID & CARDS (BENTO STYLE) ===== */
.notifications-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.notification-card {
    background: #ffffff;
    border-radius: 1.5rem !important;
    padding: 1.5rem !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05) !important;
    border: 1px solid rgba(0, 0, 0, 0.05) !important;
    display: flex;
    flex-direction: row; /* Horizontal layout */
    align-items: flex-start; /* Align top */
    gap: 1rem; /* Space between icon and content */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
    color: #111827;
}

.notification-card::before {
    display: none !important; /* Remove old color bars at the top */
}

.notification-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1) !important;
}

/* Notification Icons */
.notification-icon {
    font-size: 2rem !important;
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.05); /* Soft background for icon */
    border-radius: 50%;
}

.notification-card-danger .notification-icon {
    background: rgba(239, 68, 68, 0.1);
}
.notification-card-success .notification-icon {
    background: rgba(16, 185, 129, 0.1);
}
.notification-card-warning .notification-icon {
    background: rgba(245, 158, 11, 0.1);
}

.notification-content {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    width: 100%;
}

.notification-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 0.5rem;
}

.notification-message {
    font-size: 0.95rem;
    color: #4b5563;
    margin-bottom: 1.5rem;
    line-height: 1.4;
}

.notification-meta {
    display: flex;
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.notification-date {
    font-size: 0.85rem;
    color: #6b7280;
    font-weight: 500;
}

.notification-badge {
    padding: 0.35rem 0.85rem;
    border-radius: 2rem;
    font-size: 0.85rem;
    font-weight: 600;
}

.badge-resolved, .badge-ok {
    background: rgba(16, 185, 129, 0.1) !important;
    color: #10b981 !important;
}
.badge-warning {
    background: rgba(245, 158, 11, 0.1) !important;
    color: #f59e0b !important;
}
.badge-alert {
    background: rgba(239, 68, 68, 0.1) !important;
    color: #ef4444 !important;
}

.notification-action {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: #f3f4f6;
    color: #111827;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 0.85rem;
    text-decoration: none;
    transition: background 0.2s ease, transform 0.2s ease;
    align-self: flex-start; /* Align left under content */
    margin-top: 0.5rem;
}

.notification-action:hover {
    background: #e5e7eb;
    transform: scale(1.05);
}

/* Responsive Notifications Grid */
@media (max-width: 1200px) {
    .notifications-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

/* Bento Grid 3 & Site Card Styles */
.bento-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

@media (max-width: 992px) {
    .bento-grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

.bento-site-card {
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    align-items: stretch !important;
    text-align: left !important;
    padding: 1.5rem;
    height: 100%;
}

.bento-site-card .bento-item-header {
    margin-bottom: 1.5rem;
    width: 100%;
}

.bento-site-card .bento-item-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 0 !important;
    flex-shrink: 0;
}

.bento-site-card h4 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--stitch-gray-900, #111827);
    letter-spacing: -0.01em;
    margin-bottom: 0.25rem;
}

.bento-site-card .bento-item-body {
    background: #f8fafc;
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1rem;
    border: 1px solid #f1f5f9;
    flex-grow: 1;
}

.bento-site-card .stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 0.75rem;
    margin-bottom: 0.75rem;
    border-bottom: 1px dashed #e2e8f0;
}

.bento-site-card .stat-row:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.bento-site-card .stat-label {
    font-size: 0.875rem;
    color: #64748b;
    font-weight: 500;
}

.bento-site-card .stat-value {
    font-size: 1rem;
    font-weight: 700;
}

.bento-site-card .bento-action-link {
    font-size: 0.875rem;
    font-weight: 600;
    text-align: right;
    display: block;
    width: 100%;
    transition: transform 0.2s ease;
}

.bento-site-card:hover .bento-action-link {
    transform: translateX(4px);
}
