
/* =========================================================
   WELCOME ZONE - SVG TEXT STUDIO PRO
   FILE: assets/style.css
   ========================================================= */

:root {
    --navy: #101828;
    --navy-light: #1d2939;
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --purple: #7048e8;
    --background: #f3f5f9;
    --surface: #ffffff;
    --border: #e4e7ec;
    --text: #101828;
    --muted: #667085;
    --success: #039855;
    --danger: #d92d20;
    --radius: 13px;
    --shadow: 0 3px 12px rgba(16,24,40,.045);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--background);
    color: var(--text);
    font-family: Inter, "Segoe UI", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
}

button,
input,
select,
textarea {
    font: inherit;
}

button {
    cursor: pointer;
}

button:disabled,
input:disabled,
select:disabled,
textarea:disabled {
    opacity: .48;
    cursor: not-allowed;
}

/* HEADER */

.app-header {
    min-height: 76px;
    background: var(--navy);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 4%;
    gap: 20px;
    border-bottom: 1px solid rgba(255,255,255,.08);
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 15px;
}

.brand-logo {
    width: 44px;
    height: 44px;
    background: #fff;
    color: var(--navy);
    border-radius: 10px;
    display: grid;
    place-items: center;
    font-size: 20px;
    font-weight: 900;
    letter-spacing: -1px;
}

.brand-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.brand-info strong {
    font-size: 15px;
    letter-spacing: 1.5px;
}

.brand-info small {
    font-size: 11px;
    color: #98a2b3;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
    color: #d0d5dd;
    font-size: 12px;
}

.version-label {
    color: #c4b5fd;
    background: rgba(112,72,232,.19);
    border: 1px solid rgba(196,181,253,.2);
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1px;
}

/* MAIN */

.app-container {
    width: min(1600px, 94%);
    margin: 26px auto 50px;
}

/* TOOLBAR */

.top-toolbar {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 17px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin-bottom: 22px;
}

.toolbar-left,
.toolbar-right {
    display: flex;
    align-items: center;
    gap: 11px;
    flex-wrap: wrap;
}

.status-text {
    color: var(--muted);
    font-size: 12px;
}

/* BUTTONS */

.btn {
    min-height: 43px;
    padding: 0 17px;
    border: 0;
    border-radius: 9px;
    font-weight: 700;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: .18s ease;
    white-space: nowrap;
}

.btn:hover:not(:disabled) {
    transform: translateY(-1px);
}

.btn-primary {
    background: #344f78;
    color: #fff;
}

.btn-primary:hover:not(:disabled) {
    background: #263e64;
}

.btn-ai {
    background: var(--navy);
    color: #fff;
}

.btn-ai:hover:not(:disabled) {
    background: #263a5b;
}

.btn-secondary {
    background: #edf1f7;
    color: #344054;
    border: 1px solid #e4e7ec;
}

.btn-secondary:hover:not(:disabled) {
    background: #e1e7f0;
}

.btn-export {
    background: var(--success);
    color: white;
}

.btn-export:hover:not(:disabled) {
    background: #027a48;
}

.btn-small {
    min-height: 35px;
    padding: 0 12px;
    font-size: 12px;
}

.wide {
    width: 100%;
}

/* WORKSPACE GRID */

.workspace-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 22px;
}

/* PANELS */

.panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    min-width: 0;
    overflow: hidden;
}

.panel-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 17px 19px;
    gap: 12px;
    border-bottom: 1px solid #f0f1f3;
}

.panel-heading h2 {
    margin: 0;
    font-size: 16px;
    font-weight: 750;
    color: #172b4d;
}

.panel-heading p {
    margin: 4px 0 0;
    font-size: 11px;
    color: var(--muted);
}

.panel-tag {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1px;
    padding: 5px 9px;
    border-radius: 6px;
    color: #475467;
    background: #f2f4f7;
}

.editable-tag {
    color: #027a48;
    background: #ecfdf3;
}

/* PREVIEW TOOLBAR */

.preview-toolbar {
    min-height: 46px;
    padding: 7px 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #667085;
    font-size: 11px;
    border-bottom: 1px solid #f2f4f7;
}

.preview-actions {
    display: flex;
    gap: 6px;
}

.icon-btn {
    width: 32px;
    height: 32px;
    background: #f2f4f7;
    border: 1px solid #eaecf0;
    border-radius: 7px;
    color: #344054;
    font-size: 18px;
    display: inline-grid;
    place-items: center;
}

.icon-btn:hover:not(:disabled) {
    background: #e4eaf4;
}

