body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f4f4f9;
    color: #333;
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

.wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

header {
    background: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 1rem 0;
    margin-bottom: 2rem;
}

header .logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: #444;
}

header .logo a {
    text-decoration: none;
    color: inherit;
}

header .logo i {
    color: #48a935;
}

.content {
    padding-top: 2rem;
    padding-bottom: 4rem;
}

.col {
    float: left;
    box-sizing: border-box;
}

.col2 {
    width: 50%;
    padding: 0 15px;
}

@media (max-width: 768px) {
    .col2 {
        width: 100%;
        float: none;
    }
}

.inner {
    background: #fff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

h2 {
    margin-top: 0;
    color: #444;
    border-bottom: 2px solid #f4f4f9;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

h3.show_manual {
    cursor: pointer;
    background: #f8f9fa;
    padding: 10px 15px;
    padding-left: 35px;
    border-radius: 4px;
    margin-bottom: 5px;
    transition: background 0.3s;
    position: relative;
}

h3.show_manual::before {
    content: '';
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    border: 5px solid transparent;
    border-left: 6px solid #666;
    transition: transform 0.2s ease;
}

h3.show_manual.active::before {
    transform: translateY(-50%) rotate(90deg);
}

h3.show_manual:hover {
    background: #e9ecef;
}

.manual {
    display: none;
    padding: 15px;
    border: 1px solid #eee;
    border-top: none;
    margin-bottom: 15px;
    background: #fff;
}

.manual.active {
    display: block;
}

textarea {
    width: 100%;
    height: 150px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: monospace;
    resize: vertical;
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: #48a935;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.3s;
}

.btn:hover {
    background-color: #3d912d;
}

.btn.light {
    background-color: #6c757d;
}

.btn.light:hover {
    background-color: #5a6268;
}

.preview-box {
    border: 1px solid #eee;
    padding: 20px;
    background: #fff;
    overflow-x: auto;
}

.clear {
    clear: both;
}

footer {
    background: #333;
    color: #fff;
    padding: 2rem 0;
    margin-top: auto;
}

footer a {
    color: #48a935;
    text-decoration: none;
}

img {
    max-width: 100%;
    height: auto;
}

/* Form styles from index.php */
.container {
    width: 100%;
    max-width: 1100px;
    margin: 2rem auto 4rem;
    padding: 0 1rem;
    box-sizing: border-box;
}

.main-layout {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

.form-column {
    flex: 0 0 420px;
    background-color: #fff;
    padding: 1.5rem;
    padding-bottom: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.preview-column {
    flex: 1;
    background-color: #fff;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 2rem;
}

@media (max-width: 900px) {
    .main-layout {
        flex-direction: column;
    }
    .form-column {
        flex: none;
        width: 100%;
        max-width: 500px;
        margin: 0 auto;
    }
    .preview-column {
        width: 100%;
        max-width: 500px;
        margin: 0 auto;
        position: static;
    }
}

.container h1 {
    font-size: 1.5rem;
    margin-top: 0;
    margin-bottom: 1.25rem;
}

.form-group {
    margin-bottom: 0.75rem;
}

label {
    display: block;
    margin-bottom: 0.4rem;
    font-weight: 600;
    font-size: 0.9rem;
}

input[type="text"],
input[type="email"],
input[type="password"],
select {
    width: 100%;
    padding: 0.6rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    box-sizing: border-box;
    transition: all 0.3s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
select:focus {
    border-color: #48a935;
    outline: none;
    box-shadow: 0 0 0 3px rgba(72, 169, 53, 0.15);
}

button[type="submit"] {
    width: 100%;
    margin-top: 1.25rem;
    padding: 0.85rem 1.5rem;
    background: linear-gradient(135deg, #48a935 0%, #3d912d 100%);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(72, 169, 53, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

button[type="submit"]:hover {
    background: linear-gradient(135deg, #3d912d 0%, #2f7a21 100%);
    box-shadow: 0 6px 16px rgba(72, 169, 53, 0.4);
    transform: translateY(-2px);
}

button[type="submit"]:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(72, 169, 53, 0.3);
}

.error-message {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 0.75rem;
    border-radius: 4px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

/* Login page styles */
.login-container {
    max-width: 360px;
    margin: 6rem auto 4rem;
    padding: 2rem;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.login-container h1 {
    margin-top: 0;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    text-align: center;
}

/* Manual/Instructions styles */
.manual ol {
    margin: 0 0 1rem 0;
    padding-left: 1.5rem;
}

.manual ol li {
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

.manual code {
    background: #f4f4f9;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.85em;
    color: #c7254e;
    word-break: break-all;
}

.manual a {
    color: #48a935;
}

.manual a:hover {
    text-decoration: underline;
}

.manual-note {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 0.75rem 1rem;
    margin: 1rem 0;
    font-size: 0.9rem;
    border-radius: 0 4px 4px 0;
}

.manual details {
    margin: 1rem 0;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #f8f9fa;
}

.manual details summary {
    padding: 0.75rem 1rem;
    padding-left: 2rem;
    cursor: pointer;
    background: #e9ecef;
    border-radius: 4px 4px 0 0;
    user-select: none;
    position: relative;
    list-style: none;
}

.manual details summary::-webkit-details-marker {
    display: none;
}

.manual details summary::before {
    content: '';
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    border: 4px solid transparent;
    border-left: 5px solid #666;
    transition: transform 0.2s ease;
}

.manual details[open] summary::before {
    transform: translateY(-50%) rotate(90deg);
}

.manual details summary:hover {
    background: #dee2e6;
}

.manual details[open] summary {
    border-bottom: 1px solid #ddd;
    border-radius: 4px 4px 0 0;
}

.manual details > ol,
.manual details > p {
    padding: 1rem;
    margin: 0;
}

.manual details ol {
    padding-left: 2.5rem;
}

.manual details textarea {
    margin: 0 1rem 1rem 1rem;
    width: calc(100% - 2rem);
}