/* ============================================
   CEKDATA.WEB.ID - Flat UI Theme
   Clean, Professional, Modern
   ============================================ */

/* Reset & Base */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Flat Color Palette */
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f1f5f9;
    --bg-dark: #0f172a;
    --bg-sidebar: #1e293b;
    
    /* Primary - Indigo */
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --primary-light: #eef2ff;
    --primary-border: #c7d2fe;
    
    /* Accent Colors */
    --accent-green: #059669;
    --accent-green-light: #ecfdf5;
    --accent-blue: #0284c7;
    --accent-blue-light: #eff6ff;
    --accent-orange: #d97706;
    --accent-orange-light: #fffbeb;
    --accent-red: #dc2626;
    --accent-red-light: #fef2f2;
    --accent-purple: #7c3aed;
    --accent-purple-light: #f5f3ff;
    --accent-cyan: #0891b2;
    --accent-cyan-light: #ecfeff;
    --accent-pink: #db2777;
    --accent-pink-light: #fdf2f8;
    --accent-teal: #0d9488;
    --accent-teal-light: #f0fdfa;
    
    /* Text */
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --text-white: #ffffff;
    --text-sidebar: #cbd5e1;
    --text-sidebar-active: #ffffff;
    
    /* Borders */
    --border: #e2e8f0;
    --border-light: #f1f5f9;
    --border-focus: #4f46e5;
    
    /* Shadows - Flat (minimal) */
    --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 -2px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.1);
    
    /* Radius */
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-2xl: 24px;
    --radius-full: 9999px;
    
    /* Transitions */
    --transition: 0.2s ease;
    --transition-fast: 0.15s ease;
    
    /* Sidebar */
    --sidebar-width: 260px;
    --sidebar-collapsed: 0px;
    
    /* Header */
    --header-height: 64px;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
}

ul { list-style: none; }

img { max-width: 100%; }

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

.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ============================================
   SIDEBAR
   ============================================ */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: var(--sidebar-width);
    background: var(--bg-sidebar);
    z-index: 100;
    display: flex;
    flex-direction: column;
    transition: transform var(--transition);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #334155 transparent;
}

.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb { background: #334155; border-radius: 4px; }

.sidebar-header {
    padding: 20px 24px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-white);
    font-weight: 700;
    font-size: 1.25rem;
}

.logo-icon {
    width: 36px;
    height: 36px;
    background: var(--primary);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: white;
}

.logo-badge {
    font-size: 0.6rem;
    background: var(--accent-green);
    color: white;
    padding: 2px 6px;
    border-radius: var(--radius-full);
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-left: auto;
}

/* Sidebar Nav */
.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
    overflow-y: auto;
}

.nav-section {
    margin-bottom: 24px;
}

.nav-section-title {
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: #64748b;
    padding: 0 12px;
    margin-bottom: 8px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--radius-md);
    color: var(--text-sidebar);
    font-size: 0.875rem;
    font-weight: 500;
    transition: all var(--transition-fast);
    cursor: pointer;
    position: relative;
}

.nav-item:hover {
    background: rgba(255,255,255,0.06);
    color: var(--text-sidebar-active);
}

.nav-item.active {
    background: var(--primary);
    color: var(--text-white);
}

.nav-item-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.nav-item-count {
    margin-left: auto;
    font-size: 0.7rem;
    background: rgba(255,255,255,0.1);
    padding: 2px 6px;
    border-radius: var(--radius-full);
}

.nav-item.active .nav-item-count {
    background: rgba(255,255,255,0.2);
}

/* Sidebar Footer */
.sidebar-footer {
    padding: 16px 24px;
    border-top: 1px solid rgba(255,255,255,0.06);
    font-size: 0.75rem;
    color: #64748b;
    line-height: 1.6;
}

/* ============================================
   HEADER
   ============================================ */
.header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    height: var(--header-height);
}

.header-content {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 0 24px;
    height: 100%;
}

.header-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    border-radius: var(--radius-md);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

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

/* Search */
.search-container {
    flex: 1;
    max-width: 480px;
    margin: 0 auto;
}

.search-box {
    display: flex;
    align-items: center;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 0 16px;
    height: 40px;
    transition: all var(--transition-fast);
}

