/* Documents Pro — Frontend Styles
   Design: flat, no shadows, 10px radius, solid buttons with white text
   ============================================================ */

:root {
    --dpro-primary:   #1f6feb;
    --dpro-secondary: #0d1117;
    --dpro-border:    #d0d7de;
    --dpro-bg:        #f6f8fa;
    --dpro-white:     #ffffff;
    --dpro-muted:     #6e7781;
    --dpro-danger:    #cf222e;
    --dpro-success:   #1a7f37;
    --dpro-radius:    10px;
    --dpro-radius-sm: 6px;
    --dpro-font:      -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* ── Service cards ── */
.dpro-services {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin: 20px 0;
}
.dpro-cols-1 { grid-template-columns: 1fr; }
.dpro-cols-2 { grid-template-columns: repeat(2, 1fr); }
.dpro-cols-4 { grid-template-columns: repeat(4, 1fr); }

.dpro-service-card {
    background: var(--dpro-white);
    border: 1px solid var(--dpro-border);
    border-radius: var(--dpro-radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.dpro-service-image img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    display: block;
}
.dpro-service-body {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.dpro-service-icon {
    width: 44px;
    height: 44px;
    background: var(--dpro-bg);
    border-radius: var(--dpro-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}
.dpro-service-icon svg { width: 24px; height: 24px; color: var(--dpro-primary); }
.dpro-service-name { font-size: 16px; font-weight: 700; margin: 0 0 8px; color: var(--dpro-secondary); font-family: var(--dpro-font); }
.dpro-service-desc { font-size: 14px; color: var(--dpro-muted); margin: 0 0 12px; flex: 1; line-height: 1.5; }
.dpro-service-price { font-size: 13px; font-weight: 600; color: var(--dpro-primary); margin-bottom: 14px; }
.dpro-service-card .dpro-btn { margin-top: auto; }

/* ── Buttons ── */
.dpro-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 22px;
    background: var(--dpro-primary);
    color: var(--dpro-white) !important;
    border: none;
    border-radius: var(--dpro-radius-sm);
    font-size: 14px;
    font-weight: 600;
    font-family: var(--dpro-font);
    cursor: pointer;
    text-decoration: none !important;
    line-height: 1.4;
    transition: opacity .15s;
}
.dpro-btn:hover  { opacity: .88; }
.dpro-btn:focus  { outline: 2px solid var(--dpro-primary); outline-offset: 2px; }
.dpro-btn:disabled { opacity: .55; cursor: not-allowed; }

/* ── Application form ── */
.dpro-form-wrap {
    max-width: 900px;
    margin: 0 auto;
    font-family: var(--dpro-font);
}
.dpro-form-header {
    margin-bottom: 24px;
}
.dpro-form-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--dpro-secondary);
    margin: 0 0 6px;
}
.dpro-form-subtitle {
    font-size: 14px;
    color: var(--dpro-muted);
    margin: 0;
}

.dpro-form {
    display: block;
}
.dpro-form-section {
    background: var(--dpro-white);
    border: 1px solid var(--dpro-border);
    border-radius: var(--dpro-radius);
    padding: 24px;
    margin-bottom: 20px;
}
.dpro-section-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--dpro-secondary);
    margin: 0 0 18px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--dpro-border);
    font-family: var(--dpro-font);
}

.dpro-form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}
.dpro-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 4px;
}
.dpro-field label {
    font-size: 13px;
    font-weight: 600;
    color: var(--dpro-secondary);
}
.dpro-field input[type="text"],
.dpro-field input[type="email"],
.dpro-field input[type="tel"],
.dpro-field input[type="number"],
.dpro-field input[type="date"],
.dpro-field input[type="file"],
.dpro-field select,
.dpro-field textarea {
    padding: 10px 12px;
    border: 1px solid var(--dpro-border);
    border-radius: var(--dpro-radius-sm);
    font-size: 14px;
    font-family: var(--dpro-font);
    color: var(--dpro-secondary);
    background: var(--dpro-white);
    width: 100%;
    box-sizing: border-box;
    -webkit-appearance: none;
}
.dpro-field input:focus,
.dpro-field select:focus,
.dpro-field textarea:focus {
    outline: none;
    border-color: var(--dpro-primary);
}
.dpro-field textarea { resize: vertical; }
.dpro-field-desc { font-size: 12px; color: var(--dpro-muted); }
.dpro-required { color: var(--dpro-danger); margin-left: 2px; }

