/* ══════════════════════════════════════════════
   SUCCESSWORKS — Shared Site Background Theme
   Include this on every page (index, login, register,
   forgot_password, dashboards) for a consistent look.
══════════════════════════════════════════════ */

html {
    min-height: 100%;
    background: linear-gradient(135deg, #eef2f7 0%, #dde6f0 50%, #eef2f7 100%);
    background-attachment: fixed;
}

body {
    background: linear-gradient(135deg, #eef2f7 0%, #dde6f0 50%, #eef2f7 100%);
    background-attachment: fixed;
    min-height: 100vh;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

/* ══════════════════════════════════════════════
   🚀 GOD-MODE ACTION MENU ALIGNMENT FIX
   This selector is intentionally overly specific to 
   crush and override any hardcoded styles inside 
   individual PHP files (like sales_list.php).
══════════════════════════════════════════════ */

/* 1. Force the Dropdown Box styling */
html body .app .main .am-dropdown,
html body .app .main .action-dropdown-menu {
    background: #fff !important;
    border: 1px solid #e8edf3 !important;
    border-radius: 10px !important;
    box-shadow: 0 8px 24px rgba(0,0,0,0.13) !important;
    padding: 6px 0 !important;
    overflow: hidden !important;
}

/* 2. The Grid Magic: Forces Icon (Col 1) and Text (Col 2) to strict widths */
html body .app .main .am-wrap .am-dropdown a,
html body .app .main .am-wrap .am-dropdown button,
html body .app .main .action-dropdown-menu a,
html body .app .main .action-dropdown-menu button {
    display: grid !important;
    grid-template-columns: 24px 1fr !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 10px 16px !important;
    font-size: 13.5px !important;
    font-weight: 600 !important;
    color: #374151 !important;
    text-decoration: none !important;
    background: transparent !important;
    border: none !important;
    width: 100% !important;
    text-align: left !important;
    cursor: pointer !important;
    box-sizing: border-box !important;
    transition: all 0.15s ease !important;
    line-height: 1.2 !important;
    border-radius: 0 !important;
}

/* 3. Universal Premium Hover Effect */
html body .app .main .am-wrap .am-dropdown a:hover,
html body .app .main .am-wrap .am-dropdown button:hover,
html body .app .main .action-dropdown-menu a:hover,
html body .app .main .action-dropdown-menu button:hover {
    background-color: #f8fafc !important;
    color: #2563eb !important;
}

/* 4. Ensure real icons/SVGs center perfectly in the 24px column */
html body .app .main .am-wrap .am-dropdown a > i,
html body .app .main .am-wrap .am-dropdown button > i,
html body .app .main .am-wrap .am-dropdown a > svg,
html body .app .main .am-wrap .am-dropdown button > svg,
html body .app .main .action-dropdown-menu a > i,
html body .app .main .action-dropdown-menu button > i,
html body .app .main .action-dropdown-menu a > svg,
html body .app .main .action-dropdown-menu button > svg {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    margin: 0 !important;
    font-size: 16px !important;
}

/* 5. Ensure the text wraps cleanly in column 2 */
html body .app .main .am-wrap .am-dropdown a > span,
html body .app .main .am-wrap .am-dropdown button > span,
html body .app .main .action-dropdown-menu a > span,
html body .app .main .action-dropdown-menu button > span {
    color: inherit !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
    display: block !important;
    text-align: left !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* 6. Specific Delete Button Overrides (Always Red) */
html body .app .main .am-wrap .am-dropdown button.am-delete,
html body .app .main .action-dropdown-menu button.delete-action,
html body .app .main .am-wrap .am-dropdown button[onclick*="confirmDelete"],
html body .app .main .action-dropdown-menu button[onclick*="Delete"] {
    color: #ef4444 !important;
}

html body .app .main .am-wrap .am-dropdown button.am-delete:hover,
html body .app .main .action-dropdown-menu button.delete-action:hover,
html body .app .main .am-wrap .am-dropdown button[onclick*="confirmDelete"]:hover,
html body .app .main .action-dropdown-menu button[onclick*="Delete"]:hover {
    background-color: #fef2f2 !important;
    color: #dc2626 !important;
}

/* 6b. FIX: "Delete Selected" bulk-action button text was being
   caught by rule 6 above (its onclick contains "Delete"), turning
   its label red-on-red and invisible. Force it white, on all
   list pages (payment_out_list, expenses_list, debit_notes_list,
   purchase_bills_list, purchase_orders_list). Placed after rule 6
   so it always wins. */
html body .app .main .bulk-btn-del,
html body .app .main button.bulk-btn-del,
html body .app .main .bulk-bar .bulk-btn-del {
    color: #ffffff !important;
}
html body .app .main .bulk-btn-del * {
    color: inherit !important;
}

/* 7. Clean Divider styling */
html body .app .main .am-divider, 
html body .app .main .action-menu-divider {
    height: 1px !important;
    background: #f1f5f9 !important;
    margin: 4px 0 !important;
    width: 100% !important;
    display: block !important;
}


/* ══════════════════════════════════════════════
   🚀 REMOVED: old BOTTOM ACTION BAR (btn-action /
   btn-share / btn-print / btn-save) styles.
   Superseded by the per-page sw-btn / sw-share-pill /
   sw-print-circ / sw-save-rect system (see estimate_new.php
   and similar pages). This section defined the OLD green-pill
   Share / blue-circle Print / red-rect Save look, and — since
   theme.css is loaded on many pages after each page's own
   inline <style> block — was silently winning the cascade and
   showing the old design even after individual pages were
   updated to the new sw-btn classes. If any page still uses the
   old btn-action/btn-share/btn-print/btn-save class names
   directly, it will now fall back to default unstyled buttons
   until it's migrated to the sw-btn system too — flag any page
   that looks unstyled after this change and it can be migrated.
══════════════════════════════════════════════ */