.search-box:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79,70,229,0.1);
    background: var(--bg-secondary);
}

.search-icon {
    color: var(--text-muted);
    margin-right: 10px;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.search-input {
    flex: 1;
    border: none;
    background: transparent;
    outline: none;
    font-size: 0.875rem;
    color: var(--text-primary);
    font-family: inherit;
}

.search-input::placeholder {
    color: var(--text-muted);
}

.search-kbd {
    display: flex;
    gap: 2px;
    margin-left: 12px;
}

.search-kbd kbd {
    font-size: 0.65rem;
    font-family: inherit;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 3px;
    padding: 1px 5px;
    color: var(--text-muted);
}

.header-actions {
    display: flex;
    gap: 4px;
}

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

/* ============================================
   MAIN (Tool page wrapper)
   ============================================ */
.main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    width: 100%;
    flex: 1;
}

.main.container {
    padding: 0 24px 48px;
}

/* ============================================
   TOOL PAGE TOP NAV
   ============================================ */
.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-height);
}

.nav .logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--text-primary);
    text-decoration: none;
}

.nav .logo .logo-icon {
    width: 36px;
    height: 36px;
    background: var(--primary);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: white;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
    list-style: none;
}

.nav-links li a {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
    text-decoration: none;
}

.nav-links li a:hover,
.nav-links li a.active {
    background: var(--primary-light);
    color: var(--primary);
}

.mobile-menu {
    display: none;
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 1.3rem;
    color: var(--text-secondary);
    align-items: center;
    justify-content: center;
}

/* ============================================
   CONTENT AREA
   ============================================ */
.content-area {
    padding: 32px 24px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
    text-align: center;
    padding: 48px 0 40px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--primary-light);
    color: var(--primary);
    font-size: 0.8rem;
    font-weight: 600;
    padding: 6px 16px;
    border-radius: var(--radius-full);
    margin-bottom: 24px;
}

.hero h1 {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.2;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.hero h1 span {
    color: var(--primary);
}

.hero p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 560px;
    margin: 0 auto 32px;
    line-height: 1.7;
}

/* Hero Search */
.hero-search {
    max-width: 520px;
    margin: 0 auto 40px;
}

.hero-search-box {
    display: flex;
    align-items: center;
    background: var(--bg-secondary);
    border: 2px solid var(--border);
    border-radius: var(--radius-xl);
    overflow: hidden;
    transition: all var(--transition-fast);
    box-shadow: var(--shadow-sm);
}

.hero-search-box:focus-within {
    border-color: var(--primary);
    box-shadow: var(--shadow-md), 0 0 0 3px rgba(79,70,229,0.08);
}

.hero-search-icon {
    padding: 0 16px;
    color: var(--text-muted);
    font-size: 1.1rem;
}

.hero-search-input {
    flex: 1;
    border: none;
    background: transparent;
    outline: none;
    font-size: 0.95rem;
    padding: 14px 0;
    color: var(--text-primary);
    font-family: inherit;
}

.hero-search-input::placeholder {
    color: var(--text-muted);
}

.hero-search-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 10px 24px;
    margin: 4px;
    border-radius: var(--radius-lg);
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: background var(--transition-fast);
    font-family: inherit;
}

.hero-search-btn:hover {
    background: var(--primary-hover);
}

/* Stats Bar */
.stats-bar {
    display: flex;
    justify-content: center;
    gap: 48px;
    padding-top: 32px;
    border-top: 1px solid var(--border);
}

.stat-item {
    text-align: center;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 2px;
}

/* ============================================
   SECTIONS
   ============================================ */
.section {
    margin-bottom: 48px;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.section-title-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.section-icon.keuangan { background: var(--accent-green-light); }
.section-icon.kesehatan { background: var(--accent-red-light); }
.section-icon.konversi { background: var(--accent-blue-light); }
.section-icon.dokumen { background: var(--accent-purple-light); }

.section-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.section-count {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    background: var(--bg-tertiary);
    padding: 2px 10px;
    border-radius: var(--radius-full);
}

.view-all-btn {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary);
    transition: color var(--transition-fast);
}

.view-all-btn:hover {
    color: var(--primary-hover);
}

