/**
 * WebPanel - Main Stylesheet
 * Vercel-inspired Light Theme
 * Author: HostClube
 * Version: 1.0.0
 */

/* ============================================
   CSS VARIABLES - Vercel Light Theme
   ============================================ */
:root {
    --bg-primary: #ffffff;
    --bg-secondary: #fafafa;
    --bg-tertiary: #f4f4f5;
    --bg-card: #ffffff;
    --bg-card-hover: #fafafa;
    --text-primary: #000000;
    --text-secondary: #666666;
    --text-tertiary: #999999;
    --accent-primary: #0070f3;
    --accent-secondary: #7928ca;
    --border-color: #eaeaea;
    --border-hover: #000000;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --success-color: #00d26a;
    --warning-color: #f5a623;
    --error-color: #e53e3e;
}

/* Font optimizations */
* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Typography optimizations for Plus Jakarta Sans */
:root {
    --font-body: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    --tracking-tight: -0.02em;
    --tracking-normal: -0.005em;
    --tracking-wide: 0.02em;
    --leading-tight: 1.2;
    --leading-normal: 1.6;
}

/* ============================================
   RESET & BASE STYLES
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Plus Jakarta Sans', 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

a {
    color: var(--text-primary);
    text-decoration: none;
}

/* ============================================
   ICON STYLES
   ============================================ */
/* Material Symbols Outlined */
.material-symbols-outlined {
    font-size: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: inherit;
    line-height: 1;
    vertical-align: middle;
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.btn .material-symbols-outlined {
    font-size: 18px;
}

/* ============================================
   MATERIAL ICONS SIZES
   ============================================ */
.icon-lg {
    font-size: 48px;
    line-height: 1;
}

.icon-xl {
    font-size: 144px;
    line-height: 1;
}

/* ============================================
   NAVIGATION (HEADER)
   ============================================ */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    height: 64px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text-primary);
}

.brand-icon {
    font-size: 32px;
    color: var(--text-primary);
    line-height: 1;
    vertical-align: middle;
}

.brand-text {
    font-size: 19px;
    font-weight: 600;
    letter-spacing: -0.3px;
    line-height: 1.2;
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.user-role {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    text-transform: capitalize;
    padding: 4px 10px;
    background: var(--bg-tertiary);
    border-radius: 12px;
}

.btn-logout {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--error-color);
    color: white;
    border: 1px solid var(--error-color);
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.15s ease;
}

.btn-logout:hover {
    background: #c53030;
    color: white;
    border-color: #c53030;
}

.btn-logout svg {
    width: 14px;
    height: 14px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.nav-status {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: var(--bg-tertiary);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
}

.status-indicator {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #00d26a;
    animation: statusPulse 2s infinite;
}

@keyframes statusPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* ============================================
   MAIN CONTAINER
   ============================================ */
.main-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
    padding: 280px 0 80px;
    text-align: center;
    margin-bottom: 32px;
}

.hero-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    margin-bottom: 20px;
}

.hero-logo {
    opacity: 0.95;
    flex-shrink: 0;
    line-height: 1;
}

.hero-title {
    font-size: 88px;
    font-weight: 800;
    line-height: 0.95;
    letter-spacing: -0.03em;
    color: var(--text-primary);
    margin: 0;
    font-feature-settings: 'cv01' on, 'cv02' on, 'ss01' on, 'ss02' on;
}

.hero-subtitle {
    font-size: 18px;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 12px auto 32px;
    line-height: 1.6;
    letter-spacing: -0.005em;
}

/* ============================================
   STATS SECTION - VERCEL STYLE
   ============================================ */
.stats-section {
    margin-bottom: 80px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    width: 100%;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.15s ease;
}

.stat-card:hover {
    border-color: #999;
    background: var(--bg-secondary);
}

.stat-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
}

.stat-icon .material-symbols-outlined {
    font-size: 22px;
    color: var(--text-secondary);
    line-height: 1;
}

.stat-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
}

.stat-label {
    font-size: 11.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-tertiary);
    line-height: 1.3;
}

.stat-value {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.4;
    word-break: break-word;
    overflow-wrap: break-word;
    word-wrap: break-word;
    letter-spacing: -0.005em;
}

/* ============================================
   BUTTONS - VERCEL STYLE
   ============================================ */
.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: center;
    align-items: center;
    margin-top: 64px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.15s ease;
    cursor: pointer;
    border: none;
    min-height: 48px;
    line-height: 1;
}

