@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&family=Plus+Jakarta+Sans:wght@300;400;500;600;700&display=swap');

:root {
    /* Fonts */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Plus Jakarta Sans', sans-serif;

    /* Light Theme Palette (Earthy/Terracotta matching App) */
    --bg-primary: #F7F5F2;
    --bg-secondary: #FFFFFF;
    --text-primary: #1F1F1F;
    --text-secondary: #6E6E6E;
    --accent: #C9784A;
    --accent-light: #FBEFEA;
    --accent-hover: #B56639;
    --secondary-accent: #8E7A67;
    --border: #E7E2D9;
    --shadow: rgba(142, 122, 103, 0.08);
    --shadow-hover: rgba(142, 122, 103, 0.15);
    --sidebar-w: 280px;
    --header-h: 80px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
    /* Dark Theme Palette (Sleek dark mode) */
    --bg-primary: #0F0F11;
    --bg-secondary: #17171C;
    --text-primary: #F7F5F2;
    --text-secondary: #A0A0AA;
    --accent: #E28D5D;
    --accent-light: #2A1F1B;
    --accent-hover: #F0A274;
    --secondary-accent: #B5A596;
    --border: #2E2E35;
    --shadow: rgba(0, 0, 0, 0.3);
    --shadow-hover: rgba(0, 0, 0, 0.5);
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-h) + 20px);
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    transition: background-color 0.3s ease, color 0.3s ease;
}

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

a:hover {
    color: var(--accent-hover);
}

/* Header */
header {
    height: var(--header-h);
    background-color: rgba(247, 245, 242, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

[data-theme="dark"] header {
    background-color: rgba(15, 15, 17, 0.8);
}

.header-container {
    max-width: 1280px;
    height: 100%;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.logo-img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--accent);
}

.app-name {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

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

/* Theme Toggle button */
.theme-btn {
    background: none;
    border: 1px solid var(--border);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    transition: var(--transition);
}

.theme-btn:hover {
    border-color: var(--accent);
    background-color: var(--accent-light);
    color: var(--accent);
}

.theme-btn svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    fill: none;
}

.theme-btn .sun-icon {
    display: none;
}

[data-theme="dark"] .theme-btn .sun-icon {
    display: block;
}

[data-theme="dark"] .theme-btn .moon-icon {
    display: none;
}

.menu-btn {
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
    display: none;
}

/* Layout container */
.layout-container {
    max-width: 1280px;
    margin: var(--header-h) auto 0;
    padding: 2rem;
    display: flex;
    gap: 2.5rem;
    position: relative;
}

/* Sidebar navigation */
aside {
    width: var(--sidebar-w);
    position: sticky;
    top: calc(var(--header-h) + 2rem);
    height: calc(100vh - var(--header-h) - 4rem);
    overflow-y: auto;
    flex-shrink: 0;
    padding-right: 1rem;
}

aside::-webkit-scrollbar {
    width: 4px;
}
aside::-webkit-scrollbar-thumb {
    background-color: var(--border);
    border-radius: 4px;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.sidebar-nav a {
    display: block;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.95rem;
    border-left: 2px solid transparent;
    transition: var(--transition);
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
    background-color: var(--bg-secondary);
    color: var(--accent);
    border-left-color: var(--accent);
    box-shadow: 0 4px 12px var(--shadow);
}

/* Main Content Area */
main {
    flex-grow: 1;
    min-width: 0;
}

.hero-card {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 3rem 2.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 10px 30px var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hero-card h1 {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

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

.last-updated::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--accent);
}

.content-section {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 2.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 20px var(--shadow);
    transition: var(--transition);
    scroll-margin-top: calc(var(--header-h) + 2rem);
}

.content-section:hover {
    box-shadow: 0 8px 30px var(--shadow-hover);
}

.content-section h2 {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.content-section h2 svg {
    color: var(--accent);
    width: 28px;
    height: 28px;
    stroke: currentColor;
    fill: none;
}

.content-section p {
    color: var(--text-secondary);
    margin-bottom: 1.25rem;
    font-size: 1.05rem;
}

.content-section strong {
    color: var(--text-primary);
}

/* Custom UI Grid / Highlight Cards */
.security-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin: 1.5rem 0;
}

.security-card {
    background-color: var(--bg-primary);
    border: 1px solid var(--border);
    padding: 1.5rem;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    transition: var(--transition);
}

.security-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}

.security-card h3 {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
}

.security-card p {
    font-size: 0.95rem;
    margin-bottom: 0;
}

/* Styled Table */
.data-table-container {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: 12px;
    margin: 1.5rem 0;
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.95rem;
}

th, td {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
}

th {
    background-color: var(--bg-primary);
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--text-primary);
}

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

/* Alert box styling */
.alert-box {
    background-color: var(--accent-light);
    border-left: 4px solid var(--accent);
    padding: 1.25rem;
    border-radius: 8px;
    margin: 1.5rem 0;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.alert-box svg {
    color: var(--accent);
    flex-shrink: 0;
    width: 24px;
    height: 24px;
}

.alert-box p {
    margin-bottom: 0;
    font-size: 0.95rem;
    color: var(--text-primary);
}

/* Lists styling */
ul {
    list-style-position: inside;
    margin-bottom: 1.5rem;
    padding-left: 0.5rem;
}

li {
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    font-size: 1.025rem;
}

li::marker {
    color: var(--accent);
}

/* Code styling */
code {
    background-color: var(--bg-primary);
    border: 1px solid var(--border);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-size: 0.9rem;
    font-family: monospace;
    color: var(--accent);
}

/* Footer styling */
footer {
    border-top: 1px solid var(--border);
    background-color: var(--bg-secondary);
    padding: 3rem 2rem;
    text-align: center;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.footer-container {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.footer-logo img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

.footer-logo span {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.25rem;
}

.copyright {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* Responsive Breakpoints */
@media (max-width: 1024px) {
    .layout-container {
        gap: 1.5rem;
    }
    :root {
        --sidebar-w: 240px;
    }
}

@media (max-width: 768px) {
    .menu-btn {
        display: block;
    }
    
    .layout-container {
        flex-direction: column;
        padding: 1rem;
    }
    
    aside {
        display: none;
        position: fixed;
        top: var(--header-h);
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        height: calc(100vh - var(--header-h));
        background-color: var(--bg-primary);
        z-index: 999;
        padding: 2rem;
        overflow-y: auto;
    }
    
    aside.active {
        display: block;
    }
    
    .sidebar-nav {
        gap: 1rem;
    }
    
    .sidebar-nav a {
        font-size: 1.1rem;
        padding: 1rem;
    }
    
    .hero-card {
        padding: 2rem 1.5rem;
    }
    
    .hero-card h1 {
        font-size: 2rem;
    }
    
    .content-section {
        padding: 1.5rem;
    }
    
    .security-grid {
        grid-template-columns: 1fr;
    }
}