/* ============================================
   TOOLS GRID
   ============================================ */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.tool-card {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 20px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    transition: all var(--transition-fast);
    cursor: pointer;
    position: relative;
}

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

.tool-card-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
}

.tool-card-icon.keuangan { background: var(--accent-green-light); color: var(--accent-green); }
.tool-card-icon.kesehatan { background: var(--accent-red-light); color: var(--accent-red); }
.tool-card-icon.konversi { background: var(--accent-blue-light); color: var(--accent-blue); }
.tool-card-icon.dokumen { background: var(--accent-purple-light); color: var(--accent-purple); }

.tool-card-content {
    flex: 1;
    min-width: 0;
}

.tool-card-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.tool-card-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tool-card-arrow {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1rem;
    opacity: 0;
    transition: all var(--transition-fast);
}

.tool-card:hover .tool-card-arrow {
    opacity: 1;
    right: 12px;
    color: var(--primary);
}

/* ============================================
   SEARCH RESULTS
   ============================================ */
.search-results {
    display: none;
    margin-bottom: 32px;
}

.search-results.active {
    display: block;
}

.no-results {
    text-align: center;
    padding: 48px 24px;
    color: var(--text-muted);
}

.no-results-icon {
    font-size: 3rem;
    margin-bottom: 16px;
    opacity: 0.5;
}

.no-results h3 {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

/* ============================================
   TOOL PAGE (Inner Pages)
   ============================================ */
.tool-page {
    max-width: 640px;
    margin: 0 auto;
}

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

.tool-header-icon {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto 16px;
}

.tool-header h1 {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.tool-header p {
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.tool-container {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 32px;
    box-shadow: var(--shadow-sm);
}

/* ============================================
   FORMS
   ============================================ */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.form-group label small {
    font-weight: 400;
    color: var(--text-muted);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-family: inherit;
    color: var(--text-primary);
    background: var(--bg-primary);
    transition: all var(--transition-fast);
    outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79,70,229,0.1);
    background: var(--bg-secondary);
}

.form-group input::placeholder {
    color: var(--text-muted);
}

.form-group select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all var(--transition-fast);
}

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

.btn-primary:hover {
    background: var(--primary-hover);
    box-shadow: var(--shadow-md);
}

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

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

.btn-success {
    background: var(--success);
    color: white;
}

.btn-success:hover {
    background: #059669;
    box-shadow: var(--shadow-md);
}

.btn-full {
    width: 100%;
    padding: 12px;
    font-size: 0.95rem;
}

.btn-sm {
    padding: 6px 14px;
    font-size: 0.8rem;
}

.btn-group {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

/* ============================================
   INPUT GROUP (Side-by-side)
   ============================================ */
.input-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* ============================================
   RESULT BOX
   ============================================ */
.result-box {
    margin-top: 24px;
    padding: 24px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    display: none;
}

.result-box.highlight {
    background: var(--primary-light);
    border-color: var(--primary-border);
}

.result-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.result-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 20px;
}

.result-details {
    border-top: 1px solid var(--border);
    padding-top: 16px;
}

.result-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    font-size: 0.875rem;
}

.result-row .label {
    color: var(--text-secondary);
}

.result-row .value {
    font-weight: 600;
    color: var(--text-primary);
}

/* ============================================
   INFO BOX
   ============================================ */
.info-box {
    margin-top: 24px;
    padding: 20px;
    background: var(--accent-blue-light);
    border: 1px solid #bae6fd;
    border-radius: var(--radius-lg);
}

.info-box h4 {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--accent-blue);
    margin-bottom: 12px;
}

.info-box ul {
    list-style: none;
    padding: 0;
}

.info-box li {
    font-size: 0.825rem;
    color: var(--text-secondary);
    padding: 4px 0;
    padding-left: 16px;
    position: relative;
}

.info-box li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--accent-blue);
    font-weight: bold;
}

/* ============================================
   BREADCRUMB
   ============================================ */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 16px 0;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.breadcrumb a {
    color: var(--text-secondary);
    transition: color var(--transition-fast);
}

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

.breadcrumb span {
    color: var(--text-primary);
    font-weight: 500;
}

