* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

.app-container {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* Drawer Styles */
.drawer {
    width: 280px;
    background-color: #2c3e50;
    color: white;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.drawer-header {
    display: block;
    padding: 20px;
    background-color: #34495e;
    border-bottom: 1px solid #3d566e;
    color: inherit;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.2s;
}

.drawer-header:hover {
    background-color: #3d566e;
}

.drawer-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
}

.drawer-nav {
    flex: 1;
    overflow-y: auto;
    padding: 10px 0;
}

.nav-section {
    margin-bottom: 10px;
}

.nav-item {
    padding: 12px 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: background-color 0.2s;
    user-select: none;
}

.nav-item:hover {
    background-color: #34495e;
}

.nav-item.main-item {
    font-weight: 500;
    border-left: 3px solid transparent;
}

.nav-item.main-item.active {
    background-color: #34495e;
    border-left-color: #3498db;
}

.nav-item.sub-item {
    padding-left: 50px;
    font-size: 0.9rem;
    border-left: 3px solid transparent;
    text-decoration: none;
    color: inherit;
    display: flex;
    align-items: center;
}

.nav-item.sub-item:hover {
    background-color: #34495e;
}

.nav-item.sub-item.active {
    background-color: #34495e;
    border-left-color: #3498db;
}

.nav-icon {
    margin-right: 10px;
    font-size: 1.2rem;
}

.nav-text {
    flex: 1;
}

.nav-arrow {
    font-size: 0.8rem;
    transition: transform 0.3s;
}

.nav-item.expanded .nav-arrow {
    transform: rotate(180deg);
}

.nav-submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.nav-submenu.expanded {
    max-height: 500px;
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background-color: white;
}

.content-header {
    padding: 20px 30px;
    background-color: white;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    align-items: center;
    gap: 15px;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px 10px;
    color: #333;
}

.content-header h1 {
    font-size: 1.8rem;
    font-weight: 600;
    color: #2c3e50;
}

.content-body {
    flex: 1;
    overflow-y: auto;
    padding: 30px;
}

/* Page Content Styles */
.page-content {
    max-width: 900px;
    margin: 0 auto;
}

.page-content h2 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 1.5rem;
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
}

.page-content h3 {
    color: #34495e;
    margin-top: 25px;
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.page-content p {
    margin-bottom: 15px;
    line-height: 1.8;
}

.page-content ul, .page-content ol {
    margin-left: 30px;
    margin-bottom: 20px;
}

.page-content li {
    margin-bottom: 10px;
    line-height: 1.8;
}

.page-content code {
    background-color: #f4f4f4;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    color: #e74c3c;
}

.page-content pre {
    background-color: #2c3e50;
    color: #ecf0f1;
    padding: 15px;
    border-radius: 5px;
    overflow-x: auto;
    margin-bottom: 20px;
}

.page-content pre code {
    background-color: transparent;
    color: #ecf0f1;
    padding: 0;
}

/* Interactive Components */
.card {
    background-color: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.button {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s;
    margin-right: 10px;
    margin-bottom: 10px;
}

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

.button:active {
    transform: scale(0.98);
}

.button-secondary {
    background-color: #95a5a6;
}

.button-secondary:hover {
    background-color: #7f8c8d;
}

.button-import {
    background-color: #16a085;
}

.button-import:hover {
    background-color: #138d75;
}

.button-with-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font: inherit;
    font-size: 1rem;
}

.button-with-checkbox input[type="checkbox"] {
    margin: 0;
    cursor: pointer;
}

.button-with-checkbox:has(input:checked) {
    background-color: #7f8c8d;
}

.button-import.button-with-checkbox:has(input:checked) {
    background-color: #138d75;
}

.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #2c3e50;
}

.input-group input,
.input-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    font-family: inherit;
}

.input-group textarea {
    min-height: 100px;
    resize: vertical;
}

.output-box {
    background-color: #2c3e50;
    color: #ecf0f1;
    padding: 15px;
    border-radius: 5px;
    margin-top: 10px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    word-break: break-all;
    max-height: 200px;
    overflow-y: auto;
}

.output-label {
    font-weight: 600;
    margin-top: 15px;
    margin-bottom: 5px;
    color: #2c3e50;
    display: block;
}

.info-box {
    background-color: #e8f4f8;
    border-left: 4px solid #3498db;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
}

.warning-box {
    background-color: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .drawer {
        position: fixed;
        left: 0;
        top: 0;
        height: 100vh;
        transform: translateX(-100%);
        z-index: 1000;
    }

    .drawer.open {
        transform: translateX(0);
    }

    .menu-toggle {
        display: block;
    }

    .content-body {
        padding: 20px;
    }
}

/* Vertical stepper (issuance steps) – inspired by pure CSS vertical stepper */
.vertical-stepper {
    list-style: none;
    padding-left: 0;
    margin: 1rem 0;
    position: relative;
}

.vertical-stepper::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 24px;
    bottom: 24px;
    width: 2px;
    background: #ddd;
    z-index: 0;
}

.vertical-stepper .step {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 0;
    margin-bottom: 0;
    z-index: 1;
}

.vertical-stepper .step:last-child {
    margin-bottom: 0;
}

.vertical-stepper .step-number {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid #999;
    color: #666;
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}

.vertical-stepper .step.done .step-number {
    background: #0a7d2b;
    border-color: #0a7d2b;
    color: #fff;
}

.vertical-stepper .step.done .step-number::after {
    content: '✓';
    font-size: 1rem;
    font-weight: bold;
}

.vertical-stepper .step.done .step-number .step-num {
    display: none;
}

.vertical-stepper .step-content {
    flex: 1;
    min-width: 0;
    margin-left: 16px;
    padding-bottom: 24px;
}

.vertical-stepper .step:last-child .step-content {
    padding-bottom: 0;
}

.vertical-stepper .step-content .step-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.vertical-stepper .step-content .step-desc {
    color: #666;
    font-size: 0.9rem;
    margin-top: 4px;
    display: block;
}