/* SVG STAGE */

.svg-stage {
    position: relative;
    min-height: 380px;
    height: 440px;
    margin: 12px;
    border: 1px solid #e4e7ec;
    border-radius: 9px;
    overflow: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #fff;
    background-image:
        linear-gradient(45deg,#e9edf3 25%,transparent 25%),
        linear-gradient(-45deg,#e9edf3 25%,transparent 25%),
        linear-gradient(45deg,transparent 75%,#e9edf3 75%),
        linear-gradient(-45deg,transparent 75%,#e9edf3 75%);
    background-size: 20px 20px;
    background-position:
        0 0, 0 10px, 10px -10px, -10px 0;
}

.svg-stage > svg,
.svg-stage > img {
    display: block;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.svg-stage > svg {
    width: auto;
    height: auto;
    flex-shrink: 0;
}

.svg-stage > img {
    width: auto;
    height: auto;
}

.editor-stage {
    border-color: #c7d7fe;
    background-color: #f8faff;
}

/* EMPTY STATES */

.empty-state {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    text-align: center;
    padding: 35px 15px;
    color: var(--muted);
}

.empty-icon {
    width: 54px;
    height: 54px;
    border: 1px dashed #c7d7fe;
    background: #eff4ff;
    border-radius: 14px;
    color: var(--primary);
    display: grid;
    place-items: center;
    font-size: 28px;
    margin-bottom: 12px;
}

.empty-state strong {
    color: #344054;
    font-size: 14px;
}

.empty-state p {
    font-size: 12px;
    margin: 5px 0 0;
}

.empty-state.compact {
    padding: 24px 12px;
}

.panel-footer {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 0 18px 15px;
    color: #98a2b3;
    font-size: 10px;
}

/* EDITOR WORKSPACE */

.editor-workspace {
    display: grid;
    grid-template-columns: 1.05fr .95fr;
    gap: 20px;
    margin-bottom: 22px;
}

.layers-panel,
.properties-panel {
    min-width: 0;
}

/* TEXT LAYERS */

.layer-toolbar {
    padding: 12px 17px;
    background: #fafbfc;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    color: var(--muted);
}

.text-danger-btn {
    background: transparent;
    border: 0;
    color: var(--danger);
    font-size: 11px;
    font-weight: 700;
}

.text-danger-btn:disabled {
    opacity: .4;
    cursor: not-allowed;
}

.text-layers {
    min-height: 250px;
    max-height: 470px;
    overflow-y: auto;
    padding: 10px;
}

.layer-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 12px;
    border: 1px solid #eaecf0;
    border-radius: 8px;
    margin-bottom: 7px;
    background: white;
    cursor: pointer;
    transition: .15s ease;
}

.layer-item:hover {
    border-color: #b2ccff;
    background: #f8faff;
}

.layer-item.active {
    border-color: var(--primary);
    background: #eff4ff;
    box-shadow: 0 0 0 2px rgba(37,99,235,.08);
}

.layer-number {
    width: 25px;
    height: 25px;
    flex-shrink: 0;
    display: grid;
    place-items: center;
    background: #f2f4f7;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 800;
    color: #475467;
}

.layer-item.active .layer-number {
    background: var(--primary);
    color: white;
}

.layer-content {
    flex: 1;
    min-width: 0;
}

.layer-content strong {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12px;
    color: #344054;
}

.layer-content small {
    display: block;
    margin-top: 3px;
    color: #98a2b3;
    font-size: 10px;
}

.layer-eye {
    color: #667085;
    font-size: 13px;
}

/* PROPERTIES */

.properties-panel {
    padding-bottom: 18px;
}

.property-group {
    padding: 14px 18px 0;
}

.property-group > label,
.property-group > label:first-child {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: #344054;
    margin-bottom: 9px;
}

.property-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 12px;
}

.property-grid > div {
    min-width: 0;
}

.property-grid label {
    display: block;
    color: #667085;
    font-size: 10px;
    margin-bottom: 5px;
}

.property-group input:not([type="color"]),
.property-group select,
.property-group textarea {
    width: 100%;
    min-width: 0;
    min-height: 37px;
    border: 1px solid #d0d5dd;
    border-radius: 7px;
    background: white;
    color: #344054;
    padding: 8px 10px;
    outline: none;
    font-size: 12px;
}

.property-group textarea {
    resize: vertical;
    min-height: 75px;
    line-height: 1.5;
}

.property-group input:focus,
.property-group select:focus,
.property-group textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37,99,235,.09);
}

.property-group input[type="color"] {
    width: 100%;
    height: 37px;
    padding: 3px;
    border: 1px solid #d0d5dd;
    border-radius: 7px;
    background: white;
}

.format-buttons {
    display: flex;
    gap: 8px;
    margin: 10px 0 3px;
}

.format-btn {
    min-width: 40px;
    height: 35px;
    padding: 0 12px;
    background: #f2f4f7;
    color: #344054;
    border: 1px solid #e4e7ec;
    border-radius: 7px;
}

.format-btn.active {
    background: #eaf1ff;
    border-color: #84adff;
    color: var(--primary);
}

.property-actions {
    display: flex;
    flex-direction: column;
    gap: 9px;
    padding: 18px 18px 0;
}

/* OCR PANEL */

.ocr-panel {
    margin-bottom: 22px;
    padding-bottom: 15px;
}

.ocr-textarea {
    display: block;
    width: calc(100% - 36px);
    margin: 16px 18px 8px;
    min-height: 160px;
    resize: vertical;
    border: 1px solid #d0d5dd;
    border-radius: 8px;
    padding: 14px;
    background: #fcfcfd;
    color: #344054;
    font-family: Consolas, "Courier New", monospace;
    font-size: 13px;
    line-height: 1.9;
    outline: none;
}

.ocr-textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37,99,235,.08);
}

