.gasg-wrap {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    max-width: 960px;
    margin: 0 auto;
    padding: 20px;
}

.gasg-header {
    background: linear-gradient(135deg, #1a73e8, #0d47a1);
    color: white;
    padding: 28px 32px;
    border-radius: 12px;
    margin-bottom: 28px;
}
.gasg-header h1 { margin: 0 0 8px; font-size: 24px; color: white; }
.gasg-header p  { margin: 0; opacity: 0.85; font-size: 15px; }

.gasg-container { display: flex; flex-direction: column; gap: 24px; }

.gasg-form-box,
.gasg-output-box {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 28px 32px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.gasg-form-box h2,
.gasg-output-box h2 {
    margin: 0 0 24px;
    font-size: 18px;
    color: #1a1a1a;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 12px;
}

/* FIELD */
.gasg-field { margin-bottom: 18px; }
.gasg-field label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: #444;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}
.gasg-field label span { color: #e53935; }
.gasg-field input[type="text"],
.gasg-field input[type="number"],
.gasg-field input[type="date"],
.gasg-field input[type="url"] {
    width: 100%;
    padding: 9px 12px;
    border: 1.5px solid #d0d0d0;
    border-radius: 8px;
    font-size: 14px;
    color: #222;
    transition: border-color 0.2s;
    box-sizing: border-box;
}
.gasg-field input:focus {
    outline: none;
    border-color: #1a73e8;
    box-shadow: 0 0 0 3px rgba(26,115,232,0.12);
}
.gasg-field small {
    display: block;
    margin-top: 5px;
    color: #1a73e8;
    font-weight: 600;
    font-size: 13px;
}
.gasg-url-hint { color: #888 !important; font-weight: 400 !important; font-size: 12px !important; }

/* 2 CỘT */
.gasg-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* 3 CỘT: tên cam | màu nền | màu chữ */
.gasg-row-3 {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 16px;
    margin-bottom: 18px;
}

/* COLOR FIELD */
.gasg-field-color label { white-space: nowrap; }
.gasg-color-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 2px;
}
input[type="color"] {
    width: 36px;
    height: 36px;
    border: 1.5px solid #d0d0d0;
    border-radius: 6px;
    cursor: pointer;
    padding: 2px;
    background: white;
    flex-shrink: 0;
}
.gasg-color-preview {
    padding: 5px 10px;
    border-radius: 6px;
    border: 1.5px solid #e0e0e0;
    font-size: 12px;
    font-weight: 600;
    background: #ffffff;
    color: #000000;
    transition: background 0.2s, color 0.2s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 120px;
}

/* SHEET URL ROW */
.gasg-sheet-row {
    display: flex;
    gap: 8px;
    align-items: stretch;
}
.gasg-sheet-row input[type="url"] { flex: 1; }

/* DROPDOWN */
.gasg-sheet-dropdown-wrap { position: relative; flex-shrink: 0; }
.gasg-dropdown-btn {
    height: 100%;
    padding: 9px 12px;
    background: #f1f3f4;
    border: 1.5px solid #d0d0d0;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #333;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s;
}
.gasg-dropdown-btn:hover { background: #e2e6ea; }

.gasg-dropdown-list {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 4px);
    background: #fff;
    border: 1.5px solid #d0d0d0;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    z-index: 999;
    min-width: 360px;
    max-height: 240px;
    overflow-y: auto;
}
.gasg-dropdown-list.open { display: block; }

.gasg-dropdown-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 12px;
    border-bottom: 1px solid #f0f0f0;
    gap: 8px;
}
.gasg-dropdown-item:last-child { border-bottom: none; }
.gasg-dropdown-item span {
    font-size: 13px;
    color: #1a73e8;
    cursor: pointer;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.gasg-dropdown-item span:hover { text-decoration: underline; }
.gasg-del-btn {
    background: none;
    border: none;
    color: #aaa;
    cursor: pointer;
    font-size: 13px;
    padding: 2px 4px;
    border-radius: 4px;
    flex-shrink: 0;
}
.gasg-del-btn:hover { color: #e53935; background: #ffeee e; }
.gasg-dropdown-empty {
    padding: 12px;
    font-size: 13px;
    color: #888;
    text-align: center;
}

/* INFO BOX */
.gasg-info-box {
    background: #f0f7ff;
    border: 1px solid #bbdefb;
    border-radius: 8px;
    padding: 14px 20px;
    margin-bottom: 20px;
}
.gasg-info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.gasg-info-item { display: flex; flex-direction: column; gap: 3px; }
.gasg-info-item .label { font-size: 11px; color: #666; text-transform: uppercase; font-weight: 700; }
.gasg-info-item .value { font-size: 16px; font-weight: 700; color: #1a73e8; }

/* BUTTON */
.gasg-btn {
    width: 100%;
    padding: 13px;
    background: linear-gradient(135deg, #1a73e8, #0d47a1);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.1s;
}
.gasg-btn:hover  { opacity: 0.9; transform: translateY(-1px); }
.gasg-btn:active { transform: translateY(0); }

/* OUTPUT */
.gasg-output-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 12px;
}
.gasg-output-header h2 { margin: 0; border: none; padding: 0; }
.gasg-copy-btn {
    padding: 8px 18px;
    background: #34a853;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}
.gasg-copy-btn:hover { opacity: 0.85; }

#gasg_code {
    background: #1e1e2e;
    color: #cdd6f4;
    padding: 20px;
    border-radius: 8px;
    font-size: 12.5px;
    line-height: 1.7;
    overflow-x: auto;
    white-space: pre;
    max-height: 480px;
    overflow-y: auto;
}

.gasg-steps {
    margin-top: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 16px 20px;
}
.gasg-steps h3 { margin: 0 0 10px; font-size: 14px; color: #333; }
.gasg-steps ol { margin: 0; padding-left: 20px; }
.gasg-steps ol li { font-size: 13px; color: #444; margin-bottom: 5px; line-height: 1.5; }

@media (max-width: 640px) {
    .gasg-row-3 { grid-template-columns: 1fr; }
    .gasg-row   { grid-template-columns: 1fr; }
    .gasg-info-grid { grid-template-columns: 1fr; }
    .gasg-form-box, .gasg-output-box { padding: 20px 16px; }
    .gasg-dropdown-list { min-width: 260px; }
}