/* easyprop CRM UI kit: icons, icon buttons and tooltips, skeleton loading, profile modal, footer logo */

/* ---- icons ---- */
.ep-i { display: inline-flex; align-items: center; justify-content: center; width: 1.1em; height: 1.1em; vertical-align: -0.17em; margin-right: .4em; flex-shrink: 0; }
.ep-i:last-child { margin-right: 0; }
.ep-i svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ep-i svg .ep-fill { fill: currentColor; stroke: none; }
button > .ep-i:only-child, a > .ep-i:only-child { margin-right: 0; }

/* ---- icon-only action buttons ---- */
.btn.ep-iconbtn, button.ep-iconbtn { width: 30px; height: 30px; min-width: 30px; padding: 0; display: inline-flex; align-items: center; justify-content: center; gap: 0; }
.ep-iconbtn .ep-i { width: 16px; height: 16px; margin: 0; vertical-align: 0; }

/* ---- tooltip ---- */
#ep-tip { position: fixed; z-index: 100000; pointer-events: none; max-width: 240px; padding: 5px 9px; border-radius: 6px;
  background: #0F1729; color: #fff; font-size: 12px; line-height: 1.3; font-weight: 500; opacity: 0; transform: translateY(2px);
  transition: opacity .12s, transform .12s; box-shadow: 0 4px 14px rgba(0,0,0,.22); }
#ep-tip.on { opacity: 1; transform: none; }

/* ---- skeleton loading ---- */
.ep-skel { position: relative; overflow: hidden; background: var(--surface-2, #eef1f4); border-radius: 8px; }
.ep-skel::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.55), transparent); animation: ep-shimmer 1.3s infinite; }
@keyframes ep-shimmer { to { transform: translateX(100%); } }
@media (prefers-reduced-motion: reduce) { .ep-skel::after { animation: none; } }
.loading-spinner.ep-skel-host { display: block; min-height: 0; width: 100%; }
.loading-spinner.ep-skel-host .spinner { display: none; }
.ep-skel-wrap { display: flex; flex-direction: column; gap: 18px; width: 100%; padding: 4px 0; }
.ep-skel-h { height: 28px; width: 34%; }
.ep-skel-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.ep-skel-tile { height: 84px; }
.ep-skel-rows { display: flex; flex-direction: column; gap: 10px; }
.ep-skel-row { height: 38px; }
.ep-skel-line { display: block; height: 12px; margin: 8px 0; border-radius: 6px; }
@media (max-width: 700px) { .ep-skel-tiles { grid-template-columns: repeat(2, 1fr); } }

/* ---- profile block and modal ---- */
#sidebar .nav-user { cursor: pointer; border-radius: 8px; padding: 8px; transition: background .12s; }
#sidebar .nav-user:hover, #sidebar .nav-user:focus-visible { background: var(--bg); outline: none; }
#sidebar .nav-user > button { display: none !important; }
#sidebar .nav-user .ep-chev { color: var(--text-3); display: inline-flex; }
#sidebar .nav-user .ep-chev .ep-i { margin: 0; width: 14px; height: 14px; }
.ep-modal-back { position: fixed; inset: 0; z-index: 99990; background: rgba(15,23,41,.45); display: none; align-items: center; justify-content: center; padding: 16px; }
.ep-modal-back.on { display: flex; }
.ep-modal { width: 100%; max-width: 340px; background: var(--surface, #fff); color: var(--text, #0F1729); border-radius: 14px; box-shadow: 0 20px 50px rgba(0,0,0,.28); overflow: hidden; }
.ep-modal-head { display: flex; align-items: center; gap: 12px; padding: 18px 18px 14px; }
.ep-modal-av { width: 44px; height: 44px; border-radius: 50%; background: var(--accent); color: var(--accent-fg, #fff); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; flex-shrink: 0; }
.ep-modal-who { flex: 1; min-width: 0; }
.ep-modal-name { font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ep-modal-role { font-size: 12px; color: var(--text-3); text-transform: capitalize; }
.ep-modal-x { background: none; border: 0; cursor: pointer; color: var(--text-3); padding: 6px; border-radius: 6px; display: flex; }
.ep-modal-x:hover { background: var(--bg); color: var(--text); }
.ep-modal-body { padding: 4px 18px 18px; display: flex; flex-direction: column; gap: 8px; }
.ep-modal-body .btn { width: 100%; justify-content: center; }
.ep-modal-body .ep-i { margin-right: .5em; }

/* ---- footer logo: one colour, follows the text colour ---- */
.ep-foot { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 28px 16px 22px; color: var(--text-3); font-size: 11px; letter-spacing: .04em; }
.ep-foot-logo { display: inline-block; width: 112px; height: 26px; background-color: currentColor; opacity: .55;
  -webkit-mask: var(--ep-logo) no-repeat center / contain; mask: var(--ep-logo) no-repeat center / contain; }
#sidebar .nav-powered { display: none !important; }

/* ---- theme editor ---- */
#ep-theme-card .ep-help { margin: 0 0 14px; font-size: 13px; color: var(--text-3); }
.ep-theme-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px 20px; }
.ep-theme-row { display: flex; flex-direction: column; gap: 5px; }
.ep-theme-ctl { display: flex; align-items: center; gap: 8px; }
.ep-theme-ctl input[type=color] { width: 44px; height: 34px; padding: 2px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); cursor: pointer; }
.ep-theme-ctl input[type=text] { width: 100px; }
.ep-theme-auto { font-size: 11px; color: var(--text-3); }
.ep-theme-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; align-items: center; }
.ep-theme-note { font-size: 12px; color: var(--text-3); margin-top: 10px; }

/* Theme: text on accent-coloured buttons follows the computed readable colour */
.btn-primary { color: var(--accent-fg, #fff); }

/* Invoices and other tables: fill the card, tidy row actions */
.card > table, .card > div > table { width: 100%; }
td .form-select { height: 30px; width: auto !important; min-width: 84px; padding: 0 26px 0 10px !important; font-size: 12px !important; border-radius: 8px; }
.inv-subnav { display: inline-flex; align-items: center; gap: 6px; }
.inv-subnav .ep-i { width: 15px; height: 15px; }
td .btn.btn-sm, td .flex-gap .btn { height: 30px; }

/* Theme section sits inside the Logo & Brand Colours card */
#ep-theme-card { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--border, #e5e9ef); }
.ep-theme-title { font-size: 14px; font-weight: 600; margin-bottom: 8px; }
