/* ===== Root CSS Variables (Controlled by JS) ===== */
:root {
    --font-family: Arial, sans-serif;
    --font-size: 16px;

    --background: #ffffff;
    --text-color: #222222;
    --link-color: #00bfff;

    --primary-bg: #333333;
    --primary-text: #ffffff;

    --secondary-bg: #222222;
    --secondary-hover: #444444;

    --footer-bg: #333333;
    --footer-text: #ffffff;

    --sidebar-width: 220px;
    --menu-height: 50px;
}

/* ===== Base Reset ===== */
html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    width: 100%;
    font-family: var(--font-family);
    font-size: var(--font-size);
    background-color: var(--background);
    color: var(--text-color);
    transition: background-color 0.3s, color 0.3s;
}

/* ===== Layout ===== */
.wrapper {
    display: flex;
    flex-direction: row;
    min-height: 100vh;
}

/* ===== Top Navigation ===== */
nav.primary {
    height: var(--menu-height);
    background-color: var(--primary-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 20px;
    z-index: 1001;
	position: fixed;
	width: 100%;
}

ul.nav-links {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
    gap: 15px;
}

ul.nav-links li a {
    color: var(--primary-text);
    text-decoration: none;
    padding: 10px 15px;
}

/* ===== Sidebar ===== */
nav.secondary {
    background-color: var(--secondary-bg);
    width: var(--sidebar-width);
    position: fixed;
    top: var(--menu-height);
    bottom: 0;
    left: 0;
    overflow-y: auto;
    z-index: 1000;
}

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

ul.sidebar-links li a {
    color: var(--primary-text);
    text-decoration: none;
    display: block;
    padding: 12px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

ul.sidebar-links li a:hover {
    background-color: var(--secondary-hover);
}

/* ===== Main Content ===== */
#main-content {
    margin-left: var(--sidebar-width);
    margin-top: var(--menu-height);
    padding: 20px;
    width: calc(100% - var(--sidebar-width));
    box-sizing: border-box;
}

/* ===== Footer ===== */
footer {
    background-color: var(--footer-bg);
    color: var(--footer-text);
    text-align: center;
    padding: 20px;
    position: relative;
    width: 100%;
    box-sizing: border-box;
}

/* ===== Utility ===== */
.icon {
    width: 24px;
    height: 24px;
    stroke: var(--primary-text);
    vertical-align: middle;
    transition: stroke 0.2s ease;
}

.sidebar-btn {
    background: none;
    border: none;
    color: var(--primary-text);
    cursor: pointer;
    font-size: var(--font-size);
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-btn:hover .icon {
    stroke: var(--link-color);
}
/* in master.css */
.error { color: #c05621; font-size: 12px; display: block; margin-top: 6px; }
button[disabled] { opacity: .6; cursor: not-allowed; }

/* === Success / Error Message Container (already similar to what we had) === */
.module-replaced {
    padding: 24px;
    margin: 20px 0;
    background: #f2fff4;
    border-left: 5px solid #47c26d;
    border-radius: 8px;
    animation: fadeIn 0.4s ease;
}

.module-replaced h2 {
    margin-top: 0;
    font-size: 22px;
    color: #1b7c38;
    font-weight: 600;
}

.module-replaced p {
    margin: 8px 0 0 0;
    font-size: 16px;
    color: #2b2b2b;
}

/* Error variant (for future use) */
.module-replaced.error {
    background: #fff3f3;
    border-left-color: #d9534f;
}

.module-replaced.error h2 {
    color: #b02a37;
}

/* === Animated Success Icon === */
.success-icon {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: #47c26d;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    box-shadow: 0 6px 12px rgba(71, 194, 109, 0.35);
    animation: pop-in 0.3s ease-out;
}

.success-icon svg {
    width: 28px;
    height: 28px;
    stroke: #ffffff;
    fill: none;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Checkmark line animation */
.success-icon svg path {
    stroke-dasharray: 24;
    stroke-dashoffset: 24;
    animation: draw-check 0.4s 0.15s ease-out forwards;
}

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

@keyframes pop-in {
    0%   { transform: scale(0.6); opacity: 0; }
    60%  { transform: scale(1.05); opacity: 1; }
    100% { transform: scale(1); }
}

@keyframes draw-check {
    to { stroke-dashoffset: 0; }
}