.breadcrumb-separator {
    color: var(--text-muted);
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    padding: 48px 24px 24px;
    margin-top: auto;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 32px;
    border-bottom: 1px solid var(--border);
}

.footer-brand {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
}

.footer-brand .logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-primary);
    text-decoration: none;
}

.footer-brand p {
    color: var(--text-muted);
    font-size: 0.85rem;
    line-height: 1.7;
    max-width: 320px;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-links h4 {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.footer-links ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer-links li {
    margin: 0;
}

.footer-links a {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-decoration: none;
    transition: color var(--transition-fast);
    display: inline-block;
}

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

.footer-bottom {
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted);
    padding-top: 24px;
    line-height: 1.6;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 32px;
    }
    .footer-brand {
        grid-column: 1 / -1;
    }
}

@media (max-width: 640px) {
    .footer {
        padding: 32px 16px 20px;
    }
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.open {
        transform: translateX(0);
        box-shadow: var(--shadow-xl);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .content-area {
        padding: 20px 16px;
    }
    
    .hero h1 {
        font-size: 1.75rem;
    }
    
    .hero p {
        font-size: 0.95rem;
    }
    
    .stats-bar {
        gap: 24px;
        flex-wrap: wrap;
    }
    
    .tools-grid {
        grid-template-columns: 1fr;
    }
    
    .search-kbd {
        display: none;
    }
    
    .header-content {
        padding: 0 16px;
    }
    
    .tool-container {
        padding: 20px;
    }
    
    .result-value {
        font-size: 1.5rem;
    }
    
    .input-group {
        grid-template-columns: 1fr;
    }
    
    .btn-group {
        flex-direction: column;
    }
    
    /* Mobile Nav */
    .nav-links {
        display: none;
        position: absolute;
        top: var(--header-height);
        left: 0;
        right: 0;
        background: var(--bg-secondary);
        border-bottom: 1px solid var(--border);
        padding: 8px;
        flex-direction: column;
        box-shadow: var(--shadow-lg);
        z-index: 100;
    }
    
    .nav-links.active {
        display: flex;
    }
    
    .nav-links li a {
        width: 100%;
        padding: 12px 16px;
    }
    
    .mobile-menu {
        display: flex;
    }
    
    .nav {
        position: relative;
    }
}

@media (max-width: 480px) {
    .hero-search-btn {
        padding: 10px 16px;
        font-size: 0.8rem;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .tool-container {
        padding: 16px;
    }
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
    .sidebar, .header, .footer, .btn, .hero-search {
        display: none !important;
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .tool-container {
        box-shadow: none;
        border: 1px solid var(--border);
    }
}

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

@keyframes slideIn {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}

.animate-fadeIn {
    animation: fadeIn 0.5s ease forwards;
}

.animate-slideIn {
    animation: slideIn 0.5s ease forwards;
}

/* ============================================
   UTILITIES
   ============================================ */
.hidden { display: none !important; }
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.mt-4 { margin-top: 16px; }
.mb-4 { margin-bottom: 16px; }
.mt-2 { margin-top: 8px; }
.mb-2 { margin-bottom: 8px; }
.mt-6 { margin-top: 24px; }
.mb-6 { margin-bottom: 24px; }

/* ============================================
   TABLE STYLE (for data display)
   ============================================ */
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.data-table th,
.data-table td {
    padding: 10px 14px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.data-table th {
    background: var(--bg-tertiary);
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.data-table td {
    color: var(--text-primary);
}

.data-table tr:last-child td {
    border-bottom: none;
}

.data-table tr:hover td {
    background: var(--bg-tertiary);
}

/* ============================================
   CATEGORY COLORS (Flat badges)
   ============================================ */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 10px;
    border-radius: var(--radius-full);
    font-size: 0.7rem;
    font-weight: 600;
}

.badge-green { background: var(--accent-green-light); color: var(--accent-green); }
.badge-blue { background: var(--accent-blue-light); color: var(--accent-blue); }
.badge-orange { background: var(--accent-orange-light); color: var(--accent-orange); }
.badge-purple { background: var(--accent-purple-light); color: var(--accent-purple); }
.badge-red { background: var(--accent-red-light); color: var(--accent-red); }
