:root {
--font-family: 'Vazirmatn', sans-serif;
--bg-body: #f1f5f9;
--bg-white: #ffffff;

--primary: #10b981;
--primary-dark: #059669;
--primary-light: #ecfdf5;

--warning: #f59e0b;
--warning-light: #fffbeb;

--danger: #ef4444;
--danger-light: #fef2f2;

--text-main: #1e293b;
--text-secondary: #64748b;
--text-muted: #94a3b8;

--border-light: #e2e8f0;
--shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
--shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
--shadow-glow: 0 0 15px rgba(16, 185, 129, 0.2);

--radius-sm: 0.5rem;
--radius-md: 0.75rem;
--radius-lg: 1rem;
}

* {
margin: 0;
padding: 0;
box-sizing: border-box;
-webkit-font-smoothing: antialiased;
}

body {
font-family: var(--font-family);
background-color: var(--bg-body);
color: var(--text-main);
line-height: 1.6;
display: flex;
flex-direction: column;
min-height: 100vh;
}

a {
text-decoration: none;
color: inherit;
transition: color 0.2s;
}

.container {
width: 100%;
max-width: 1024px;
margin: 0 auto;
padding: 0 1.5rem;
}

.main-header {
background: var(--bg-white);
border-bottom: 1px solid var(--border-light);
padding: 1.25rem 0;
position: sticky;
top: 0;
z-index: 50;
}

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

.brand {
display: flex;
align-items: center;
gap: 0.75rem;
}

.logo-icon {
background: var(--primary);
color: white;
width: 40px;
height: 40px;
display: flex;
align-items: center;
justify-content: center;
border-radius: var(--radius-sm);
}

.brand-text {
display: flex;
flex-direction: column;
}

.brand-text h1 {
font-size: 1.1rem;
font-weight: 800;
line-height: 1.2;
color: var(--text-main);
}

.brand-text span {
font-size: 0.75rem;
color: var(--text-secondary);
font-weight: 500;
letter-spacing: 0.02em;
}

.back-link {
font-size: 0.875rem;
color: var(--text-secondary);
display: flex;
align-items: center;
gap: 0.5rem;
font-weight: 500;
}

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

.back-link svg {
transition: transform 0.2s;
}

.back-link:hover svg {
transform: translateX(3px);
}

main {
padding-top: 2.5rem;
padding-bottom: 4rem;
flex: 1;
}

.status-hero {
background: var(--bg-white);
border-radius: var(--radius-lg);
padding: 2.5rem;
box-shadow: var(--shadow-md);
display: flex;
align-items: center;
justify-content: space-between;
gap: 2rem;
margin-bottom: 3rem;
border: 1px solid var(--border-light);
position: relative;
overflow: hidden;
}

.status-hero.operational {
border-bottom: 4px solid var(--primary);
background: linear-gradient(to left, #ffffff, #f0fdf4);
}

.hero-content {
flex: 1;
z-index: 2;
}

.live-indicator {
display: inline-flex;
align-items: center;
gap: 0.5rem;
background: rgba(255, 255, 255, 0.8);
border: 1px solid var(--primary-light);
padding: 0.35rem 0.75rem;
border-radius: 999px;
font-size: 0.75rem;
font-weight: 700;
color: var(--primary-dark);
margin-bottom: 1rem;
backdrop-filter: blur(4px);
}

.live-indicator .dot {
width: 8px;
height: 8px;
background: var(--primary);
border-radius: 50%;
}

.live-indicator .ping {
position: absolute;
width: 8px;
height: 8px;
background: var(--primary);
border-radius: 50%;
animation: ping 1.5s cubic-bezier(0, 0, 0.2, 1) infinite;
opacity: 0.75;
right: 1.7rem; 
}

@keyframes ping {
75%, 100% {
transform: scale(2);
opacity: 0;
}
}

.status-title {
font-size: 1.75rem;
font-weight: 900;
margin-bottom: 0.75rem;
color: var(--text-main);
}

.status-desc {
color: var(--text-secondary);
font-size: 1rem;
max-width: 600px;
}

.hero-illustration {
width: 160px;
height: 160px;
flex-shrink: 0;
z-index: 2;
}

.hero-illustration svg {
width: 100%;
height: 100%;
filter: drop-shadow(0 10px 15px rgba(0,0,0,0.05));
}

.section-title {
font-size: 1.25rem;
font-weight: 800;
margin-bottom: 1.5rem;
display: flex;
align-items: center;
gap: 0.5rem;
color: var(--text-main);
padding-bottom: 0.75rem;
border-bottom: 1px solid var(--border-light);
}

.services-section {
margin-bottom: 3rem;
}

.grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
gap: 1rem;
}

.card {
background: var(--bg-white);
border: 1px solid var(--border-light);
border-radius: var(--radius-md);
padding: 1.25rem;
transition: all 0.2s ease;
}

