/* ===================================
   GACE Template Editor - Professional Styles
   =================================== */

/* === Global Styles === */
/* IMPORTANT: Don't apply global resets to the entire document.
   GrapesJS relies on its own CSS for panel/layout sizing.
   We scope our reset to the app shell only. */
#app, #app * {
    box-sizing: border-box;
}

#app {
    margin: 0;
    padding: 0;
}

:root {
    --gace-red: #8B0000;
    --gace-red-light: #A52A2A;
    --gace-red-dark: #6B0000;
    --primary: #3498db;
    --primary-dark: #2980b9;
    --success: #27ae60;
    --success-dark: #229954;
    --warning: #f39c12;
    --danger: #e74c3c;
    --dark: #2c3e50;
    --dark-lighter: #34495e;
    --light: #ecf0f1;
    --lighter: #f8f9fa;
    --border: #ddd;
    --shadow: rgba(0,0,0,0.1);
    --shadow-lg: rgba(0,0,0,0.2);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    overflow: hidden;
    color: var(--dark);
}

#app {
    display: flex;
    flex-direction: column;
    height: 100vh;
    background: white;
}

/* Ensure GrapesJS panels stay above the canvas and don't overlap each other */
.gjs-pn-panels {
    z-index: 100;
}

.gjs-pn-panel {
    position: relative;
}

/* === Loading Overlay === */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(44, 62, 80, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.3s ease;
}

    .loading-overlay.hidden {
        opacity: 0;
        pointer-events: none;
    }

.loading-spinner {
    text-align: center;
    color: white;
}

.spinner {
    border: 4px solid rgba(255,255,255,0.3);
    border-top: 4px solid white;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.loading-spinner p {
    font-size: 16px;
    font-weight: 500;
}

/* === Navigation Bar === */
.navbar {
    background: linear-gradient(135deg, var(--gace-red) 0%, var(--gace-red-dark) 100%);
    color: white;
    padding: 15px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 12px var(--shadow-lg);
    z-index: 1000;
    position: relative;
}

.navbar-left {
    display: flex;
    align-items: center;
    gap: 30px;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 15px;
}

    .logo-section i {
        font-size: 32px;
        color: rgba(255,255,255,0.9);
    }

.title-group h1 {
    font-size: 22px;
    font-weight: 700;
    margin: 0;
    letter-spacing: -0.5px;
}

.subtitle {
    font-size: 12px;
    color: rgba(255,255,255,0.8);
    font-weight: 400;
}

.template-status {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.template-name {
    font-size: 16px;
    font-weight: 600;
    color: rgba(255,255,255,0.95);
}

.last-saved {
    font-size: 11px;
    color: rgba(255,255,255,0.7);
}

.navbar-right {
    display: flex;
    gap: 12px;
    align-items: center;
}

.user-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(255,255,255,0.15);
    border-radius: 20px;
    margin-left: 10px;
}

    .user-badge i {
        font-size: 18px;
    }

.user-info {
    font-size: 14px;
    font-weight: 500;
}

/* === Buttons === */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 2px 4px var(--shadow);
}

    .btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px var(--shadow-lg);
    }

    .btn:active {
        transform: translateY(0);
    }

    .btn i {
        font-size: 14px;
    }

.btn-primary {
    background: var(--primary);
    color: white;
}

    .btn-primary:hover {
        background: var(--primary-dark);
    }

.btn-secondary {
    background: #95a5a6;
    color: white;
}

    .btn-secondary:hover {
        background: #7f8c8d;
    }

.btn-success {
    background: var(--success);
    color: white;
}

    .btn-success:hover {
        background: var(--success-dark);
    }

.btn-info {
    background: #3498db;
    color: white;
}

    .btn-info:hover {
        background: #2980b9;
    }

.btn-danger {
    background: var(--danger);
    color: white;
}

    .btn-danger:hover {
        background: #c0392b;
    }

