/* ============================================
   DESTOLOLABS - OFFLINE BARCODE GENERATOR
   Professional Design System with Fixed Alignment
============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: #F7F6F3;
    color: #222222;
    line-height: 1.5;
    scroll-behavior: smooth;
    overflow-x: hidden;
    width: 100%;
}

h1, h2, h3, .logo, .footer-logo {
    font-family: 'Playfair Display', serif;
    font-weight: 500;
    letter-spacing: -0.01em;
}

/* ===== HEADER ===== */
.header {
    background: #FFFFFF;
    border-bottom: 1px solid #E7E4DF;
    padding: 16px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
}

.header-container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding-left: max(20px, 5%);
    padding-right: max(20px, 5%);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.logo {
    font-size: 1.6rem;
    font-weight: 600;
    color: #071F32;
    text-decoration: none;
    flex-shrink: 0;
    font-family: 'Playfair Display', serif;
}

.logo span {
    color: #D6B18A;
}

.nav {
    display: flex;
    align-items: center;
    gap: 32px;
    list-style: none;
}

.nav a {
    text-decoration: none;
    color: #222222;
    font-weight: 500;
    transition: color 0.2s;
    font-size: 0.95rem;
}

.nav a:hover,
.nav a.active {
    color: #D6B18A;
}

.auth {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-shrink: 0;
}

.btn-auth {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: 40px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    cursor: pointer;
    text-decoration: none;
    font-family: 'Inter', sans-serif;
}

.btn-signin {
    background: white;
    border: 1px solid #071F32;
    color: #071F32;
}

.btn-signin:hover {
    background: #F7F6F3;
    border-color: #D6B18A;
    color: #041826;
}

.btn-signup {
    background: #071F32;
    color: white;
    border: none;
}

.btn-signup:hover {
    background: #041826;
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(7, 31, 50, 0.12);
}

.hamburger {
    display: none;
    font-size: 1.5rem;
    background: none;
    border: none;
    cursor: pointer;
    color: #071F32;
    padding: 8px;
}

/* ===== MAIN CONTAINER ===== */
.main-container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 40px max(20px, 5%);
    overflow-x: hidden;
}

/* ===== 3-COLUMN LAYOUT ===== */
.layout-grid {
    display: grid;
    grid-template-columns: 280px 1fr 300px;
    gap: 32px;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

/* ===== SIDEBARS ===== */
.sidebar-card {
    background: #FFFFFF;
    border: 1px solid #E7E4DF;
    border-radius: 20px;
    padding: 24px;
    margin-bottom: 24px;
    width: 100%;
    overflow: hidden;
}

.sidebar-card h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 16px;
    color: #071F32;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sidebar-card h3 i {
    color: #D6B18A;
}

.category-group {
    margin-bottom: 20px;
}

.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    font-weight: 600;
    color: #071F32;
    cursor: pointer;
    font-size: 0.95rem;
}

.category-header span i {
    margin-right: 10px;
    color: #D6B18A;
    width: 20px;
}

.chevron {
    transition: transform 0.2s;
    color: #A8A49C;
    font-size: 0.8rem;
}

.chevron.rotated {
    transform: rotate(180deg);
}

.category-content {
    display: none;
    padding-left: 30px;
}

.category-content.open {
    display: block;
}

.category-content a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    text-decoration: none;
    color: #6A6A6A;
    font-size: 0.85rem;
    transition: color 0.2s;
}

.category-content a i {
    width: 20px;
    font-size: 0.85rem;
}

.category-content a:hover,
.category-content a.active {
    color: #D6B18A;
}

.info-box {
    text-align: center;
    padding: 16px;
    background: #F7F6F3;
    border-radius: 16px;
    width: 100%;
}

.info-box i {
    font-size: 2.5rem;
    color: #D6B18A;
    margin-bottom: 12px;
    display: block;
}

