/* --- Main App Container --- */
.dsqr-app-container {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    background: #ffffff !important;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    max-width: 1100px;
    margin: 30px auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    border: 1px solid #eaeaea;
}

/* --- FORCE DARK TEXT (The Fix) --- */
/* This targets everything inside the app container */
.dsqr-app-container,
.dsqr-app-container h1,
.dsqr-app-container h2, 
.dsqr-app-container h3,
.dsqr-app-container p,
.dsqr-app-container label,
.dsqr-app-container span,
.dsqr-app-container div {
    color: #111111 !important;
    text-shadow: none !important;
}

/* --- Left Controls --- */
.dsqr-controls {
    flex: 1;
    min-width: 300px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.dsqr-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.dsqr-group label {
    font-weight: 700 !important;
    color: #222 !important;
    font-size: 14px;
}

.dsqr-group input[type="text"],
.dsqr-group select,
.dsqr-group input[type="file"] {
    padding: 12px;
    border: 1px solid #ccc !important;
    border-radius: 6px;
    font-size: 15px;
    width: 100%;
    box-sizing: border-box;
    /* Force Input Colors */
    color: #000000 !important;
    background-color: #ffffff !important; 
    box-shadow: none !important;
}

/* --- Checkbox Group --- */
.checkbox-group {
    background: #f0f5fa !important;
    padding: 15px; 
    border-radius: 8px; 
    border: 1px solid #dce6f1;
}
.checkbox-group label {
    color: #2271b1 !important; /* Blue text for the pro feature */
}

/* --- Color Pickers --- */
.split-2 {
    flex-direction: row;
    gap: 20px;
}
.split-2 > div { flex: 1; }
.split-2 input[type="color"] {
    width: 100%;
    height: 45px;
    border: 1px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    background: white;
    padding: 2px;
}

/* --- Right Preview --- */
.dsqr-preview-panel {
    flex: 1;
    min-width: 320px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #f8f9fa !important;
    padding: 40px;
    border-radius: 12px;
    border: 1px solid #eee;
}

.dsqr-canvas-wrapper {
    margin-bottom: 30px;
    background: white !important;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

/* --- Buttons --- */
.dsqr-actions {
    display: flex;
    gap: 15px;
    width: 100%;
}

.dsqr-btn {
    flex: 1;
    padding: 14px;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
    text-align: center;
    font-size: 15px;
}

.dsqr-btn.primary { background-color: #2271b1 !important; color: white !important; }
.dsqr-btn.secondary { background-color: #ffffff !important; color: #333 !important; border: 1px solid #ccc !important; }

.dsqr-btn.small { 
    padding: 10px 15px; 
    font-size: 13px; 
    background: #2271b1 !important; 
    color: white !important; 
    width: auto;
    align-self: flex-start;
}

/* --- DASHBOARD STYLES (THE NUCLEAR FIX) --- */
.dsqr-dashboard {
    margin-top: 50px;
    background: #ffffff !important;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    color: #111111 !important; /* Force Container Text Black */
}

/* Force every single text element inside dashboard to be dark */
.dsqr-dashboard * {
    color: #111111; 
}

.dsqr-dashboard h2 {
    margin-top: 0;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 15px;
    margin-bottom: 20px;
    font-size: 24px;
    color: #000000 !important;
}

.dsqr-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

.dsqr-table th {
    padding: 15px;
    text-align: left;
    border-bottom: 2px solid #ddd;
    background: #f2f2f2 !important; /* Light Grey Background */
    font-weight: 800 !important;
    color: #000000 !important; /* Absolute Black Text */
}

.dsqr-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
    color: #333333 !important; /* Dark Grey Text */
    vertical-align: middle;
    background: #ffffff !important;
}

/* Links inside the dashboard need to be Blue */
.dsqr-dashboard a.dsqr-slug {
    color: #2271b1 !important;
    font-weight: bold;
    text-decoration: none;
    background: #eaf3fa !important;
    padding: 4px 8px;
    border-radius: 4px;
    display: inline-block;
}

/* Inputs inside the dashboard */
.dsqr-edit-input {
    width: 100%;
    max-width: 300px;
    padding: 8px;
    border: 1px solid #aaa !important;
    border-radius: 4px;
    color: #000000 !important;
    background: #ffffff !important;
}

/* Buttons inside the dashboard */
.dsqr-btn-icon {
    border: 1px solid #ddd;
    background: white !important;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    margin-right: 5px;
    font-size: 13px;
    color: #555 !important;
}

.dsqr-btn-icon.save { color: #2271b1 !important; border-color: #2271b1; }
.dsqr-btn-icon.chart { color: #27ae60 !important; border-color: #27ae60; }