/* === Template Info Container === */
.template-info-container {
    background: white;
    border-bottom: 2px solid var(--border);
    box-shadow: 0 2px 8px var(--shadow);
}

.info-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 25px;
    background: var(--lighter);
    cursor: pointer;
    user-select: none;
    transition: background 0.2s;
}

    .info-header:hover {
        background: #e9ecef;
    }

    .info-header h3 {
        font-size: 16px;
        color: var(--dark);
        display: flex;
        align-items: center;
        gap: 10px;
        margin: 0;
    }

.toggle-btn {
    background: none;
    border: none;
    color: var(--dark);
    font-size: 16px;
    cursor: pointer;
    padding: 5px;
    transition: transform 0.3s ease;
}

    .toggle-btn i {
        transition: transform 0.3s ease;
    }

.info-header.collapsed .toggle-btn i {
    transform: rotate(180deg);
}

.template-info-panel {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    padding: 0 25px;
}

    .template-info-panel.expanded {
        max-height: 300px;
        padding: 20px 25px;
    }

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    align-items: start;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

    .form-group label {
        font-size: 13px;
        font-weight: 600;
        color: var(--dark);
        display: flex;
        align-items: center;
        gap: 6px;
    }

        .form-group label i {
            color: var(--gace-red);
            font-size: 14px;
        }

    .form-group input[type="text"],
    .form-group select {
        padding: 10px 14px;
        border: 2px solid var(--border);
        border-radius: 6px;
        font-size: 14px;
        transition: all 0.2s ease;
        font-family: inherit;
    }

        .form-group input[type="text"]:focus,
        .form-group select:focus {
            outline: none;
            border-color: var(--gace-red);
            box-shadow: 0 0 0 3px rgba(139, 0, 0, 0.1);
        }

        .form-group input[type="text"]:required:invalid {
            border-color: var(--danger);
        }

    .form-group select {
        cursor: pointer;
        background: white;
    }

.checkbox-group {
    justify-content: center;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: var(--dark);
    user-select: none;
}

    .checkbox-label input[type="checkbox"] {
        width: 20px;
        height: 20px;
        cursor: pointer;
        accent-color: var(--gace-red);
    }

    .checkbox-label.small {
        font-size: 13px;
        font-weight: 500;
    }

.form-stats {
    display: flex;
    gap: 20px;
    align-items: center;
    grid-column: 1 / -1;
    padding-top: 10px;
    border-top: 1px solid var(--border);
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #7f8c8d;
}

    .stat-item i {
        color: var(--gace-red);
    }

/* === Editor Toolbar === */
.editor-toolbar {
    background: var(--lighter);
    border-bottom: 1px solid var(--border);
    padding: 10px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px var(--shadow);
}

.toolbar-section {
    display: flex;
    align-items: center;
    gap: 15px;
}

.toolbar-group {
    display: flex;
    gap: 5px;
    background: white;
    border-radius: 6px;
    padding: 5px;
    box-shadow: 0 1px 3px var(--shadow);
}

.toolbar-btn {
    background: transparent;
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    color: var(--dark);
    font-size: 16px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

    .toolbar-btn:hover {
        background: var(--lighter);
        color: var(--gace-red);
    }

    .toolbar-btn:active {
        background: var(--border);
    }

    .toolbar-btn.active {
        background: var(--gace-red);
        color: white;
    }

.toolbar-divider {
    width: 1px;
    height: 30px;
    background: var(--border);
}

.help-btn {
    background: var(--dark);
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
}

    .help-btn:hover {
        background: var(--dark-lighter);
        color: white;
    }

/* === GrapesJS Editor === */
#gjs {
    flex: 1;
    border-top: 3px solid var(--gace-red);
    overflow: hidden;
    position: relative;
}

/* GrapesJS Canvas Styling */
.gjs-cv-canvas {
    background: #f5f5f5 !important;
}

.gjs-frame {
    border: none !important;
}

/* GrapesJS Blocks Panel Styling */
.gjs-blocks-c {
    padding: 10px;
}