.info-box strong {
    display: block;
    margin-bottom: 8px;
    font-size: 0.85rem;
    color: #071F32;
}

.info-box p {
    font-size: 0.75rem;
    color: #6A6A6A;
    line-height: 1.4;
}

/* ===== TOOL AREA ===== */
.tool-area {
    width: 100%;
    min-width: 0;
}

.tool-card {
    background: #FFFFFF;
    border-radius: 20px;
    border: 1px solid #E7E4DF;
    overflow: hidden;
    width: 100%;
    min-width: 0;
}

.tool-header {
    padding: 32px 32px 24px;
    border-bottom: 1px solid #E7E4DF;
}

.tool-badge-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.tool-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #F7F6F3;
    padding: 6px 14px;
    border-radius: 30px;
    font-size: 0.7rem;
    font-weight: 600;
    color: #D6B18A;
    letter-spacing: 0.5px;
}

.tool-badge-free {
    background: #E8F5E9;
    color: #2E7D32;
}

.tool-badge-free i {
    color: #2E7D32;
}

.tool-header h1 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.6rem, 5vw, 2.2rem);
    font-weight: 500;
    letter-spacing: -0.01em;
    margin-bottom: 12px;
    color: #071F32;
}

.tool-description {
    color: #6A6A6A;
    font-size: 0.9rem;
    line-height: 1.6;
}

.tool-stats {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #E7E4DF;
}

.tool-stats span {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    color: #6A6A6A;
    font-weight: 500;
}

.tool-stats span i {
    color: #D6B18A;
}

/* ===== INPUT CARD ===== */
.input-card {
    padding: 32px;
}

/* ===== LIVE PREVIEW ===== */
.preview-container {
    margin-bottom: 24px;
    border: 1px solid #E7E4DF;
    border-radius: 16px;
    overflow: hidden;
    background: #FFFFFF;
}

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    background: #F7F6F3;
    border-bottom: 1px solid #E7E4DF;
}

.preview-header span {
    font-weight: 600;
    font-size: 0.85rem;
    color: #071F32;
}

.preview-header span i {
    color: #D6B18A;
    margin-right: 8px;
}

.preview-status {
    font-size: 0.75rem;
    color: #2E7D32;
    font-weight: 500;
}

.preview-canvas-wrapper {
    padding: 20px;
    background: #F7F6F3;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 180px;
}

.preview-canvas {
    max-width: 100%;
    max-height: 300px;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    background: white;
}

.preview-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    background: #FFFFFF;
    border-top: 1px solid #E7E4DF;
    font-size: 0.75rem;
    color: #6A6A6A;
    flex-wrap: wrap;
    gap: 8px;
}

.preview-hint {
    color: #A8A49C;
}

.preview-hint i {
    color: #D6B18A;
    margin-right: 4px;
}

/* ===== BARCODE TYPE SECTION ===== */
.barcode-type-section {
    margin-bottom: 24px;
}

.barcode-type-header {
    margin-bottom: 12px;
}

.barcode-type-header label {
    font-weight: 600;
    font-size: 0.85rem;
    color: #071F32;
}

.barcode-type-header label i {
    color: #D6B18A;
    margin-right: 8px;
}

.barcode-type-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.barcode-type-btn {
    padding: 12px 8px;
    border: 2px solid #E7E4DF;
    background: white;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.25s ease;
    font-family: 'Inter', sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    text-align: center;
}

.barcode-type-btn i {
    font-size: 1.2rem;
    color: #A8A49C;
    transition: color 0.25s;
}

.barcode-type-btn span {
    font-weight: 600;
    font-size: 0.8rem;
    color: #6A6A6A;
    transition: color 0.25s;
}

.barcode-type-btn small {
    font-size: 0.6rem;
    color: #A8A49C;
    transition: color 0.25s;
}

.barcode-type-btn.active {
    border-color: #071F32;
    background: #F7F6F3;
}

