/**
 * SushiWP Monitor Public Styles
 * Version: 1.0.0
 */

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

body.sushiwp-status-page {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #f4f6f8;
    color: #1a1a1a;
    line-height: 1.6;
    min-height: 100vh;
}

/* -------------------------------------------------------
   Header
------------------------------------------------------- */

.status-header {
    background: #00b4b6;
    padding: 20px 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0;
}

.status-header img {
    height: 36px;
    width: auto;
}

.logout-btn {
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.4);
    color: #fff;
    padding: 6px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    transition: background 0.2s;
}

.logout-btn:hover {
    background: rgba(255,255,255,0.3);
}

/* -------------------------------------------------------
   Container
------------------------------------------------------- */

.status-container {
    max-width: 1000px;
    margin: 0 auto;
    padding-bottom: 60px;
}

/* -------------------------------------------------------
   Site header
------------------------------------------------------- */

.site-header {
    text-align: center;
    padding: 40px 20px 20px;
}

.site-header h1 {
    font-size: 28px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 6px;
}

.site-header a {
    font-size: 14px;
    color: #666;
    text-decoration: none;
}

.site-header a:hover {
    color: #00b4b6;
}

/* -------------------------------------------------------
   Status badge
------------------------------------------------------- */

.status-badge {
    margin: 20px;
    padding: 20px 24px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-size: 17px;
    font-weight: 600;
    border: 2px solid;
}

.status-operational {
    background: #f0fdf4;
    border-color: #86efac;
    color: #15803d;
}

.status-degraded {
    background: #fffbeb;
    border-color: #fbbf24;
    color: #b45309;
}

.status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}

.status-operational .status-indicator {
    background: #22c55e;
    box-shadow: 0 0 0 4px rgba(34,197,94,0.2);
}

.status-degraded .status-indicator {
    background: #f59e0b;
    box-shadow: 0 0 0 4px rgba(245,158,11,0.2);
}

/* -------------------------------------------------------
   Stats grid
------------------------------------------------------- */

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

.stat-card {
    background: #fff;
    padding: 28px 20px;
    border-radius: 8px;
    text-align: center;
    border: 1px solid #e5e5e5;
}

.stat-label {
    font-size: 13px;
    color: #666;
    margin-bottom: 10px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    font-size: 38px;
    font-weight: 700;
    color: #00b4b6;
    margin-bottom: 6px;
    line-height: 1;
}

.stat-sublabel {
    font-size: 12px;
    color: #999;
}

/* -------------------------------------------------------
   Sections
------------------------------------------------------- */

.site-section {
    margin: 0 20px 40px;
}

.site-section h2 {
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e5e5e5;
}

/* -------------------------------------------------------
   Uptime bar
------------------------------------------------------- */

.uptime-bar {
    display: flex;
    gap: 2px;
    height: 40px;
    align-items: center;
    background: #fff;
    padding: 8px;
    border-radius: 8px;
    border: 1px solid #e5e5e5;
    overflow-x: auto;
}

.check-indicator {
    flex: 1;
    min-width: 4px;
    height: 24px;
    border-radius: 2px;
    transition: all 0.2s;
}

.check-indicator:hover {
    transform: scaleY(1.2);
    cursor: pointer;
}

