/* Modern CSS Reset */
*, *::before, *::after {
    box-sizing: border-box;
}
body, h1, h2, h3, h4, p, figure, blockquote, dl, dd {
    margin: 0;
}
ul[role='list'], ol[role='list'] {
    list-style: none;
}
html:focus-within {
    scroll-behavior: smooth;
}
html {
    font-size: 62.5%; /* 1rem = 10px */
}
body {
    min-height: 100vh;
    text-rendering: optimizeSpeed;
    line-height: 1.5;
}
img, picture {
    max-width: 100%;
    display: block;
}
input, button, textarea, select {
    font: inherit;
}/* Global Theme & Variables */
:root {
    /* Core Scale */
    --font-stack: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-mono: "Courier New", Courier, monospace;
    
    /* Light Theme (Default) */
    --bg-color: #f4f7f9;
    --surface-color: #ffffff;
    --text-color: #333333;
    --text-color-secondary: #666666;
    --primary-accent: #0066cc;
    --border-color: #e2e8f0;
    --border-radius-md: 0.8rem;
    
    /* Status Colors */
    --success: #28a745;
    --danger: #dc3545;
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1.0rem;
    --spacing-md: 1.6rem;
    --spacing-lg: 2.0rem;
    --spacing-xl: 2.4rem;
}

/* System Dark Theme Preference */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --bg-color: #121212;
        --surface-color: #1e1e1e;
        --text-color: #e0e0e0;
        --text-color-secondary: #a0a0a0;
        --border-color: #333333;
    }
}

/* Explicit Themes (for future use or manual overrides) */
[data-theme="dark"] {
    --bg-color: #121212;
    --surface-color: #1e1e1e;
    --text-color: #e0e0e0;
    --text-color-secondary: #a0a0a0;
    --border-color: #333333;
    --border-radius-md: 0.8rem;
}

[data-theme="device"] {
    --bg-color: #000000;
    --surface-color: #000000;
    --text-color: #00eaff;
    --text-color-secondary: #008f99;
    --primary-accent: #00eaff;
    --border-color: #00eaff;
    --border-radius-md: 0px;
    --glow-shadow: 0 0 5px rgba(0, 234, 255, 0.5);
}

body {
    font-family: var(--font-stack);
    font-size: 1.6rem;
    background-color: var(--bg-color);
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    transition: background-color 0.3s ease, color 0.3s ease;
}/* internal/views/login.css */
.Login-root {
    max-width: 40rem;
    margin: 6.4rem auto;
    padding: 3.2rem;
    border: 0.1rem solid var(--border-color);
    border-radius: var(--border-radius-md);
    background-color: var(--surface-color);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);

    & h1 {
        text-align: center;
        margin-bottom: 3.2rem;
        font-size: 2.4rem;
    }

    & form {
        display: flex;
        flex-direction: column;
    }

    & label {
        margin-bottom: 0.8rem;
        font-weight: bold;
        font-size: 1.6rem;
    }

    & .code-input-group {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 0.8rem;
        margin-bottom: 3.2rem;
        font-size: 2.4rem;
    }

    & .part-input {
        width: 6rem;
        height: 7rem;
        text-align: center;
        font-size: 2.4rem;
        font-family: var(--font-mono); /* Strictly enforced */
        border: 0.2rem solid var(--border-color);
        border-radius: var(--border-radius-md);
        background-color: var(--surface-color);
        color: var(--text-color);
        
        /* Device Theme Glow */
        [data-theme="device"] & {
            box-shadow: var(--glow-shadow);
        }
    }

    & .part-input:focus {
        outline: none;
        border-color: var(--primary-accent);
        box-shadow: 0 0 0 0.2rem rgba(0, 102, 204, 0.2);
    }
    
    [data-theme="device"] & .part-input:focus {
        box-shadow: 0 0 8px var(--primary-accent);
    }
}

.btn {
    display: inline-block;
    padding: 1.2rem 2.4rem;
    font-size: 1.6rem;
    font-weight: bold;
    color: #ffffff;
    background-color: var(--primary-accent);
    border: none;
    border-radius: var(--border-radius-md);
    cursor: pointer;
    text-align: center;
    transition: background-color 0.2s;

    &:hover {
        opacity: 0.9;
    }
    
    [data-theme="device"] & {
        color: #000;
        box-shadow: var(--glow-shadow);
    }
}/* internal/views/dashboard.css */
.Dashboard-root {
    max-width: 90rem;
    margin: 3.2rem auto;
    padding: 1.6rem;
    background-color: var(--surface-color);
    border: 0.1rem solid var(--border-color);
    border-radius: var(--border-radius-md);
    
    position: relative; /* For pseudo-element positioning */
    
    [data-theme="device"] & {
        border-top: none; /* Replaced by pseudo-element */
        box-shadow: var(--glow-shadow);
    }

    /* Device Mode Gradient Border */
    [data-theme="device"] &::before {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 0.4rem; /* Thickness of the top border */
        background: linear-gradient(to right, 
            #808080, /* Grey */
            #00ff00, /* Green */
            #ffff00, /* Yellow */
            #ff0000  /* Red */
        );
    }

    & h1 {
        text-align: center;
        color: var(--text-color);
        margin-bottom: 2.4rem;
        font-size: 2.4rem;
    }

    & p {
        text-align: center;
        margin-bottom: 1.6rem;
    }

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

        &:hover {
            text-decoration: underline;
        }
    }

    & table {
        width: 100%;
        border-collapse: collapse;
        margin-top: 2.4rem;
        background-color: var(--surface-color);
        /* border-radius handling is tricky with collapse, but we use md generally */
        overflow: hidden; 
    }

    & th, & td {
        padding: 1.6rem; /* Generous padding */
        text-align: left;
        border-bottom: 0.1rem solid var(--border-color);
    }

    & th {
        background-color: var(--bg-color); /* Slightly distinct header background if needed, or surface */
        color: var(--text-color-secondary);
        font-weight: bold;
        text-transform: uppercase;
        font-size: 1.2rem; /* Smaller font size */
        letter-spacing: 0.05rem; /* Distinct separation */
    }

    & tbody tr:hover {
        background-color: rgba(0, 0, 0, 0.02);
    }
    
    [data-theme="device"] & tbody tr:hover {
        background-color: rgba(0, 234, 255, 0.1);
    }

    & td {
        color: var(--text-color);
        font-size: 1.6rem;
    }
}

/* Status Indicators */
.status-success {
    color: var(--success);
}

.status-danger {
    color: var(--danger);
}