.barcode-type-btn.active i {
    color: #D6B18A;
}

.barcode-type-btn.active span {
    color: #071F32;
}

.barcode-type-btn.active small {
    color: #6A6A6A;
}

.barcode-type-btn:hover:not(.active) {
    border-color: #D6B18A;
    background: #FAFAFA;
}

/* ===== INPUT FIELDS ===== */
.input-fields-section {
    margin-bottom: 24px;
}

.input-fields-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: 16px;
    width: 100%;
}

.input-fields-grid .full-width {
    grid-column: 1 / -1;
}

.option-group {
    display: flex;
    flex-direction: column;
}

.option-group label {
    font-weight: 600;
    font-size: 0.8rem;
    margin-bottom: 6px;
    color: #6A6A6A;
    letter-spacing: 0.3px;
}

.option-group label i {
    color: #D6B18A;
    margin-right: 6px;
}

.form-input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #E7E4DF;
    border-radius: 12px;
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    color: #222222;
    transition: border-color 0.2s;
    background: white;
}

.form-input:focus {
    outline: none;
    border-color: #D6B18A;
    box-shadow: 0 0 0 3px rgba(214, 177, 138, 0.1);
}

.form-select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #E7E4DF;
    border-radius: 12px;
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    color: #222222;
    transition: border-color 0.2s;
    background: white;
    appearance: none;
    -webkit-appearance: none;
}

.form-select:focus {
    outline: none;
    border-color: #D6B18A;
    box-shadow: 0 0 0 3px rgba(214, 177, 138, 0.1);
}

.input-hint {
    font-size: 0.7rem;
    color: #A8A49C;
    margin-top: 4px;
}

/* ===== OUTPUT FORMAT SECTION ===== */
.output-format-section {
    margin-bottom: 24px;
}

.output-format-header {
    margin-bottom: 12px;
}

.output-format-header label {
    font-weight: 600;
    font-size: 0.85rem;
    color: #071F32;
}

.output-format-header label i {
    color: #D6B18A;
    margin-right: 8px;
}

.output-format-grid {
    display: flex;
    gap: 12px;
}

.format-btn {
    padding: 10px 20px;
    border: 2px solid #E7E4DF;
    background: white;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.25s ease;
    font-family: 'Inter', sans-serif;
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    justify-content: center;
}

.format-btn i {
    font-size: 1.2rem;
    color: #A8A49C;
    transition: color 0.25s;
}

.format-btn span {
    font-weight: 600;
    font-size: 0.85rem;
    color: #6A6A6A;
    transition: color 0.25s;
}

.format-btn small {
    font-size: 0.6rem;
    color: #A8A49C;
    transition: color 0.25s;
}

.format-btn.active {
    border-color: #071F32;
    background: #F7F6F3;
}

.format-btn.active i {
    color: #D6B18A;
}

.format-btn.active span {
    color: #071F32;
}

.format-btn.active small {
    color: #6A6A6A;
}

.format-btn:hover:not(.active) {
    border-color: #D6B18A;
    background: #FAFAFA;
}

/* ===== ACTION BUTTONS ===== */
.action-buttons {
    display: flex;
    gap: 16px;
    margin-top: 8px;
}

.action-btn-primary {
    flex: 1;
    padding: 16px 32px;
    background: #071F32;
    color: white;
    border: none;
    border-radius: 40px;
    font-weight: 600;
    font-size: 0.95rem;
    font-family: 'Inter', sans-serif;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.25s ease;
    cursor: pointer;
}

.action-btn-primary:hover {
    background: #041826;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(7, 31, 50, 0.15);
}

.action-btn-secondary {
    padding: 16px 32px;
    background: white;
    border: 2px solid #E7E4DF;
    color: #6A6A6A;
    border-radius: 40px;
    font-weight: 600;
    font-size: 0.95rem;
    font-family: 'Inter', sans-serif;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.25s ease;
    cursor: pointer;
}

