:root {
    /* Colors */
    --color-bg-body: #f0f2f5;
    --color-bg-header: #ffffff;
    --color-bg-sidebar: #2c3e50;
    --color-bg-footer: #ffffff;
    --color-bg-panel: #ffffff;
    --color-bg-input: #f8f9fa;
    --color-bg-alt: #fcfcfc;

    --color-text-main: #2c3e50;
    --color-text-light: #7f8c8d;
    --color-text-white: #ffffff;
    --color-primary: #6baeda;
    --color-border: #d1d8e0;

    /* Status & Badge Colors */
    --color-status-published: #29c66c;
    --color-status-draft: #95a5a6;
    --color-status-private: #3c99d8;
    --color-status-archived: #daa35c;

    --color-realm-lv: #000000;
    --color-realm-rl: #aa1818;
    --color-realm-all: #734287;

    /* Fonts */
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-size-base: 14px;

    /* Dimensions */
    --header-height: 60px;
    --footer-height: 40px;
    --sidebar-width: 350px;
    --info-panel-width: 300px;
    --panel-header-height: 60px;
    --panel-footer-height: 60px;
    --spacing-base: 20px;
}

*, *::before, *::after {
    box-sizing: border-box;
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-main);
    font-size: var(--font-size-base);
    background-color: var(--color-bg-body);
    color: var(--color-text-main);
    width: 100%;
    overflow: hidden; /* No global scroll */
    display: flex;
    flex-direction: column;
}

#admin-header {
    height: var(--header-height);
    background-color: var(--color-bg-header);
    border-bottom: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    padding: 0 var(--spacing-base);
    flex-shrink: 0;
}

#admin-footer {
    height: var(--footer-height);
    background-color: var(--color-bg-footer);
    border-top: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    padding: 0 var(--spacing-base);
    font-size: 0.9em;
    color: var(--color-text-light);
    flex-shrink: 0;
    position: relative;
}

#admin-viewport {
    flex-grow: 1;
    display: flex;
    overflow: hidden;
}

/* Icons */
.u-icon {
    font-family: 'Material Icons';
    font-weight: normal;
    font-style: normal;
    font-size: 24px;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    display: inline-block;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    -webkit-font-feature-settings: 'liga';
    -webkit-font-smoothing: antialiased;
    vertical-align: middle;
}

.u-icon--small {
    font-size: 18px;
}

.u-margin-right-tiny { margin-right: 4px; }
.u-ml-10 { margin-left: 10px; }

/* Utilities */
.u-flex-center { display: flex; align-items: center; justify-content: center; }
.u-display-inline { display: inline; }
.u-padding-v-xl { padding-top: 3rem; padding-bottom: 3rem; }
.u-padding-left-large { padding-left: 1.5rem !important; }
.u-padding-left-xl { padding-left: 2.5rem !important; }
.u-min-h-60vh { min-height: 60vh; }
.u-h-100vh { height: 100vh; }

/* Modal Spinner & Loading States */
.c-modal-spinner {
    display: none !important;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.7);
    z-index: 9999;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.c-modal-spinner.htmx-request {
    display: flex !important;
}

.c-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid var(--color-border);
    border-top: 5px solid var(--color-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* System Messages */
.c-message-card {
    background-color: var(--color-bg-panel);
    border: 1px solid var(--color-border);
    border-radius: 4px;
    transition: box-shadow 0.2s ease;
    border-left: 4px solid var(--color-primary);
}

.c-message-card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.c-message-card__header {
    min-height: 50px;
}

.c-message-card__body {
    background-color: var(--color-bg-alt);
    font-size: 0.95em;
}

.c-message-card__body a {
    color: var(--color-primary);
    text-decoration: underline;
    font-weight: bold;
}
