@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body {
    min-height: 100%;
}

body {
    font-family: Poppins, Arial, sans-serif;
    background: #eef2f7;
    color: #1f2937;
}


/* =====================================================
   MAIN APP
===================================================== */

.app {
    display: flex;
    min-height: 100vh;
}


/* =====================================================
   SIDEBAR
===================================================== */

.sidebar {
    width: 370px;
    min-width: 370px;
    height: 100vh;
    overflow-y: auto;
    background: #ffffff;
    padding: 24px;
    box-shadow: 0 0 25px rgba(0, 0, 0, .08);
}


/* =====================================================
   BRAND
===================================================== */

.brand {
    margin-bottom: 28px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 14px;
}

.logo-icon {
    width: 58px;
    height: 58px;
    flex-shrink: 0;
    border-radius: 17px;
    background: linear-gradient(135deg, #4f46e5, #2563eb);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 22px;
    font-weight: 700;
}

.logo-text h1 {
    font-size: 20px;
    line-height: 1.25;
    color: #111827;
}

.logo-text p {
    margin-top: 4px;
    font-size: 12px;
    color: #6b7280;
}


/* =====================================================
   SECTION TITLES
===================================================== */

.section-title {
    margin: 24px 0 11px;
    font-size: 12px;
    font-weight: 700;
    color: #6b7280;
    letter-spacing: 1.2px;
}


/* =====================================================
   DESIGN TYPES
===================================================== */

.design-types {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.design {
    width: 100%;
    border: 0;
    background: #f3f4f6;
    color: #374151;
    padding: 11px 13px;
    border-radius: 10px;
    text-align: left;
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: .2s ease;
}

.design:hover {
    background: #e5e7eb;
}

.design.active {
    background: #4f46e5;
    color: #ffffff;
}


/* =====================================================
   FORM GROUPS
===================================================== */

.group {
    margin-bottom: 17px;
}

.group label {
    display: block;
    margin-bottom: 7px;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
}


/* =====================================================
   INPUTS
===================================================== */

.group textarea,
.group input[type="text"],
.group select {
    width: 100%;
    border: 1px solid #d1d5db;
    border-radius: 9px;
    background: #ffffff;
    color: #1f2937;
    padding: 10px 11px;
    font-family: inherit;
    font-size: 13px;
    outline: none;
    transition: border-color .2s, box-shadow .2s;
}

.group textarea {
    min-height: 130px;
    resize: vertical;
}

.group textarea:focus,
.group input[type="text"]:focus,
.group select:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, .12);
}


/* =====================================================
   COLOR INPUT
===================================================== */

.group input[type="color"] {
    width: 100%;
    height: 42px;
    padding: 3px;
    border: 1px solid #d1d5db;
    border-radius: 9px;
    background: #ffffff;
    cursor: pointer;
}


/* =====================================================
   RANGE INPUT
===================================================== */

.group input[type="range"] {
    width: 100%;
    margin: 5px 0;
    cursor: pointer;
}

.range-value {
    margin-top: 3px;
    text-align: right;
    font-size: 11px;
    color: #6b7280;
}


/* =====================================================
   BUTTONS
===================================================== */

button {
    font-family: inherit;
}

.primary-button,
.secondary-button {
    width: 100%;
    border: 0;
    border-radius: 9px;
    padding: 11px 12px;
    margin-top: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: .2s ease;
}

.primary-button {
    background: #4f46e5;
    color: #ffffff;
}

.primary-button:hover {
    background: #4338ca;
}

.secondary-button {
    background: #f3f4f6;
    color: #374151;
}

.secondary-button:hover {
    background: #e5e7eb;
}


/* =====================================================
   DOWNLOAD BUTTONS
===================================================== */

.download-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.download-buttons button {
    border: 0;
    border-radius: 9px;
    padding: 11px 8px;
    background: #16a34a;
    color: #ffffff;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: .2s ease;
}

.download-buttons button:hover {
    background: #15803d;
}


/* =====================================================
   PREVIEW AREA
===================================================== */

.preview-area {
    flex: 1;
    min-width: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: #eef2f7;
}


/* =====================================================
   PREVIEW HEADER
===================================================== */

.preview-header {
    padding: 24px 30px 10px;
}

.preview-header h2 {
    font-size: 23px;
    color: #111827;
}

.preview-header p {
    margin-top: 5px;
    font-size: 13px;
    color: #6b7280;
}


/* =====================================================
   CANVAS AREA
===================================================== */

.canvas-container {
    flex: 1;
    min-height: 0;
    padding: 20px 30px 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: auto;
}

.canvas-wrapper {
    background: #ffffff;
    padding: 18px;
    border-radius: 18px;
    box-shadow: 0 12px 35px rgba(0, 0, 0, .12);
    max-width: 95%;
    max-height: 85vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

#canvas {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 78vh;
    border: 1px solid #d1d5db;
    border-radius: 5px;
    background: #ffffff;
}


/* =====================================================
   SCROLLBAR
===================================================== */

.sidebar::-webkit-scrollbar {
    width: 7px;
}

.sidebar::-webkit-scrollbar-track {
    background: #f3f4f6;
}

.sidebar::-webkit-scrollbar-thumb {
    background: #c7c9d1;
    border-radius: 10px;
}


/* =====================================================
   TABLET
===================================================== */

@media (max-width: 1100px) {

    .sidebar {
        width: 330px;
        min-width: 330px;
    }

    .preview-header {
        padding-left: 20px;
        padding-right: 20px;
    }

    .canvas-container {
        padding-left: 20px;
        padding-right: 20px;
    }

}


/* =====================================================
   MOBILE
===================================================== */

@media (max-width: 850px) {

    .app {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        min-width: 0;
        height: auto;
        max-height: none;
        overflow: visible;
    }

    .preview-area {
        min-height: 600px;
    }

    .canvas-container {
        min-height: 500px;
    }

    .canvas-wrapper {
        max-width: 92%;
    }

    #canvas {
        max-height: 65vh;
    }

}


/* =====================================================
   SMALL MOBILE
===================================================== */

@media (max-width: 500px) {

    .sidebar {
        padding: 17px;
    }

    .logo-icon {
        width: 50px;
        height: 50px;
        border-radius: 14px;
        font-size: 19px;
    }

    .logo-text h1 {
        font-size: 17px;
    }

    .preview-header {
        padding: 18px 15px 5px;
    }

    .preview-header h2 {
        font-size: 19px;
    }

    .canvas-container {
        padding: 15px 10px 25px;
    }

    .canvas-wrapper {
        padding: 9px;
        border-radius: 12px;
    }

}


/* =====================================================
   PRINT
===================================================== */

@media print {

    .sidebar,
    .preview-header {
        display: none;
    }

    .preview-area {
        width: 100%;
        min-height: 100vh;
    }

    .canvas-container {
        padding: 0;
    }

    .canvas-wrapper {
        box-shadow: none;
        padding: 0;
        max-width: none;
        max-height: none;
    }

    #canvas {
        max-width: none;
        max-height: none;
    }

}