.ocr-footer {
    display: flex;
    justify-content: space-between;
    padding: 0 19px;
    color: #98a2b3;
    font-size: 10px;
}

/* HELP */

.help-section {
    display: flex;
    gap: 13px;
    padding: 17px 19px;
    background: #eff6ff;
    border: 1px solid #dbeafe;
    border-radius: var(--radius);
    color: #344054;
}

.help-icon {
    width: 29px;
    height: 29px;
    flex-shrink: 0;
    display: grid;
    place-items: center;
    background: white;
    border-radius: 50%;
    color: var(--primary);
    font-weight: 800;
}

.help-section strong {
    font-size: 12px;
}

.help-section p {
    font-size: 11px;
    line-height: 1.7;
    margin: 5px 0 0;
    color: #667085;
}

/* FOOTER */

.app-footer {
    min-height: 65px;
    background: var(--navy);
    color: #d0d5dd;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 13px;
    flex-wrap: wrap;
    font-size: 11px;
}

.app-footer strong {
    letter-spacing: 1.5px;
    color: white;
}

.app-footer span {
    color: #98a2b3;
}

/* SCROLLBAR */

.text-layers::-webkit-scrollbar,
.svg-stage::-webkit-scrollbar {
    width: 7px;
    height: 7px;
}

.text-layers::-webkit-scrollbar-thumb,
.svg-stage::-webkit-scrollbar-thumb {
    background: #d0d5dd;
    border-radius: 10px;
}

/* RESPONSIVE TABLET */

@media (max-width: 1000px) {

    .workspace-grid {
        grid-template-columns: 1fr;
    }

    .editor-workspace {
        grid-template-columns: 1fr;
    }

    .svg-stage {
        height: 390px;
    }
}

/* RESPONSIVE MOBILE */

@media (max-width: 600px) {

    .app-header {
        padding: 12px 4%;
        min-height: 65px;
    }

    .header-right {
        display: none;
    }

    .app-container {
        width: 94%;
        margin-top: 15px;
    }

    .top-toolbar {
        align-items: flex-start;
        flex-direction: column;
        padding: 13px;
    }

    .toolbar-left {
        width: 100%;
    }

    .toolbar-left .btn,
    .filepick {
        flex: 1;
    }

    .toolbar-right {
        width: 100%;
    }

    .status-text {
        font-size: 11px;
    }

    .panel-heading {
        padding: 13px;
    }

    .svg-stage {
        height: 300px;
        min-height: 230px;
        margin: 9px;
    }

    .property-group {
        padding-left: 13px;
        padding-right: 13px;
    }

    .property-actions {
        padding-left: 13px;
        padding-right: 13px;
    }

    .ocr-textarea {
        width: calc(100% - 26px);
        margin-left: 13px;
        margin-right: 13px;
    }

    .panel-footer {
        padding-left: 13px;
        padding-right: 13px;
    }

    .help-section {
        padding: 13px;
    }
}

@media (max-width: 380px) {

    .btn {
        padding: 0 10px;
        font-size: 11px;
    }

    .property-grid {
        gap: 8px;
    }

    .svg-stage {
        height: 240px;
    }
}