.btn .material-symbols-outlined {
    font-size: 18px;
    flex-shrink: 0;
}

.btn-primary {
    background: var(--text-primary);
    color: var(--bg-primary);
}

.btn-primary:hover {
    background: #000;
}

.btn-secondary {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-tertiary);
    border-color: var(--text-primary);
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    border-top: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    position: relative;
    z-index: 1000;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    height: 64px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text-primary);
    transition: opacity 0.2s ease;
}

.footer-brand:hover {
    opacity: 0.8;
}

.footer-brand .logo-icon {
    font-size: 32px;
    color: var(--text-primary);
    line-height: 1;
    vertical-align: middle;
}

.footer-brand .brand-text {
    font-size: 18px;
    font-weight: 600;
    letter-spacing: -0.3px;
    color: var(--text-primary);
    line-height: 1.2;
}

.footer-links {
    display: flex;
    gap: 24px;
    align-items: center;
}

.footer-links a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    border: none;
    outline: none;
    line-height: 1;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
}

.footer-links a:hover {
    color: var(--text-primary);
    background: rgba(0, 0, 0, 0.04);
    padding: 6px 12px;
    border-radius: var(--radius-md);
    text-decoration: none;
}

.footer-links .material-symbols-outlined {
    font-size: 20px;
    color: currentColor;
    line-height: 1;
}

.footer-status {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: var(--bg-tertiary);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes statusPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.stat-card {
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
}

.stat-card:nth-child(1) { animation-delay: 0.1s; }
.stat-card:nth-child(2) { animation-delay: 0.2s; }
.stat-card:nth-child(3) { animation-delay: 0.3s; }
.stat-card:nth-child(4) { animation-delay: 0.4s; }

/* ============================================
   RESPONSIVE STYLES
   ============================================ */
@media (max-width: 1200px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
    
    .stat-card {
        padding: 16px;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 48px;
        letter-spacing: -1.5px;
    }

    .hero-subtitle {
        font-size: 16px;
    }

    .hero-logo {
        margin-bottom: 24px;
    }

    .hero-logo .icon-xl {
        font-size: 64px !important;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .stat-card {
        padding: 16px;
    }

    .nav-container {
        padding: 0 16px;
    }

    .navbar .nav-status {
        display: none;
    }

    .footer-container {
        height: auto;
        padding: 24px 16px;
        flex-direction: column;
        gap: 20px;
    }

    .footer-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 16px;
    }

    .footer-links a:hover {
        padding: 6px 12px;
    }
}

/* ============================================
   DOCUMENTATION PAGES STYLES
   ============================================ */
.docs-container {
    display: flex;
    min-height: calc(100vh - 200px);
    gap: 32px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 120px 24px 80px;
}

.docs-content h1 {
    font-size: 32px;
    font-weight: 700;
    letter-spacing: -1px;
    margin-bottom: 24px;
    color: var(--text-primary);
}

.docs-content h2 {
    font-size: 24px;
    font-weight: 600;
    letter-spacing: -0.5px;
    margin-top: 32px;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.docs-content h3 {
    font-size: 20px;
    font-weight: 600;
    margin-top: 24px;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.docs-content p {
    color: var(--text-secondary);
    margin-bottom: 16px;
    line-height: 1.7;
}

.docs-content ul, .docs-content ol {
    color: var(--text-secondary);
    margin-bottom: 16px;
    margin-left: 24px;
    line-height: 1.7;
}

.docs-content li {
    margin-bottom: 8px;
}

.docs-content a {
    color: var(--accent-primary);
    text-decoration: underline;
}

.docs-content pre {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    overflow-x: auto;
    margin-bottom: 16px;
}

.docs-content code {
    font-family: 'Monaco', 'Consolas', monospace;
    font-size: 14px;
    color: var(--text-primary);
}

.docs-content blockquote {
    border-left: 4px solid var(--accent-primary);
    padding-left: 16px;
    color: var(--text-secondary);
    margin-bottom: 16px;
    font-style: italic;
}

.docs-content table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 16px;
}

.docs-content th, .docs-content td {
    border: 1px solid var(--border-color);
    padding: 12px;
    text-align: left;
}

.docs-content th {
    background: var(--bg-secondary);
    font-weight: 600;
}

.docs-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-md);
    margin: 16px 0;
}

/* ============================================
   DOCUMENTATION SIDEBAR STYLES
   ============================================ */

