:root {
    --msi-blue: #003d86;
    --background: #f4f5f7;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    font-family: "Segoe UI", Arial, sans-serif;
    background: var(--background);
}

/* Header */
.header {
    height: 82px;
    background: #ffffff;
    border-bottom: 1px solid #dcdcdc;

    display: flex;
    justify-content: center;
    align-items: center;
}

.logo {
    height: 58px;
    width: auto;
    display: block;
}

/* Page Content Area */
.home-content {
    padding: 20px;
}

.portal-layout {
    display: flex;
    height: calc(100vh - 120px);
    gap: 20px;
    padding: 20px;
}

/* LEFT PANEL */
.topics-panel {
    width: 280px;
    background: #f5f5f5;
    border-radius: 10px;
    padding: 15px;
    overflow-y: auto;
    box-shadow: 0 2px 6px rgba(0,0,0,.1);
}

.topics-panel h2 {
    margin-bottom: 15px;
}

.topic-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.topic-list li {
    padding: 12px;
    margin-bottom: 8px;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    transition: .2s;
    border: 1px solid #ddd;
}

.topic-list li.active-topic{
    background:#0078d4;
    color:white;
    font-weight:600;
}

/* RIGHT PANEL */
.content-panel {
    flex: 1;
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 6px rgba(0,0,0,.1);

    display: flex;
    flex-direction: column;

    overflow: hidden;
}

#guideContent{
    display:flex;
    flex-direction:column;
    height:100%;
}

.topic-header {
    margin-bottom: 20px;
}

.image-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.step-container {
    background: #f8f8f8;
    padding: 15px;
    border-radius: 10px;
}

.step-container ol {
    padding-left: 20px;
}

.action-buttons {
    margin-top: 20px;
    display: flex;
    gap: 10px;
}

.action-buttons button {
    padding: 10px 20px;
    border: none;
    background: #0066cc;
    color: white;
    border-radius: 6px;
    cursor: pointer;
}

.action-buttons button:hover {
    background: #004b99;
}

#welcomeScreen{
    text-align:center;
    padding-top:150px;
}

.view-toggle {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 15px 0 20px;
}

.toggle-btn {
    border: none;
    background: #e9ecef;
    color: #495057;

    padding: 12px 25px;

    border-radius: 50px;

    font-size: 14px;
    font-weight: 600;

    cursor: pointer;

    transition: all .3s ease;
}

.toggle-btn:hover {
    background: #d0d7de;
    transform: translateY(-2px);
}

.toggle-btn.active {
    background: #0078d4;
    color: white;

    box-shadow:
        0 4px 12px rgba(0,120,212,.3);
}

.image-container{

    width:100%;

    height:420px;

    display:flex;

    justify-content:center;

    align-items:center;

    background:#f8f9fa;

    border:1px solid #dcdcdc;

    border-radius:10px;

    overflow:hidden;

    padding:10px;
}

.image-frame{

    display:flex;

    flex-direction:column;

    gap:15px;

    flex:1;

    min-height:0;
}

.content-panel{
    flex:1;
    overflow-y:auto;
}

.image-container img{

    max-width:100%;

    max-height:100%;

    width:auto;

    height:auto;

    object-fit:contain;

    display:block;

    cursor:pointer;
}

.step-description{

    flex-shrink:0;

    padding:15px;

    background:#f5f7fa;

    border-radius:8px;

    border-left:5px solid #0078d4;

    min-height:90px;
}

.step-description h3{
    margin-bottom:10px;
    color:#0078d4;
}

.step-description p{
    margin:0;
    line-height:1.6;
}

.modal{
    display:none;
    position:fixed;
    inset:0;
    background:rgba(0,0,0,.9);
    z-index:9999;
}

.modal-content{
    display:block;
    margin:auto;
    max-width:90%;
    max-height:90%;
    margin-top:30px;
}

.close-modal{
    position:absolute;
    top:20px;
    right:30px;
    color:white;
    font-size:40px;
    cursor:pointer;
}

.guide-toolbar{

    display:flex;

    justify-content:space-between;

    align-items:center;

    margin-bottom:15px;

    padding:10px;

    background:white;

    border-radius:12px;

    box-shadow:0 2px 8px rgba(0,0,0,.08);
}

.toolbar-left,
.toolbar-right{

    display:flex;

    gap:10px;
}

.toggle-btn{

    border:none;

    background:#e9ecef;

    padding:10px 18px;

    border-radius:25px;

    cursor:pointer;

    font-weight:600;

    transition:.2s;
}

.toggle-btn.active{

    background:#0078d4;

    color:white;
}

.nav-btn{

    border:none;

    background:#28a745;

    color:white;

    padding:10px 18px;

    border-radius:25px;

    cursor:pointer;

    font-weight:600;

    transition:.2s;
}

.nav-btn:hover{

    background:#218838;
}

.toggle-btn:hover,
.nav-btn:hover{

    transform:translateY(-1px);
}

.email-section{

    display:flex;

    justify-content:flex-end;

    margin-top:15px;
}

.email-btn{

    background:#0078d4;

    color:white;

    border:none;

    padding:10px 18px;

    border-radius:8px;

    cursor:pointer;
}

.email-btn:hover{

    background:#005ea6;
}

.email-form{

    display:none;

    gap:10px;

    align-items:center;
}

.email-form input{

    width:280px;

    padding:10px;

    border:1px solid #ccc;

    border-radius:6px;
}

.email-form button{

    background:#28a745;

    color:white;

    border:none;

    padding:10px 16px;

    border-radius:6px;

    cursor:pointer;
}

#stepDescription {
    white-space: pre-line;
}

.image-container img{
    max-width:100%;
    max-height:100%;
    width:auto;
    height:auto;
    object-fit:contain;
    display:block;
    cursor:pointer;

    transition: transform 0.3s ease;
    transform-origin:center center;
}