.action-btn-secondary:hover {
    border-color: #D6B18A;
    color: #D6B18A;
    background: #FAFAFA;
}

/* ===== OUTPUT AREA ===== */
.output-area {
    margin-top: 24px;
    background: #F7F6F3;
    border-radius: 16px;
    border: 2px solid #E7E4DF;
    overflow: hidden;
    transition: all 0.3s ease;
}

.output-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    background: white;
    border-bottom: 1px solid #E7E4DF;
}

.output-title-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.output-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #E8F5E9;
    color: #2E7D32;
    padding: 4px 12px;
    border-radius: 30px;
    font-size: 0.7rem;
    font-weight: 600;
}

.output-badge i {
    color: #2E7D32;
}

.output-title {
    font-weight: 600;
    font-size: 0.9rem;
    color: #071F32;
}

.output-actions {
    display: flex;
    gap: 10px;
}

.action-btn-download {
    background: #071F32;
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 40px;
    font-weight: 600;
    font-size: 0.85rem;
    font-family: 'Inter', sans-serif;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.25s ease;
    cursor: pointer;
}

.action-btn-download:hover {
    background: #041826;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(7, 31, 50, 0.15);
}

.output-preview {
    padding: 32px 24px;
    text-align: center;
    background: white;
}

.barcode-display {
    display: inline-block;
    padding: 20px;
    background: white;
    border-radius: 12px;
    border: 2px dashed #E7E4DF;
    max-width: 100%;
    overflow: hidden;
}

.barcode-display canvas {
    max-width: 100%;
    height: auto;
}

.output-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    padding: 20px 24px;
    background: #F7F6F3;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    background: white;
    border-radius: 12px;
    border: 1px solid #E7E4DF;
    transition: all 0.2s;
}

.stat-card:hover {
    border-color: #D6B18A;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.stat-card-success .stat-value {
    color: #2E7D32;
}

.stat-card-highlight {
    background: #071F32;
    border-color: #071F32;
}

.stat-card-highlight .stat-label {
    color: rgba(255, 255, 255, 0.7);
}

.stat-card-highlight .stat-value {
    color: white;
}

.stat-card-highlight .stat-icon i {
    color: rgba(255, 255, 255, 0.6);
}

.stat-icon i {
    font-size: 1.2rem;
    color: #D6B18A;
}

.stat-content {
    display: flex;
    flex-direction: column;
}

.stat-label {
    font-size: 0.65rem;
    color: #A8A49C;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    font-weight: 700;
    font-size: 0.95rem;
    color: #071F32;
}

/* ===== RIGHT SIDEBAR ===== */
.steps-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
}

.step {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
}

.step-number {
    width: 28px;
    height: 28px;
    background: #F7F6F3;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.75rem;
    color: #D6B18A;
    flex-shrink: 0;
}

.step-text {
    font-size: 0.8rem;
    color: #6A6A6A;
    word-wrap: break-word;
}

.related-list,
.tips-list {
    list-style: none;
    width: 100%;
}

.related-list li,
.tips-list li {
    margin-bottom: 12px;
    word-wrap: break-word;
}

.related-list a {
    text-decoration: none;
    color: #6A6A6A;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: color 0.2s;
    word-wrap: break-word;
}

.related-list a i {
    color: #D6B18A;
    font-size: 0.7rem;
    flex-shrink: 0;
}

.related-list a:hover {
    color: #D6B18A;
}

.tips-list li {
    font-size: 0.8rem;
    color: #6A6A6A;
    display: flex;
    align-items: center;
    gap: 10px;
    word-wrap: break-word;
}

.tips-list li i {
    color: #D6B18A;
    width: 18px;
    flex-shrink: 0;
}

/* ===== MOBILE PRO TIPS ===== */
.mobile-pro-tips {
    display: none;
    margin-top: 24px;
    padding: 20px;
    background: #FFFFFF;
    border: 1px solid #E7E4DF;
    border-radius: 16px;
}