.check-up   { background: #22c55e; }
.check-down { background: #ef4444; }

.uptime-bar-legend {
    display: flex;
    justify-content: space-between;
    margin-top: 6px;
    font-size: 12px;
    color: #999;
    padding: 0 4px;
}

/* -------------------------------------------------------
   Incident & update lists
------------------------------------------------------- */

.incident-list,
.updates-list {
    background: #fff;
    border-radius: 8px;
    border: 1px solid #e5e5e5;
}

.incident-item,
.update-item {
    padding: 14px 18px;
    border-bottom: 1px solid #e5e5e5;
}

.incident-item:last-child,
.update-item:last-child {
    border-bottom: none;
}

.incident-date  { font-size: 12px; color: #666; margin-bottom: 4px; }
.incident-error { font-size: 14px; color: #1a1a1a; margin-bottom: 2px; }
.incident-code  { font-size: 12px; color: #999; font-family: monospace; }

.update-item {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.update-type {
    display: inline-block;
    padding: 3px 8px;
    background: #00b4b6;
    color: #fff;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.update-item strong { font-size: 14px; color: #1a1a1a; }

.update-version {
    font-size: 13px;
    color: #666;
    font-family: monospace;
}

.update-date {
    font-size: 12px;
    color: #999;
    margin-left: auto;
}

/* -------------------------------------------------------
   Status messages
------------------------------------------------------- */

.status-message {
    margin: 0 20px 16px;
    padding: 14px 18px;
    border-radius: 8px;
    display: flex;
    gap: 12px;
    align-items: flex-start;
    border-left: 3px solid;
}

.status-message-maintenance { background: #fffbeb; border-color: #f59e0b; color: #78350f; }
.status-message-incident    { background: #fef2f2; border-color: #ef4444; color: #7f1d1d; }
.status-message-info        { background: #eff6ff; border-color: #3b82f6; color: #1e3a8a; }

.message-content strong { display: block; margin-bottom: 4px; font-size: 14px; font-weight: 600; }
.message-content p      { font-size: 14px; margin: 0; line-height: 1.5; }

/* -------------------------------------------------------
   Footer
------------------------------------------------------- */

.status-footer {
    text-align: center;
    padding: 30px 20px 10px;
    border-top: 1px solid #e5e5e5;
    margin: 0 20px;
}

.status-footer p {
    font-size: 13px;
    color: #999;
}

/* -------------------------------------------------------
   Login page
------------------------------------------------------- */

body.sushiwp-login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: #f4f6f8;
}

.login-wrap {
    width: 100%;
    max-width: 440px;
    padding: 20px;
}

.login-card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.08);
    overflow: hidden;
}

.login-header {
    background: #00b4b6;
    padding: 28px 30px;
    text-align: center;
}

.login-header img {
    height: 40px;
    width: auto;
}

.login-body {
    padding: 32px 30px;
}

.login-body h1 {
    font-size: 20px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 8px;
}

.login-intro {
    font-size: 14px;
    color: #666;
    margin-bottom: 24px;
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #333;
    margin-bottom: 6px;
}

.form-group input[type="email"] {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 15px;
    transition: border-color 0.2s;
}

.form-group input[type="email"]:focus {
    outline: none;
    border-color: #00b4b6;
    box-shadow: 0 0 0 3px rgba(0,180,182,0.1);
}

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

.form-check input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: #00b4b6;
}

.form-check label {
    margin: 0;
    font-size: 14px;
    color: #555;
    cursor: pointer;
}

.login-btn {
    width: 100%;
    padding: 12px;
    background: #00b4b6;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    margin-top: 4px;
}

.login-btn:hover   { background: #009a9c; }
.login-btn:disabled { background: #7dd3d4; cursor: not-allowed; }

.login-notice {
    margin-top: 16px;
    padding: 12px 14px;
    border-radius: 6px;
    font-size: 14px;
}

.login-notice-success { background: #f0fdf4; color: #15803d; border: 1px solid #86efac; }
.login-notice-error   { background: #fef2f2; color: #b91c1c; border: 1px solid #fca5a5; }

/* -------------------------------------------------------
   Responsive
------------------------------------------------------- */

@media (max-width: 600px) {
    .status-header { padding: 16px 20px; }
    .status-header img { height: 28px; }

    .stats-grid { grid-template-columns: 1fr; gap: 12px; padding: 0 16px 30px; }
    .stat-value { font-size: 30px; }

    .site-section { margin: 0 16px 30px; }
    .status-badge { margin: 16px; padding: 16px 20px; font-size: 15px; }

    .update-item { flex-direction: column; align-items: flex-start; }
    .update-date { margin-left: 0; }

    .login-body { padding: 24px 20px; }
    .login-header { padding: 22px 20px; }
}