.card:hover {
transform: translateY(-2px);
box-shadow: var(--shadow-md);
border-color: var(--primary-light);
}

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

.service-icon-wrapper {
background: var(--bg-body);
color: var(--text-secondary);
width: 40px;
height: 40px;
border-radius: var(--radius-sm);
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
margin-left: 1rem;
}

.card:hover .service-icon-wrapper {
background: var(--primary-light);
color: var(--primary);
}

.service-info {
flex: 1;
}

.service-name {
font-size: 0.95rem;
font-weight: 700;
color: var(--text-main);
margin-bottom: 0.15rem;
}

.service-uptime {
font-size: 0.75rem;
color: var(--text-muted);
font-family: monospace;
font-weight: 600;
}

.status-badge {
font-size: 0.75rem;
font-weight: 700;
padding: 0.25rem 0.6rem;
border-radius: 999px;
white-space: nowrap;
}

.status-ok {
background: var(--primary-light);
color: var(--primary-dark);
}

.status-warn {
background: var(--warning-light);
color: #b45309;
}

.status-err {
background: var(--danger-light);
color: var(--danger);
}

.incidents-section {
background: var(--bg-white);
border-radius: var(--radius-lg);
padding: 2rem;
border: 1px solid var(--border-light);
box-shadow: var(--shadow-sm);
}

.incident-group {
margin-bottom: 2.5rem;
}

.incident-group:last-child {
margin-bottom: 0;
}

.incident-header {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 1.5rem;
flex-wrap: wrap;
gap: 0.5rem;
}

.incident-title {
font-size: 1.1rem;
font-weight: 800;
color: var(--text-main);
}

.incident-meta {
display: flex;
align-items: center;
gap: 0.75rem;
}

.incident-date {
font-size: 0.85rem;
color: var(--text-secondary);
background: var(--bg-body);
padding: 0.15rem 0.5rem;
border-radius: 4px;
}

.incident-badge {
font-size: 0.75rem;
font-weight: 700;
padding: 0.15rem 0.5rem;
border-radius: 4px;
}

.badge-resolved {
background: var(--primary-light);
color: var(--primary-dark);
}

.badge-active {
background: var(--warning-light);
color: #b45309;
}

.incident-updates {
position: relative;
padding-right: 1.5rem;
border-right: 2px solid var(--border-light);
margin-right: 0.5rem;
}

.timeline-item {
margin-bottom: 2rem;
position: relative;
}

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

.timeline-marker {
position: absolute;
right: -1.95rem; 
top: 0.25rem;
width: 12px;
height: 12px;
border-radius: 50%;
border: 2px solid var(--bg-white);
box-shadow: 0 0 0 2px var(--border-light);
}

.type-resolved { background: var(--primary); box-shadow: 0 0 0 2px var(--primary-light); }
.type-identified { background: var(--warning); box-shadow: 0 0 0 2px var(--warning-light); }
.type-investigating { background: var(--text-muted); }

.update-meta {
display: flex;
align-items: center;
gap: 0.75rem;
margin-bottom: 0.35rem;
}

.update-type {
font-size: 0.8rem;
font-weight: 700;
}

.type-resolved.update-type { color: var(--primary-dark); }
.type-identified.update-type { color: #b45309; }

.update-time {
font-size: 0.75rem;
color: var(--text-muted);
font-family: monospace;
direction: ltr;
}

.update-msg {
font-size: 0.925rem;
color: var(--text-secondary);
}

.main-footer {
background: var(--bg-white);
border-top: 1px solid var(--border-light);
padding: 2rem 0;
margin-top: auto;
}

.footer-content {
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
font-size: 0.875rem;
color: var(--text-secondary);
}

.copyright {
display: flex;
align-items: center;
gap: 1.5rem;
}

.footer-links {
display: flex;
align-items: center;
gap: 0.5rem;
}

.footer-links a:hover {
color: var(--primary);
}

.divider {
color: var(--border-light);
}

.last-update {
display: flex;
align-items: center;
gap: 0.5rem;
background: var(--bg-body);
padding: 0.25rem 0.75rem;
border-radius: var(--radius-sm);
border: 1px solid var(--border-light);
}

.time-text {
font-family: monospace;
font-weight: 700;
color: var(--text-main);
direction: ltr;
}

@media (max-width: 768px) {
.status-hero {
flex-direction: column;
text-align: center;
padding: 2rem 1.5rem;
}

.hero-illustration {
order: -1;
margin-bottom: 1rem;
}

.live-indicator .ping {
right: auto;
left: 50%; 
transform: translateX(-50%);
display: none; 
}

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

.copyright {
flex-direction: column;
gap: 0.75rem;
}
}

/* Overrides for integration with legacy PHP container layout */
.logo-wrapper {
  display: none;
}

.main-header .container,
main.container {
  background: transparent;
  border-radius: 0;
  margin: 0 auto;
  padding: 0 1.5rem;
  box-shadow: none;
}