.mobile-pro-tips h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 12px;
    color: #071F32;
    display: flex;
    align-items: center;
    gap: 8px;
}

.mobile-pro-tips h3 i {
    color: #D6B18A;
}

.tips-grid-mobile {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.tip-item-mobile {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.8rem;
    color: #6A6A6A;
    padding: 8px 12px;
    background: #F7F6F3;
    border-radius: 12px;
    word-wrap: break-word;
}

.tip-item-mobile i {
    color: #D6B18A;
    width: 20px;
    flex-shrink: 0;
}

/* ===== FAQ SECTION ===== */
.faq-section {
    margin-top: 64px;
    background: transparent;
}

.faq-header {
    text-align: center;
    margin-bottom: 48px;
}

.faq-header h2 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.6rem, 5vw, 2.2rem);
    font-weight: 500;
    margin-bottom: 12px;
    color: #071F32;
}

.faq-header p {
    color: #6A6A6A;
    font-size: 0.9rem;
}

.faq-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.faq-card {
    background: white;
    border: 1px solid #E7E4DF;
    border-radius: 20px;
    overflow: hidden;
}

.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 24px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: background 0.2s;
    color: #071F32;
}

.faq-question:hover {
    background: #F7F6F3;
}

.faq-question span i {
    color: #D6B18A;
    margin-right: 12px;
}

.faq-chevron {
    transition: transform 0.25s;
    color: #D6B18A;
}

.faq-chevron.rotated {
    transform: rotate(180deg);
}

.faq-answer {
    padding: 0 24px;
    color: #6A6A6A;
    font-size: 0.85rem;
    line-height: 1.6;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease, padding 0.3s ease;
}

.faq-answer.open {
    max-height: 300px;
    padding: 0 24px 20px;
}

/* ===== MOBILE MENU ===== */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 85%;
    max-width: 350px;
    height: 100%;
    background: #FFFFFF;
    box-shadow: -8px 0 40px rgba(0, 0, 0, 0.08);
    z-index: 2000;
    transition: right 0.35s cubic-bezier(0.2, 0.9, 0.4, 1.1);
    display: flex;
    flex-direction: column;
    border-left: 1px solid #E7E4DF;
}

.mobile-menu.open {
    right: 0;
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 24px 16px 24px;
}

.mobile-logo {
    font-family: 'Playfair Display', serif;
    font-size: 1.6rem;
    font-weight: 600;
    color: #071F32;
}

.mobile-logo span {
    color: #D6B18A;
}

.close-menu {
    background: none;
    border: none;
    font-size: 1.4rem;
    cursor: pointer;
    color: #6A6A6A;
    padding: 8px;
}

.mobile-menu-divider {
    height: 1px;
    background: #E7E4DF;
    margin: 0 24px;
}

.mobile-nav-list {
    list-style: none;
    padding: 20px 24px;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mobile-nav-list > li > a {
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    color: #222222;
    transition: color 0.2s;
    display: block;
    padding: 8px 0;
}

.mobile-nav-list > li > a:hover {
    color: #D6B18A;
}

.mobile-category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    font-weight: 600;
    color: #071F32;
    cursor: pointer;
    font-size: 0.95rem;
}

.mobile-category-header i:first-child {
    margin-right: 12px;
    color: #D6B18A;
    width: 24px;
}

.mobile-chevron {
    transition: transform 0.2s;
    color: #A8A49C;
    font-size: 0.8rem;
}

.mobile-chevron.rotated {
    transform: rotate(180deg);
}

.mobile-category-content {
    display: none;
    padding-left: 36px;
    margin-bottom: 8px;
}

.mobile-category-content.open {
    display: block;
}

.mobile-category-content a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    text-decoration: none;
    color: #6A6A6A;
    font-size: 0.85rem;
    transition: color 0.2s;
}