.dpro-w-100 { width: 100%; }
.dpro-w-50  { flex: 0 0 calc(50% - 8px); min-width: 180px; }
.dpro-w-33  { flex: 0 0 calc(33.33% - 11px); }
.dpro-w-25  { flex: 0 0 calc(25% - 12px); min-width: 140px; }

/* radio / checkbox groups */
.dpro-radio-group,
.dpro-checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.dpro-radio-label,
.dpro-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    cursor: pointer;
    font-weight: normal !important;
}
.dpro-radio-label input,
.dpro-checkbox-label input { width: auto; margin: 0; }

/* ── Package cards ── */
.dpro-packages {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}
.dpro-package-card {
    display: block;
    cursor: pointer;
    position: relative;
}
.dpro-package-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.dpro-package-inner {
    border: 2px solid var(--dpro-border);
    border-radius: var(--dpro-radius);
    padding: 16px;
    background: var(--dpro-white);
    transition: border-color .15s;
}
.dpro-package-card:hover .dpro-package-inner,
.dpro-package-card.dpro-selected .dpro-package-inner {
    border-color: var(--dpro-primary);
    background: #f1f8ff;
}
.dpro-package-name  { font-size: 15px; font-weight: 700; color: var(--dpro-secondary); margin-bottom: 6px; }
.dpro-package-price { font-size: 18px; font-weight: 700; color: var(--dpro-primary); margin-bottom: 8px; }
.dpro-package-desc  { font-size: 13px; color: var(--dpro-muted); margin-bottom: 10px; }
.dpro-package-benefits {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 13px;
    color: var(--dpro-secondary);
}
.dpro-package-benefits li::before {
    content: "✓ ";
    color: var(--dpro-success);
    font-weight: 700;
}

/* ── Amount summary & submit ── */
.dpro-form-submit {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}
.dpro-amount-summary {
    font-size: 16px;
    font-weight: 500;
    color: var(--dpro-secondary);
}
.dpro-amount-summary strong { font-size: 20px; color: var(--dpro-primary); }
.dpro-btn-submit { padding: 12px 32px; font-size: 15px; }

