/* SEO Auto Submitter - Modern Portal Design */
:root {
    --sas-primary: #4f46e5;
    --sas-primary-hover: #4338ca;
    --sas-bg: #f1f5f9;
    --sas-sidebar: #0f172a;
    --sas-card: #ffffff;
    --sas-text: #0f172a;
    --sas-muted: #64748b;
    --sas-border: #e2e8f0;
    --sas-success: #16a34a;
    --sas-warning: #d97706;
    --sas-danger: #dc2626;
    --sas-radius: 12px;
    --sas-shadow: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
}

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

body.sas-portal-body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--sas-bg);
    color: var(--sas-text);
    line-height: 1.5;
    min-height: 100vh;
}

/* ========== LOGIN ========== */
.sas-login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #312e81 100%);
    padding: 20px;
}

.sas-login-card {
    background: #fff;
    border-radius: 16px;
    padding: 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,.4);
}

.sas-login-header {
    text-align: center;
    margin-bottom: 32px;
}

.sas-logo {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    color: #fff;
    font-weight: 800;
    font-size: 18px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

.sas-login-header h1 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 6px;
}

.sas-login-header p {
    color: var(--sas-muted);
    font-size: 14px;
}

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

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

.sas-form-group input[type="text"],
.sas-form-group input[type="password"] {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--sas-border);
    border-radius: 8px;
    font-size: 15px;
    transition: border-color .2s, box-shadow .2s;
}

.sas-form-group input:focus {
    outline: none;
    border-color: var(--sas-primary);
    box-shadow: 0 0 0 3px rgba(79,70,229,.15);
}

.sas-remember label {
    font-weight: 400;
    font-size: 14px;
    color: var(--sas-muted);
    display: flex;
    align-items: center;
    gap: 8px;
}

.sas-login-footer {
    text-align: center;
    margin-top: 24px;
    font-size: 12px;
    color: var(--sas-muted);
}

/* ========== BUTTONS ========== */
.sas-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: all .15s;
}

.sas-btn-primary {
    background: var(--sas-primary);
    color: #fff;
}
.sas-btn-primary:hover {
    background: var(--sas-primary-hover);
    color: #fff;
}

.sas-btn-ghost {
    background: transparent;
    color: var(--sas-muted);
    border: 1px solid var(--sas-border);
}
.sas-btn-ghost:hover {
    background: #f8fafc;
    color: var(--sas-text);
}

.sas-btn-block { width: 100%; padding: 13px; font-size: 15px; }
.sas-btn-sm { padding: 7px 14px; font-size: 13px; }
.sas-btn-xs { padding: 4px 10px; font-size: 12px; }

/* ========== APP LAYOUT ========== */
.sas-app {
    display: flex;
    min-height: 100vh;
}

.sas-sidebar {
    width: 260px;
    background: var(--sas-sidebar);
    color: #fff;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
}

.sas-sidebar-header {
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid rgba(255,255,255,.08);
}

.sas-logo-sm {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 12px;
}

.sas-sidebar-header span {
    font-weight: 600;
    font-size: 14px;
}

.sas-nav {
    flex: 1;
    padding: 16px 12px;
}

.sas-nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 14px;
    border-radius: 8px;
    color: #94a3b8;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 4px;
    transition: all .15s;
}

.sas-nav-item:hover {
    background: rgba(255,255,255,.06);
    color: #e2e8f0;
}

.sas-nav-item.active {
    background: rgba(79,70,229,.25);
    color: #c7d2fe;
}

.sas-nav-icon { font-size: 16px; }

.sas-sidebar-footer {
    padding: 16px;
    border-top: 1px solid rgba(255,255,255,.08);
}

.sas-user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.sas-avatar {
    width: 36px;
    height: 36px;
    background: #4f46e5;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
}

.sas-user-info strong {
    display: block;
    font-size: 13px;
}

.sas-user-info small {
    color: #94a3b8;
    font-size: 11px;
}

/* ========== MAIN ========== */
.sas-main {
    flex: 1;
    margin-left: 260px;
    min-height: 100vh;
}

.sas-topbar {
    background: #fff;
    border-bottom: 1px solid var(--sas-border);
    padding: 16px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 50;
}

.sas-topbar h1 {
    font-size: 20px;
    font-weight: 700;
}

.sas-content {
    padding: 28px;
}

/* ========== STATS ========== */
.sas-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 28px;
}

.sas-stat-card {
    background: var(--sas-card);
    border-radius: var(--sas-radius);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: var(--sas-shadow);
    border: 1px solid var(--sas-border);
}

.sas-stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.sas-stat-label {
    display: block;
    font-size: 13px;
    color: var(--sas-muted);
    margin-bottom: 2px;
}

.sas-stat-value {
    font-size: 28px;
    font-weight: 700;
    line-height: 1.2;
}

/* ========== CARDS ========== */
.sas-card {
    background: var(--sas-card);
    border-radius: var(--sas-radius);
    box-shadow: var(--sas-shadow);
    border: 1px solid var(--sas-border);
    margin-bottom: 24px;
}

.sas-card-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--sas-border);
}

.sas-card-header h2 {
    font-size: 16px;
    font-weight: 600;
}

.sas-card-body {
    padding: 20px;
}

/* ========== QUICK ACTIONS ========== */
.sas-quick-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
}

.sas-quick-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 20px;
    border: 1px solid var(--sas-border);
    border-radius: 10px;
    text-decoration: none;
    color: var(--sas-text);
    transition: all .15s;
}

.sas-quick-item:hover {
    border-color: var(--sas-primary);
    background: #f5f3ff;
}

.sas-quick-item span { font-size: 24px; }
.sas-quick-item strong { font-size: 14px; }
.sas-quick-item small { font-size: 12px; color: var(--sas-muted); }

/* ========== TABLE ========== */
.sas-table-wrap { overflow-x: auto; }

.sas-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.sas-table th {
    text-align: left;
    padding: 12px 16px;
    background: #f8fafc;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--sas-muted);
    border-bottom: 1px solid var(--sas-border);
}

.sas-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--sas-border);
}

.sas-table tr:last-child td { border-bottom: none; }
.sas-table tr:hover td { background: #f8fafc; }

.sas-badge {
    display: inline-block;
    padding: 3px 10px;
    background: #f1f5f9;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.sas-status {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.sas-status-active, .sas-status-success { background: #dcfce7; color: #16a34a; }
.sas-status-pending, .sas-status-submitted { background: #fef3c7; color: #d97706; }
.sas-status-inactive, .sas-status-failed { background: #fee2e2; color: #dc2626; }

.sas-link {
    color: var(--sas-primary);
    text-decoration: none;
    font-weight: 500;
}
.sas-link:hover { text-decoration: underline; }

.sas-muted { color: var(--sas-muted); }

.sas-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--sas-muted);
}

.sas-empty p { margin-bottom: 16px; }

/* ========== ALERT ========== */
.sas-alert {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 20px;
}
.sas-alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    .sas-sidebar {
        width: 100%;
        position: relative;
        height: auto;
    }
    .sas-main { margin-left: 0; }
    .sas-app { flex-direction: column; }
}