.gjs-block {
    min-height: 80px;
    padding: 15px;
    background: white;
    border: 2px solid var(--border);
    border-radius: 8px;
    margin-bottom: 10px;
    transition: all 0.2s ease;
    cursor: move;
}

.gjs-block:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--shadow-lg);
    border-color: var(--gace-red);
}

.gjs-block__media {
    font-size: 32px;
    color: var(--gace-red);
    margin-bottom: 8px;
}

.gjs-block-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--dark);
    text-align: center;
    line-height: 1.4;
}

.gjs-block-category .gjs-title {
    background: linear-gradient(135deg, var(--gace-red) 0%, var(--gace-red-dark) 100%);
    color: white;
    padding: 12px;
    font-weight: 700;
    font-size: 14px;
    border-radius: 6px;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* GrapesJS Style Manager */
.gjs-sm-sector {
    border-radius: 6px;
    margin-bottom: 12px;
    border: 1px solid var(--border);
    overflow: hidden;
}

.gjs-sm-sector-title {
    background: var(--lighter);
    padding: 12px 15px;
    font-weight: 600;
    font-size: 13px;
    color: var(--dark);
    cursor: pointer;
    transition: background 0.2s;
}

.gjs-sm-sector-title:hover {
    background: #e9ecef;
}

.gjs-sm-sector.gjs-sm-open .gjs-sm-sector-title {
    background: var(--gace-red);
    color: white;
}

.gjs-sm-properties {
    padding: 15px;
    background: white;
}

.gjs-sm-property {
    margin-bottom: 15px;
}

.gjs-sm-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 6px;
    display: block;
}

.gjs-field input,
.gjs-field select,
.gjs-field-integer input,
.gjs-field-color input {
    width: 100%;
    padding: 8px 10px;
    border: 2px solid var(--border);
    border-radius: 4px;
    font-size: 13px;
    font-family: inherit;
    transition: border-color 0.2s;
}

.gjs-field input:focus,
.gjs-field select:focus {
    outline: none;
    border-color: var(--gace-red);
    box-shadow: 0 0 0 3px rgba(139, 0, 0, 0.1);
}

/* GrapesJS Layer Manager */
.gjs-layer {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    font-size: 13px;
    transition: background 0.2s;
}

.gjs-layer:hover {
    background: var(--lighter);
}

.gjs-layer.gjs-selected {
    background: rgba(139, 0, 0, 0.1);
    border-left: 3px solid var(--gace-red);
    font-weight: 600;
}

.gjs-layer__icon {
    color: var(--gace-red);
}

/* GrapesJS Traits Panel */
.gjs-trt-trait {
    margin-bottom: 15px;
}

.gjs-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 6px;
}

.gjs-trt-trait__wrp input,
.gjs-trt-trait__wrp select {
    width: 100%;
    padding: 8px 10px;
    border: 2px solid var(--border);
    border-radius: 4px;
    font-size: 13px;
}

/* Component Toolbar */
.gjs-toolbar {
    background: var(--dark) !important;
    border-radius: 4px !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4) !important;
    border: none !important;
}

.gjs-toolbar-item {
    color: white !important;
    padding: 8px 10px !important;
    transition: background 0.2s !important;
}

.gjs-toolbar-item:hover {
    background: var(--gace-red) !important;
}

/* Selection Indicator */
.gjs-selected {
    outline: 2px dashed var(--gace-red) !important;
    outline-offset: 2px !important;
}

.gjs-selected-parent {
    outline: 2px dashed rgba(139, 0, 0, 0.5) !important;
}

/* Panels Styling */
.gjs-pn-panel {
    background: white;
}

.gjs-pn-views-container {
    overflow-y: auto;
    max-height: calc(100vh - 400px);
}

.gjs-pn-buttons {
    display: flex;
    flex-direction: column;
}