/* ── Notices ── */
.dpro-notice {
    padding: 12px 16px;
    border-radius: var(--dpro-radius-sm);
    font-size: 14px;
    margin-bottom: 16px;
    border: 1px solid transparent;
    font-family: var(--dpro-font);
}
.dpro-notice-error   { background: #ffebe9; border-color: #ffcec8; color: var(--dpro-danger); }
.dpro-notice-success { background: #e6f4ea; border-color: #b3e0bb; color: var(--dpro-success); }
.dpro-notice-info    { background: #ddf4ff; border-color: #a8d8f0; color: #0969da; }

/* ── Success panel ── */
.dpro-success-panel {
    text-align: center;
    padding: 48px 24px;
    background: var(--dpro-white);
    border: 1px solid var(--dpro-border);
    border-radius: var(--dpro-radius);
}
.dpro-success-icon {
    width: 64px;
    height: 64px;
    background: #e6f4ea;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: var(--dpro-success);
    margin: 0 auto 16px;
}
.dpro-success-panel h3 { font-size: 20px; margin: 0 0 10px; font-family: var(--dpro-font); }
.dpro-reference-box {
    display: inline-block;
    background: var(--dpro-bg);
    border: 1px solid var(--dpro-border);
    border-radius: var(--dpro-radius-sm);
    padding: 10px 20px;
    font-size: 18px;
    font-weight: 700;
    font-family: monospace;
    margin-top: 12px;
    color: var(--dpro-secondary);
}

/* ── Status tracker ── */
.dpro-status-wrap { max-width: 700px; margin: 0 auto; font-family: var(--dpro-font); }
.dpro-status-search {
    background: var(--dpro-white);
    border: 1px solid var(--dpro-border);
    border-radius: var(--dpro-radius);
    padding: 32px 28px;
    text-align: center;
    margin-bottom: 24px;
}
.dpro-status-search h3 { margin: 0 0 8px; font-size: 20px; font-weight: 700; color: var(--dpro-secondary); }
.dpro-status-search p  { margin: 0 0 20px; font-size: 14px; color: var(--dpro-muted); line-height: 1.5; }
.dpro-search-row {
    display: flex;
    gap: 10px;
    max-width: 500px;
    margin: 0 auto;
}
.dpro-status-input {
    flex: 1;
    padding: 11px 14px;
    border: 1px solid var(--dpro-border);
    border-radius: var(--dpro-radius-sm);
    font-size: 14px;
    font-family: var(--dpro-font);
    color: var(--dpro-secondary);
    background: var(--dpro-white);
}
.dpro-status-input:focus { outline: none; border-color: var(--dpro-primary); box-shadow: 0 0 0 3px rgba(31,111,235,.08); }
.dpro-error-msg { color: var(--dpro-danger); font-size: 13px; margin-top: 10px; }

.dpro-status-results { display: flex; flex-direction: column; gap: 16px; }
.dpro-status-card {
    background: var(--dpro-white);
    border: 1px solid var(--dpro-border);
    border-radius: var(--dpro-radius);
    overflow: hidden;
}
.dpro-status-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 20px;
    background: var(--dpro-bg);
    border-bottom: 1px solid var(--dpro-border);
}
.dpro-status-ref { font-family: monospace; font-size: 15px; font-weight: 700; color: var(--dpro-secondary); }
.dpro-status-card-body { padding: 18px 20px; }
.dpro-status-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 14px;
    border-bottom: 1px solid var(--dpro-border);
}
.dpro-status-row:last-child { border-bottom: none; }
.dpro-status-row dt { color: var(--dpro-muted); font-weight: 500; }
.dpro-status-row dd { color: var(--dpro-secondary); font-weight: 600; text-align: right; }
.dpro-status-actions {
    display: flex;
    gap: 10px;
    margin-top: 16px;
    flex-wrap: wrap;
    padding-top: 14px;
    border-top: 1px solid var(--dpro-border);
}
.dpro-btn-sm { padding: 8px 16px; font-size: 13px; font-weight: 600; }
.dpro-btn-outline {
    background: transparent !important;
    color: var(--dpro-primary) !important;
    border: 1px solid var(--dpro-primary) !important;
}
.dpro-btn-outline:hover { background: #f1f8ff !important; color: var(--dpro-primary) !important; }

/* ── Status badge inline ── */
.dpro-status-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}
.dpro-badge-submitted       { background: #f1f8ff; color: #0969da; }
.dpro-badge-pending_payment { background: #fff8c5; color: #9a6700; }
.dpro-badge-paid            { background: #e6f4ea; color: #1a7f37; }
.dpro-badge-processing      { background: #ddf4ff; color: #0969da; }
.dpro-badge-completed       { background: #e6f4ea; color: #1a7f37; }
.dpro-badge-rejected        { background: #ffebe9; color: #cf222e; }
.dpro-badge-archived        { background: #f6f8fa; color: #6e7781; }

/* ── General ── */
.dpro-error { color: var(--dpro-danger); font-size: 14px; padding: 12px 0; font-family: var(--dpro-font); }
.dpro-empty { color: var(--dpro-muted); font-size: 14px; padding: 20px 0; font-family: var(--dpro-font); }

/* ── Responsive ── */
@media (max-width: 768px) {
    .dpro-services { grid-template-columns: 1fr; }
    .dpro-cols-2,
    .dpro-cols-3,
    .dpro-cols-4 { grid-template-columns: 1fr; }

    .dpro-form-section { padding: 16px; }
    .dpro-form-row { flex-direction: column; }
    .dpro-w-50,
    .dpro-w-33,
    .dpro-w-25 { flex: 0 0 100%; min-width: unset; width: 100%; }

    .dpro-packages { grid-template-columns: 1fr; }
    .dpro-form-submit { flex-direction: column; align-items: stretch; }
    .dpro-btn-submit { width: 100%; }

    .dpro-search-row { flex-direction: column; }
    .dpro-status-search { padding: 20px; }
    .dpro-status-card-header { flex-direction: column; align-items: flex-start; gap: 8px; }
    .dpro-status-actions .dpro-btn { width: 100%; text-align: center; }
}

/* ── Success panel PDF buttons ── */
.dpro-success-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 20px;
}
.dpro-success-actions .dpro-btn {
    min-width: 200px;
}
