/* style.css - Modernized for SimMain Global */

:root {
 --primary-color: #10A37F;
 --primary-hover: #0b775c;
 --bg-color: #f8fafc;
 --text-main: #0f172a;
 --text-muted: #64748b;
 --card-bg: #ffffff;
 --border-color: #e2e8f0;
}

html {
 position: relative;
 min-height: 100%;
 overflow-x: hidden;
 background-color: #10A37F;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    margin: 0;
    line-height: 1.6;
    font-size: 16px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden;
}

body > * {
    min-width: 0;
}

/* Typography */
h1, h2, h3 { color: var(--text-main); }
.section-title { font-size: 2.2rem; font-weight: 700; margin-bottom: 10px; }
.section-subtitle { font-size: 1.1rem; color: var(--text-muted); margin-bottom: 40px; }

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: all 0.2s ease;
}

a:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

/* Layout Containers */
.container { 
    max-width: 1200px; 
    margin: 0 auto; 
    padding: 0 20px; 
    box-sizing: border-box; 
}
.text-center { text-align: center; }

/* Buttons */
.btn-primary {
    background-color: var(--primary-color); 
    color: white;
    padding: 14px 32px; 
    font-size: 1.1rem; 
    font-weight: 600;
    border: none; 
    border-radius: 8px; 
    cursor: pointer;
    transition: all 0.2s ease; 
    display: inline-block; 
    text-decoration: none;
    box-shadow: 0 4px 6px -1px rgba(16, 163, 127, 0.2);
}

.btn-primary:hover { 
    background-color: var(--primary-hover); 
    transform: translateY(-2px); 
    color: white;
    text-decoration: none;
}

/* Hero Section */
.hero-section {
    position: relative;
    background: linear-gradient(180deg, #ffffff 0%, #f1f5f9 100%);
    padding: 50px 20px 100px;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
    overflow: hidden;
    isolation: isolate;
}

/* Lớp lưới đường kẻ mờ - dùng SVG data-URI, không tốn HTTP request, nặng ~0.3KB */
.hero-section::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -2;
    background-image:
        linear-gradient(rgba(16, 163, 127, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(16, 163, 127, 0.06) 1px, transparent 1px);
    background-size: 48px 48px;
}

.hero-section h1 { 
    font-size: 3.2rem; 
    font-weight: 800; 
    line-height: 1.2; 
    margin-bottom: 20px; 
    letter-spacing: -0.02em; 
}

.hero-section p { 
    font-size: 1.2rem; 
    color: var(--text-muted); 
    max-width: 750px; 
    margin: 0 auto 30px auto; 
}

/* Features Section */
.features-section { padding: 80px 0; background: var(--card-bg); }
.grid-3 { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); 
    gap: 30px; 
}

.feature-card { 
    padding: 35px 25px; 
    border: 1px solid var(--border-color); 
    border-radius: 12px; 
    text-align: center; 
    background: #fff; 
    transition: transform 0.3s, box-shadow 0.3s; 
}

.feature-card:hover { 
    transform: translateY(-5px); 
    box-shadow: 0 10px 25px -5px rgba(0,0,0,0.1); 
}

.feature-icon { 
    font-size: 2.5rem; 
    color: var(--primary-color); 
    margin-bottom: 20px; 
}

/* Steps Section */
.steps-section { padding: 80px 0; background: var(--bg-color); }
.step-box { text-align: center; padding: 20px; position: relative;}
.step-number { 
    width: 56px; 
    height: 56px; 
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover)); 
    color: #ffffff; 
    font-size: 1.6rem; 
    font-weight: bold; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    border-radius: 50%; 
    margin: 0 auto 20px auto; 
    border: 3px solid #ffffff;
    box-shadow:
        0 10px 20px -6px rgba(16, 163, 127, 0.45),
        0 0 0 2px #e6f6f2;
}

/* Pricing Section */
.pricing-section { 
    padding: 80px 0; 
    background: var(--card-bg); 
    border-bottom: 1px solid var(--border-color); 
}

.pricing-card { 
    border: 1px solid var(--border-color); 
    border-radius: 12px; 
    padding: 40px 30px; 
    text-align: center; 
    background: #fafafa;
}

.price-tag { 
    font-size: 3rem; 
    font-weight: 700; 
    color: var(--text-main); 
    margin: 20px 0;
    white-space: nowrap;
}

/* Alternate Section - dùng cho các khối cần xen kẽ nền với hero/steps-section */
.alt-section {
    padding: 80px 0;
    background: var(--bg-color);
}

/* Dashboard Table - Tối ưu chống tràn */
.dashboard-section { 
    background: var(--card-bg); 
    border-radius: 12px; 
    padding: 30px; 
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05); 
    margin: 40px auto; 
    max-width: 1200px;
}

.dashboard-header { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    border-bottom: 1px solid var(--border-color); 
    padding-bottom: 20px; 
    margin-bottom: 20px; 
}

.table-wrapper {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 15px;
    -webkit-overflow-scrolling: touch;
}

table { 
    width: 100%; 
    border-collapse: collapse; 
    text-align: left;
    min-width: 900px; /* Tăng độ rộng tối thiểu để bảng thoáng hơn */
    table-layout: fixed; 
}

th, td { 
    padding: 16px 12px; 
    border-bottom: 1px solid var(--border-color); 
    font-size: 15px;
    word-wrap: break-word;
}

th { 
    background-color: #f8fafc; 
    color: var(--text-muted); 
    font-weight: 600; 
    font-size: 0.85rem; 
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Định nghĩa độ rộng cột - Thêm nowrap cho Order ID, Country và Phone Number */
th:nth-child(1), td:nth-child(1) { width: 12%; white-space: nowrap; padding-right: 15px; }
th:nth-child(2) { width: 13%; }
th:nth-child(3) { width: 12%; }
th:nth-child(4), td:nth-child(4) { width: 11%; white-space: nowrap; } /* Đã thêm nowrap cho quốc gia */
th:nth-child(5) { width: 9%; }
th:nth-child(6), td:nth-child(6) { width: 15%; white-space: nowrap; }
th:nth-child(7) { width: 14%; }
th:nth-child(8) { width: 14%; }

tr:hover {
    background-color: #f1f5f9;
}

.status-badge { 
    padding: 6px 12px; 
    border-radius: 20px; 
    font-size: 0.75rem; 
    font-weight: 600; 
    text-align: center; 
    display: inline-block; 
    cursor: pointer;
    transition: opacity 0.2s;
    max-width: 100%;
}

.status-badge:hover { opacity: 0.8; }

.dashboard-section div[style*="1px dashed #cbd5e1"] {
    margin-left: auto !important;
    margin-right: auto !important;
    text-align: center !important;
}

.status-waiting { background-color: #fef3c7; color: #92400e; }
.status-completed { background-color: #dcfce7; color: #166534; }
.status-failed { background-color: #fee2e2; color: #991b1b; }

.dashboard-section > div[style*="dashed"] {
    margin: 0 auto !important;
    text-align: center !important;
}

@media (max-width: 768px) {
    .hero-section h1 { font-size: 2.2rem; }
    .hero-section p { font-size: 1rem; }
    .section-title { font-size: 1.8rem; }
}