.gjs-pn-btn {
    padding: 12px;
    border: none;
    background: transparent;
    cursor: pointer;
    color: var(--dark);
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    transition: all 0.2s;
    border-bottom: 1px solid var(--border);
}

.gjs-pn-btn:hover {
    background: var(--lighter);
    color: var(--gace-red);
}

.gjs-pn-btn.gjs-pn-active {
    background: var(--gace-red);
    color: white;
    border-left: 4px solid var(--gace-red-dark);
}

/* Device Manager Buttons */
.gjs-pn-devices-c {
    display: flex;
    gap: 8px;
    padding: 10px;
    background: var(--lighter);
    border-bottom: 1px solid var(--border);
}

.gjs-pn-devices-c .gjs-pn-btn {
    flex: 1;
    border: 2px solid var(--border);
    border-radius: 4px;
    background: white;
    padding: 10px;
}

.gjs-pn-devices-c .gjs-pn-btn:hover {
    border-color: var(--gace-red);
}

.gjs-pn-devices-c .gjs-pn-btn.gjs-pn-active {
    border-color: var(--gace-red);
    background: var(--gace-red);
    color: white;
}

/* Canvas Frame Wrapper */
.gjs-cv-canvas__frames {
    padding: 30px;
}

/* Asset Manager */
.gjs-am-assets-cont {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
}

.gjs-am-asset {
    border: 2px solid var(--border);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.gjs-am-asset:hover {
    border-color: var(--gace-red);
    transform: scale(1.05);
}

.gjs-am-asset.gjs-am-selected {
    border-color: var(--gace-red);
    box-shadow: 0 0 0 3px rgba(139, 0, 0, 0.2);
}

/* Modal Overrides */
.gjs-mdl-dialog {
    border-radius: 12px;
}

.gjs-mdl-title {
    background: var(--lighter);
    color: var(--dark);
    font-weight: 600;
}

.gjs-btn-prim {
    background: var(--gace-red) !important;
    color: white !important;
    border-radius: 6px !important;
    padding: 10px 20px !important;
    font-weight: 600 !important;
}

.gjs-btn-prim:hover {
    background: var(--gace-red-dark) !important;
}

/* Override default GrapesJS colors */
.gjs-one-bg {
    background-color: white !important;
}

.gjs-two-color {
    color: var(--dark) !important;
}

.gjs-three-bg {
    background-color: var(--lighter) !important;
}

.gjs-four-color,
.gjs-four-color-h:hover {
    color: var(--gace-red) !important;
}

/* Responsive adjustments for GrapesJS panels */
@media (max-width: 1024px) {
    .gjs-pn-panel {
        width: 250px !important;
    }
}

/* === Modal Styles === */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 900px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0,0,0,0.4);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-content.large {
    max-width: 1200px;
}

.modal-header {
    padding: 25px;
    border-bottom: 2px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, var(--lighter) 0%, white 100%);
    border-radius: 12px 12px 0 0;
}

    .modal-header h2 {
        font-size: 22px;
        color: var(--dark);
        display: flex;
        align-items: center;
        gap: 12px;
        margin: 0;
    }

        .modal-header h2 i {
            color: var(--gace-red);
        }

.close, .close-help {
    font-size: 32px;
    font-weight: 300;
    color: #aaa;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
}

    .close:hover, .close-help:hover {
        color: var(--danger);
    }

.modal-body {
    padding: 25px;
    overflow-y: auto;
    flex: 1;
}

.modal-footer {
    padding: 20px 25px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    background: var(--lighter);
    border-radius: 0 0 12px 12px;
}

/* === Search Bar === */
.search-bar {
    margin-bottom: 25px;
}

    .search-bar > i {
        position: absolute;
        left: 40px;
        top: 42px;
        color: #95a5a6;
        font-size: 16px;
    }

    .search-bar input[type="text"] {
        width: 100%;
        padding: 14px 14px 14px 45px;
        border: 2px solid var(--border);
        border-radius: 8px;
        font-size: 15px;
        transition: all 0.2s ease;
    }

        .search-bar input[type="text"]:focus {
            outline: none;
            border-color: var(--gace-red);
            box-shadow: 0 0 0 3px rgba(139, 0, 0, 0.1);
        }