.mobile-category-content a i {
    width: 20px;
    font-size: 0.8rem;
    color: #A8A49C;
}

.mobile-category-content a:hover,
.mobile-category-content a.active {
    color: #D6B18A;
}

.mobile-category-content a:hover i {
    color: #D6B18A;
}

.mobile-menu-actions {
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mobile-signin,
.mobile-getstarted {
    display: block;
    text-align: center;
    padding: 12px 20px;
    border-radius: 40px;
    text-decoration: none;
    font-weight: 600;
}

.mobile-signin {
    color: #071F32;
    border: 1px solid #071F32;
}

.mobile-getstarted {
    background: #071F32;
    color: white;
}

.mobile-menu-footer {
    padding: 20px 24px;
    text-align: center;
    margin-top: auto;
}

.mobile-menu-footer p {
    font-size: 0.75rem;
    color: #6A6A6A;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    opacity: 0;
    visibility: hidden;
    transition: 0.25s ease;
    z-index: 1500;
}

.overlay.open {
    opacity: 1;
    visibility: visible;
}

/* ===== FOOTER ===== */
.footer {
    background: #1A1A1A;
    color: #A8A49C;
    padding: 48px 32px 32px;
    margin-top: 64px;
}

.footer-content {
    max-width: 1280px;
    margin: 0 auto;
    text-align: center;
}

.footer-brand .logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: white;
    margin-bottom: 12px;
    display: inline-block;
    font-family: 'Playfair Display', serif;
}

.footer-brand .logo span {
    color: #C7A85B;
}

.footer-brand p {
    font-size: 0.85rem;
    color: #A8A49C;
    margin-bottom: 24px;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 32px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.footer-links a {
    color: #A8A49C;
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: #C7A85B;
}

.footer-copyright {
    font-size: 0.75rem;
    color: #A8A49C;
}

/* ============================================
   FIXED: RESPONSIVE ALIGNMENT FIXES
   Prevents sidebar from getting cut off
============================================ */

/* Fix for right sidebar on all screen sizes */
@media (max-width: 1024px) {
    .layout-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .sidebar-left,
    .sidebar-right {
        display: none !important;
    }
    
    .tool-area {
        width: 100%;
        max-width: 100%;
    }
    
    .main-container {
        padding: 32px max(16px, 3%);
        overflow-x: hidden;
    }
    
    .input-card {
        padding: 20px 16px;
    }
    
    .barcode-type-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .input-fields-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }
    
    .output-stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .faq-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .mobile-pro-tips {
        display: block;
    }
}