.docs-sidebar {
    width: 280px;
    flex-shrink: 0;
    position: sticky;
    top: 80px;
    height: fit-content;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
}

.sidebar-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-icon {
    width: 28px;
    height: 28px;
    color: var(--text-primary);
    flex-shrink: 0;
}

.sidebar-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    letter-spacing: -0.3px;
}

.sidebar-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-nav li {
    margin-bottom: 2px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: all 0.15s ease;
    font-size: 14px;
    font-weight: 500;
}

.nav-link:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.nav-link.active {
    background: var(--text-primary);
    color: var(--bg-primary);
}

.nav-link.active .nav-icon {
    color: var(--bg-primary);
}

.nav-icon {
    width: 18px;
    height: 18px;
    color: var(--text-secondary);
    flex-shrink: 0;
    transition: color 0.15s ease;
}

.nav-link:hover .nav-icon {
    color: var(--text-primary);
}

.docs-content {
    flex: 1;
    min-width: 0;
    padding: 0;
}

.docs-content > h1 {
    font-size: 32px;
    font-weight: 700;
    letter-spacing: -1px;
    margin-bottom: 24px;
    color: var(--text-primary);
}

.page-content {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 48px;
}

.page-content h1 {
    font-size: 32px;
    font-weight: 700;
    letter-spacing: -1px;
    margin-bottom: 24px;
    color: var(--text-primary);
}

.page-content h2 {
    font-size: 24px;
    font-weight: 600;
    letter-spacing: -0.5px;
    margin-top: 32px;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.page-content h3 {
    font-size: 20px;
    font-weight: 600;
    margin-top: 24px;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.page-content p {
    color: var(--text-secondary);
    margin-bottom: 16px;
    line-height: 1.7;
}

.page-content ul, .page-content ol {
    color: var(--text-secondary);
    margin-bottom: 16px;
    margin-left: 24px;
    line-height: 1.7;
}

.page-content li {
    margin-bottom: 8px;
}

.page-content a {
    color: var(--accent-primary);
    text-decoration: none;
}

.page-content a:hover {
    text-decoration: underline;
}

.page-content pre {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    overflow-x: auto;
    margin-bottom: 16px;
}

.page-content code {
    font-family: 'Monaco', 'Consolas', monospace;
    font-size: 14px;
    color: var(--text-primary);
}

.page-content pre code {
    background: none;
    padding: 0;
}

.page-content blockquote {
    border-left: 4px solid var(--accent-primary);
    padding-left: 16px;
    color: var(--text-secondary);
    margin-bottom: 16px;
    font-style: italic;
}

.page-content table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 16px;
}

.page-content th, .page-content td {
    border: 1px solid var(--border-color);
    padding: 12px;
    text-align: left;
}

.page-content th {
    background: var(--bg-secondary);
    font-weight: 600;
}

.page-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-md);
    margin: 16px 0;
}

.docs-footer-nav {
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    gap: 16px;
}

.docs-footer-nav .btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.docs-footer-nav .btn svg {
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.docs-footer-nav .btn:hover {
    border-color: var(--text-primary);
    background: var(--bg-tertiary);
    transform: translateY(-1px);
}

.docs-footer-nav .btn:hover svg {
    transform: translateX(-2px);
}

.docs-footer-nav .btn-primary:hover svg {
    transform: translateX(2px);
}

.docs-footer-nav .btn-primary {
    background: var(--text-primary);
    color: var(--bg-primary);
    border-color: var(--text-primary);
}

.docs-footer-nav .btn-primary:hover {
    background: #000;
}

/* ============================================
   DOCUMENTATION SIDEBAR RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .docs-container {
        flex-direction: column;
        gap: 24px;
        padding: 120px 16px 80px;
    }

    .docs-sidebar {
        width: 100%;
        position: static;
        max-height: none;
        order: 2;
    }

    .docs-content {
        order: 1;
        padding: 16px 0;
    }

    .page-content {
        padding: 24px;
    }

    .page-content h1 {
        font-size: 28px;
    }

    .page-content h2 {
        font-size: 22px;
    }

    .page-content h3 {
        font-size: 18px;
    }

    .docs-footer-nav {
        flex-direction: column;
        gap: 12px;
    }

    .sidebar-header h3 {
        font-size: 16px;
    }

    .nav-link {
        padding: 10px 12px;
        font-size: 13px;
    }
}