.filter-options {
    display: flex;
    gap: 15px;
    margin-top: 15px;
    align-items: center;
}

    .filter-options select {
        padding: 8px 12px;
        border: 2px solid var(--border);
        border-radius: 6px;
        font-size: 14px;
        cursor: pointer;
        transition: all 0.2s ease;
    }

        .filter-options select:focus {
            outline: none;
            border-color: var(--gace-red);
        }

/* === Template List === */
.template-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    max-height: 500px;
    overflow-y: auto;
}

.template-card {
    border: 2px solid var(--border);
    border-radius: 10px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
    position: relative;
}

    .template-card:hover {
        border-color: var(--gace-red);
        transform: translateY(-4px);
        box-shadow: 0 8px 24px var(--shadow-lg);
    }

    .template-card.inactive {
        opacity: 0.6;
        background: #f9f9f9;
    }

        .template-card.inactive:hover {
            opacity: 0.8;
        }

    .template-card h3 {
        font-size: 17px;
        color: var(--dark);
        margin-bottom: 10px;
        display: flex;
        align-items: center;
        gap: 8px;
    }

        .template-card h3 i {
            color: var(--gace-red);
            font-size: 16px;
        }

    .template-card p {
        font-size: 13px;
        color: #7f8c8d;
        margin-bottom: 6px;
        line-height: 1.5;
    }

        .template-card p strong {
            color: var(--dark);
        }

.template-meta {
    font-size: 11px;
    color: #95a5a6;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

    .badge.active {
        background: #d4edda;
        color: #155724;
    }

    .badge.inactive {
        background: #f8d7da;
        color: #721c24;
    }

.category-badge {
    background: var(--gace-red);
    color: white;
    padding: 3px 10px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
}

/* === Help Modal === */
.shortcuts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
}

.shortcut-item {
    background: var(--lighter);
    padding: 15px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
}

kbd {
    background: var(--dark);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    box-shadow: 0 2px 4px var(--shadow);
}

.shortcut-item span {
    font-size: 14px;
    color: var(--dark);
}

/* === Toast Notifications === */
.toast-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: white;
    padding: 16px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 16px var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 300px;
    animation: slideInRight 0.3s ease;
    border-left: 4px solid var(--primary);
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.toast.success {
    border-left-color: var(--success);
}

.toast.error {
    border-left-color: var(--danger);
}

.toast.warning {
    border-left-color: var(--warning);
}

.toast i {
    font-size: 20px;
}

.toast.success i {
    color: var(--success);
}

.toast.error i {
    color: var(--danger);
}

.toast.warning i {
    color: var(--warning);
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: 600;
    font-size: 14px;
    color: var(--dark);
    margin-bottom: 2px;
}

.toast-message {
    font-size: 13px;
    color: #7f8c8d;
}

/* === Loading & Empty States === */
.loading, .empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #95a5a6;
}

    .loading i, .empty-state i {
        font-size: 48px;
        margin-bottom: 15px;
        color: #bdc3c7;
    }

    .empty-state h3 {
        font-size: 18px;
        margin-bottom: 8px;
        color: #7f8c8d;
    }

    .empty-state p {
        font-size: 14px;
    }

/* === Responsive Design === */
@media (max-width: 1024px) {
    .form-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }

    .template-list {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    }
}

@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        gap: 15px;
        padding: 15px;
    }

    .navbar-left, .navbar-right {
        width: 100%;
        justify-content: space-between;
    }

    .logo-section {
        gap: 10px;
    }

    .title-group h1 {
        font-size: 18px;
    }

    .btn {
        padding: 8px 14px;
        font-size: 13px;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .template-list {
        grid-template-columns: 1fr;
    }
}