@media (max-width: 768px) {
    .main-container {
        padding: 20px 12px;
        overflow-x: hidden;
    }
    
    .layout-grid {
        gap: 16px;
    }
    
    .tool-card {
        border-radius: 16px;
    }
    
    .tool-header {
        padding: 20px 16px;
    }
    
    .tool-header h1 {
        font-size: 1.4rem;
    }
    
    .input-card {
        padding: 16px;
    }
    
    .barcode-type-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
    
    .barcode-type-btn {
        padding: 8px 6px;
        font-size: 0.75rem;
    }
    
    .barcode-type-btn small {
        display: none;
    }
    
    .barcode-type-btn i {
        font-size: 1rem;
    }
    
    .barcode-type-btn span {
        font-size: 0.7rem;
    }
    
    .input-fields-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .input-fields-grid .full-width {
        grid-column: 1;
    }
    
    .output-format-grid {
        flex-direction: column;
        gap: 8px;
    }
    
    .format-btn {
        padding: 10px 16px;
        justify-content: center;
    }
    
    .format-btn small {
        display: none;
    }
    
    .action-buttons {
        flex-direction: column;
        gap: 12px;
    }
    
    .action-btn-primary,
    .action-btn-secondary {
        justify-content: center;
        padding: 14px 20px;
        width: 100%;
    }
    
    .output-area {
        border-radius: 12px;
    }
    
    .output-header {
        flex-direction: column;
        gap: 10px;
        padding: 16px;
        text-align: center;
    }
    
    .output-title-group {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .output-actions {
        justify-content: center;
        width: 100%;
    }
    
    .action-btn-download {
        width: 100%;
        justify-content: center;
    }
    
    .output-stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        padding: 16px;
    }
    
    .stat-card {
        padding: 10px 12px;
    }
    
    .stat-icon i {
        font-size: 1rem;
    }
    
    .stat-value {
        font-size: 0.85rem;
    }
    
    .stat-label {
        font-size: 0.6rem;
    }
    
    .output-preview {
        padding: 16px;
    }
    
    .barcode-display {
        padding: 12px;
    }
    
    .preview-container {
        border-radius: 12px;
    }
    
    .preview-header {
        padding: 10px 16px;
    }
    
    .preview-canvas-wrapper {
        min-height: 120px;
        padding: 12px;
    }
    
    .preview-canvas {
        max-height: 180px;
    }
    
    .preview-footer {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 8px 16px;
        gap: 4px;
    }
    
    .tool-stats {
        flex-direction: column;
        gap: 6px;
        padding-top: 12px;
        margin-top: 12px;
    }
    
    .tool-stats span {
        font-size: 0.75rem;
    }
    
    .sidebar-card {
        padding: 16px;
        margin-bottom: 12px;
    }
    
    .faq-section {
        margin-top: 32px;
    }
    
    .faq-header {
        margin-bottom: 24px;
    }
    
    .faq-header h2 {
        font-size: 1.4rem;
    }
    
    .faq-grid {
        gap: 12px;
    }
    
    .faq-question {
        padding: 14px 16px;
        font-size: 0.85rem;
    }
    
    .faq-answer {
        font-size: 0.8rem;
        padding: 0 16px;
    }
    
    .faq-answer.open {
        padding: 0 16px 16px;
    }
    
    .mobile-pro-tips {
        padding: 16px;
        margin-top: 16px;
    }
    
    .tips-grid-mobile {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
    
    .tip-item-mobile {
        padding: 6px 10px;
        font-size: 0.7rem;
    }
    
    .footer {
        padding: 32px 16px 24px;
        margin-top: 32px;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
    
    .footer-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 16px;
    }
}

@media (max-width: 480px) {
    .main-container {
        padding: 12px 8px;
    }
    
    .tool-header h1 {
        font-size: 1.2rem;
    }
    
    .tool-description {
        font-size: 0.8rem;
    }
    
    .input-card {
        padding: 12px;
    }
    
    .barcode-type-grid {
        grid-template-columns: 1fr 1fr;
        gap: 6px;
    }
    
    .barcode-type-btn {
        padding: 6px 4px;
    }
    
    .barcode-type-btn i {
        font-size: 0.8rem;
    }
    
    .barcode-type-btn span {
        font-size: 0.65rem;
    }
    
    .output-stats-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .stat-card {
        padding: 8px 12px;
    }
    
    .tips-grid-mobile {
        grid-template-columns: 1fr;
    }
    
    .preview-canvas-wrapper {
        min-height: 80px;
        padding: 8px;
    }
    
    .preview-canvas {
        max-height: 120px;
    }
    
    .preview-header span {
        font-size: 0.75rem;
    }
    
    .preview-status {
        font-size: 0.65rem;
    }
    
    .form-input {
        font-size: 0.8rem;
        padding: 8px 12px;
    }
    
    .form-select {
        font-size: 0.8rem;
        padding: 8px 12px;
    }
    
    .option-group label {
        font-size: 0.7rem;
    }
    
    .input-hint {
        font-size: 0.6rem;
    }
    
    .action-btn-primary,
    .action-btn-secondary {
        font-size: 0.85rem;
        padding: 12px 16px;
    }
    
    .faq-question {
        padding: 12px 14px;
        font-size: 0.8rem;
    }
    
    .faq-answer {
        font-size: 0.75rem;
    }
}

@media (max-width: 360px) {
    .barcode-type-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .barcode-type-btn span {
        font-size: 0.6rem;
    }
    
    .tool-badge {
        font-size: 0.6rem;
        padding: 4px 10px;
    }
    
    .step-text {
        font-size: 0.7rem;
    }
    
    .step-number {
        width: 22px;
        height: 22px;
        font-size: 0.65rem;
    }
}

/* Ensure no overflow */
* {
    max-width: 100%;
}

img, canvas, svg, video, iframe {
    max-width: 100%;
    height: auto;
}

/* Fix for the main container overflow */
.main-container {
    overflow-x: hidden;
    width: 100%;
}

/* Fix for layout grid on all devices */
.layout-grid {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

/* Fix for tool area on mobile */
.tool-area {
    width: 100%;
    min-width: 0;
}

/* Fix for tool card */
.tool-card {
    width: 100%;
    min-width: 0;
}

/* Fix for input fields on mobile */
.input-fields-grid {
    width: 100%;
}

.dimension-input,
.form-input,
.form-select {
    width: 100%;
    min-width: 0;
}

/* Fix for barcode display */
.barcode-display {
    max-width: 100%;
    overflow: hidden;
}

.barcode-display canvas {
    max-width: 100%;
    height: auto;
}


/* ============================================
   COMPACT STAT CARDS - RECTANGULAR BOXES
============================================ */

.output-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    padding: 14px 20px;
    background: #F7F6F3;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: white;
    border-radius: 10px;
    border: 1px solid #E7E4DF;
    transition: all 0.2s;
    min-height: 56px;
}

.stat-card:hover {
    border-color: #D6B18A;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.stat-card-success .stat-value {
    color: #2E7D32;
}

.stat-card-highlight {
    background: #071F32;
    border-color: #071F32;
}

.stat-card-highlight .stat-label {
    color: rgba(255, 255, 255, 0.7);
}

.stat-card-highlight .stat-value {
    color: white;
}

.stat-card-highlight .stat-icon i {
    color: rgba(255, 255, 255, 0.6);
}

.stat-icon i {
    font-size: 1rem;
    color: #D6B18A;
    width: 20px;
    text-align: center;
}

.stat-content {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
    min-width: 0;
}

.stat-label {
    font-size: 0.6rem;
    color: #A8A49C;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.stat-value {
    font-weight: 600;
    font-size: 0.85rem;
    color: #071F32;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .output-stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
        padding: 12px 16px;
    }
    
    .stat-card {
        padding: 8px 12px;
        min-height: 48px;
        gap: 8px;
    }
    
    .stat-icon i {
        font-size: 0.85rem;
        width: 16px;
    }
    
    .stat-value {
        font-size: 0.75rem;
    }
    
    .stat-label {
        font-size: 0.55rem;
    }
}

@media (max-width: 480px) {
    .output-stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 6px;
        padding: 10px 12px;
    }
    
    .stat-card {
        padding: 6px 10px;
        min-height: 42px;
        gap: 6px;
        border-radius: 8px;
    }
    
    .stat-icon i {
        font-size: 0.75rem;
        width: 14px;
    }
    
    .stat-value {
        font-size: 0.7rem;
    }
    
    .stat-label {
        font-size: 0.5rem;
    }
}

@media (max-width: 360px) {
    .output-stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 4px;
        padding: 8px 10px;
    }
    
    .stat-card {
        padding: 4px 8px;
        min-height: 36px;
        gap: 4px;
        border-radius: 6px;
    }
    
    .stat-icon i {
        font-size: 0.65rem;
        width: 12px;
    }
    
    .stat-value {
        font-size: 0.6rem;
    }
    
    .stat-label {
        font-size: 0.45rem;
    }
}