/* Global styles and variables */
:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --error-color: #e74c3c;
    --success-color: #27ae60;
    --text-color: #333;
    --border-color: #ddd;
    --background-color: #f5f5f5;
    --primary: #2A5C82;
    --secondary: #FF7F50;
    --accent: #32CD32;
    --background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    --text: #2c3e50;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', system-ui, sans-serif;
}

body {
    font-family: 'Segoe UI', system-ui, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--background-dark);
    color: var(--text-color);
    margin: 0;
    padding: 0;
    line-height: 1.6;
    font-size: 16px;
}

/* Container Layout */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    display: flex;
    gap: 30px;
}

/* Left and Right Sections */
.left {
    flex: 1;
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(12, 12, 12, 0.1);
}

.right {
    flex: 2;
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(12, 12, 12, 0.1);
}

/* Login Section */
#loginSection {
    background: white;
    padding: 2.5rem;
    border-radius: 1rem;
    box-shadow: var(--shadow);
    max-width: 400px;
    margin: 5vh auto;
    transform: translateY(20px);
    opacity: 0;
    animation: fadeIn 0.6s ease forwards;
}

#loginForm {
    display: grid;
    gap: 1.5rem;
}

input {
    padding: 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

input:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(42, 92, 130, 0.1);
}

/* Buttons */
button {
    font-family: inherit;
    /* This makes buttons inherit the body font */
    background-color: var(--secondary-color);
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

button:hover {
    background-color: #2980b9;
}

.loginButton,
#saveBtn {
    background: var(--primary);
    color: white;
}

.logoutButton {
    background: var(--secondary);
    color: white;
    position: absolute;
    top: 5rem;
    right: 1rem;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.fancy-title {
    color: var(--secondary-color);
    font-size: 2.8rem;
    text-align: center;
    position: relative;
    margin: 0rem 0;
    padding: .2rem 0;
    letter-spacing: 2px;
    text-transform: uppercase;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    animation: titleEntrance 0.8s ease-out forwards;
}

.fancy-title::before,
.fancy-title::after {
    content: '';
    position: absolute;
    width: 30%;
    height: 4px;
    background: linear-gradient(90deg, transparent 0%, var(--primary) 50%, transparent 100%);
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 2px;
}

@keyframes titleEntrance {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Add a subtle background pattern */
.fancy-title span {
    position: relative;
    z-index: 1;
    padding: 0 1rem;
    background: var(--card-bg);
}

.fancy-title::before {
    background: linear-gradient(90deg,
            transparent 0%,
            var(--secondary-color) 30%,
            var(--primary) 50%,
            var(--secondary-color) 70%,
            transparent 100%);
}

/* Hover effect */
.fancy-title:hover {
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.4);
    transform: scale(1.02);
    transition: all 0.3s ease;
}

.fancy-h2 {
    font-size: 1.8rem;
    color: var(--secondary);
    margin: 0 0 2rem;
    padding: 0.5rem 0;
    position: relative;
    letter-spacing: 0.5px;
    display: inline-block;
    animation: slideIn 0.6s ease-out;
}

.fancy-h2:hover {
    color: #ff9e4a;
    cursor: default;
}

.fancy-h2:hover::before {
    width: 60%;
    transition: width 0.3s ease;
}

/* Labels and Dynamic Labels */
.lbl {
    display: block;
    font-weight: bold;
    margin-top: 15px;
    color: var(--primary-color);
}

.dynamic-label {
    background-color: var(--background-color);
    padding: 1rem;
    border-radius: 0.5rem;
    margin: 0.5rem 0;
    border: 2px solid #e9ecef;
}

/* Stage Divisions */
.stage-div {
    padding: 10px;
    background-color: var(--background-color);
    border-radius: 4px;
    border-left: 4px solid var(--primary);
    margin: 5px 0;
}

/* Search Section */
#searchId {
    font-family: inherit;
    /* This makes buttons inherit the body font */
    width: 200px;
    padding: 8px;
    margin-right: 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
}

/* Radio Group */
.radio-group {
    margin-bottom: 20px;
}

.radio-group label {
    margin-right: 20px;
    cursor: pointer;
}

/* Popup Styles */
.popup {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.popup select {
    width: 100%;
    padding: 8px;
    margin: 10px 0;
    border: 1px solid var(--border-color);
    border-radius: 4px;
}

/* Form Inputs */
input[type="number"] {
    font-family: inherit;
    /* This makes buttons inherit the body font */
    width: 200px;
    padding: 8px;
    margin: 5px 0;
    border: 1px solid var(--border-color);
    border-radius: 4px;
}

/* Links */
.plan-link,
.I-link,
.P-link {
    text-decoration: none;
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    margin-left: 10px;
    font-size: 14px;
}

.plan-link,
.plan-link:hover {
    background-color: rgb(15, 0, 200);
}

.I-link,
.I-link:hover {
    background-color: #be9c00;
}

.P-link,
.P-link:hover {
    background-color: #094900;
}

.I-link:hover,
.P-link:hover {
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
    transform: scale(1.2);
}

/* Error Message Styling */
.error {
    color: rgb(0, 0, 0);
    padding: 0.5rem;
    border-radius: 4px;
}


/* Hide class */
.hidden {
    display: none;
}

/* Responsive Design */
@keyframes fadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 1200px) {
    .container {
        flex-direction: column;
    }

    .left,
    .right {
        margin: 0.5rem 0;
    }

}

/* PDF Embed Styling */
#rapport embed {
    border: 1px solid var(--border-color);
    border-radius: 4px;
}