/* ==========================================================================
   CRM Dev – DevSuite OS Core Module
   Design System: Dark Cyberpunk (from css.html reference)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Jura:wght@300..700&display=swap');

:root {
    /* ── Core Palette ── */
    --crmdev-bg: #15191e;
    --crmdev-card-bg: #1c232b;
    --crmdev-card-border: #334155;
    --crmdev-card-border-hover: #4a5568;

    /* ── Accent Colors ── */
    --crmdev-cyan: #00ffff;
    --crmdev-cyan-dim: rgba(0, 255, 255, 0.15);
    --crmdev-yellow: #ffd700;
    --crmdev-yellow-dim: rgba(255, 215, 0, 0.15);
    --crmdev-red: #cc3e3e;
    --crmdev-red-dim: rgba(204, 62, 62, 0.15);
    --crmdev-teal: #193237;

    /* ── Text ── */
    --crmdev-text: #ffffff;
    --crmdev-text-secondary: #b0b0b0;
    --crmdev-text-muted: #6b7a8d;

    /* ── Glow Shadows ── */
    --crmdev-glow-cyan: 0 0 10px #00ffff, 0 0 20px rgba(0, 255, 255, 0.4);
    --crmdev-glow-yellow: 0 0 10px #ffd700, 0 0 20px rgba(255, 215, 0, 0.4);
    --crmdev-glow-red: 0 0 10px #cc3e3e, 0 0 20px rgba(204, 62, 62, 0.4);
    --crmdev-glow-cyan-soft: 0 0 6px rgba(0, 255, 255, 0.3);

    /* ── Shapes ── */
    --crmdev-radius: 4px;
    --crmdev-radius-sm: 8px;
    --crmdev-transition: 0.3s ease;

    /* ── Font ── */
    --crmdev-font: 'Jura', sans-serif;
    --crmdev-font-size: 12px;
}

/* ── Icon Protection (Anti-Font Conflict) ── */
[class^="fa-"],
[class*=" fa-"],
i.fa-solid,
i.fa-regular {
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900 !important;
    font-style: normal !important;
    display: inline-block !important;
}

/* Forçar fonte Jura nos elementos CRM Dev (Exceto ícones e seus pseudos) */
[class^="crm-dev-"]:not(i):not([class*="fa-"]),
[class*=" crm-dev-"]:not(i):not([class*="fa-"]) {
    font-family: var(--crmdev-font) !important;
}

/* ==========================================================================
   Card Grid
   ========================================================================== */

.crm-dev-list-section .crm-dev-grid,
.crm-dev-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 3px !important;
    padding: 8px 0;
    font-family: var(--crmdev-font);
}

.crm-dev-no-results {
    text-align: center;
    color: var(--crmdev-text-muted);
    font-size: var(--crmdev-font-size);
    padding: 48px 16px;
    font-family: var(--crmdev-font);
}

/* ==========================================================================
   Project Card
   ========================================================================== */

.crm-dev-card {
    background: var(--crmdev-card-bg);
    border: 1px solid var(--crmdev-card-border);
    border-radius: var(--crmdev-radius);
    padding: 16px 20px;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: border-color var(--crmdev-transition), box-shadow var(--crmdev-transition);
    font-family: var(--crmdev-font);
}

/* Top glow line */
.crm-dev-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--crmdev-cyan), transparent);
    opacity: 0.2;
    transition: opacity var(--crmdev-transition);
}

.crm-dev-card:hover {
    border-color: var(--crmdev-card-border-hover);
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.06);
}

.crm-dev-card:hover::before {
    opacity: 1;
}

.crm-dev-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.crm-dev-card-header-left {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.crm-dev-card-title {
    margin: 0;
    font-size: var(--crmdev-font-size);
    font-weight: 600;
    color: var(--crmdev-text);
    line-height: 1.35;
}

/* Badge */
.crm-dev-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 10px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    white-space: nowrap;
    flex-shrink: 0;
}

.crm-dev-badge--concluido {
    background: var(--crmdev-cyan);
    color: #000000;
}

.crm-dev-badge--em_desenvolvimento {
    background: var(--crmdev-yellow);
    color: #000000;
}

.crm-dev-badge--servidor {
    background: var(--crmdev-teal);
    color: var(--crmdev-cyan);
    border: 1px solid rgba(0, 255, 255, 0.2);
}

/* Meta */
.crm-dev-card-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--crmdev-text-secondary);
    font-size: var(--crmdev-font-size);
}

.crm-dev-card-servidor {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.crm-dev-card-servidor svg {
    flex-shrink: 0;
    color: var(--crmdev-cyan);
    opacity: 0.6;
}

/* ==========================================================================
   Progress Bar
   ========================================================================== */

.crm-dev-card-progress-info {
    display: flex;
    justify-content: space-between;
    font-size: var(--crmdev-font-size);
    color: var(--crmdev-text-muted);
    margin-bottom: 6px;
    font-weight: 500;
}

.crm-dev-card-progress-info span:last-child {
    color: var(--crmdev-cyan);
    font-weight: 700;
}

.crm-dev-progress-bar {
    width: 100%;
    height: 6px;
    background: var(--crmdev-teal);
    border-radius: 100px;
    overflow: hidden;
}

.crm-dev-progress-fill {
    height: 100%;
    border-radius: 100px;
    background: var(--crmdev-cyan);
    box-shadow: 0 0 8px rgba(0, 255, 255, 0.5);
    transition: width 0.6s cubic-bezier(0.22, 1, 0.36, 1);
    position: relative;
}

.crm-dev-progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg,
            rgba(255, 255, 255, 0) 0%,
            rgba(255, 255, 255, 0.25) 50%,
            rgba(255, 255, 255, 0) 100%);
    animation: crmdev-shimmer 2.5s infinite;
}

@keyframes crmdev-shimmer {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

/* ==========================================================================
   Action Buttons (Icon-button style with glow)
   ========================================================================== */

.crm-dev-card-actions {
    display: flex;
    justify-content: flex-end;
    gap: 6px;
    margin-top: auto;
    padding-top: 6px;
}

/* ── Icon Buttons (square, border + glow) ── */

.crm-dev-icon-btn {
    width: 24px;
    height: 24px;
    min-height: 24px;
    max-height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    text-decoration: none;
    transition: all var(--crmdev-transition);
    background: transparent;
    line-height: 1;
    box-sizing: border-box;
    margin: 0;
}

.crm-dev-icon-btn i {
    font-size: 12px !important;
}

.crm-dev-icon-btn--cyan {
    border-color: var(--crmdev-cyan);
    color: var(--crmdev-cyan);
}

.crm-dev-icon-btn--cyan:hover {
    box-shadow: var(--crmdev-glow-cyan);
    background: var(--crmdev-cyan-dim);
    color: var(--crmdev-cyan);
}

.crm-dev-icon-btn--red {
    border-color: var(--crmdev-red);
    color: var(--crmdev-red);
}

.crm-dev-icon-btn--red:hover {
    box-shadow: var(--crmdev-glow-red);
    background: var(--crmdev-red-dim);
    color: var(--crmdev-red);
}

.crm-dev-icon-btn--yellow {
    border-color: var(--crmdev-yellow);
    color: var(--crmdev-yellow);
}

.crm-dev-icon-btn--yellow:hover {
    box-shadow: var(--crmdev-glow-yellow);
    background: var(--crmdev-yellow-dim);
    color: var(--crmdev-yellow);
}

.crm-dev-icon-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    box-shadow: none;
}

/* ── 38px Action Button Variants ── */
.crm-dev-btn-action-38 {
    width: 38px !important;
    height: 38px !important;
    padding: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 16px !important;
}

/* ── Modal Links Row ── */

.crm-dev-modal-links {
    display: flex;
    gap: 8px;
}

/* ── Modal Actions Bar ── */

.crm-dev-modal-actions {
    display: flex;
    gap: 8px;
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid var(--crmdev-card-border);
}

/* ==========================================================================
   Modal / Popup
   ========================================================================== */

.crm-dev-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(10, 14, 18, 0.85);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
    font-family: var(--crmdev-font);
    pointer-events: none;
    /* KEY FIX: Don't block clicks when invisible */
    visibility: hidden;
    /* KEY FIX: Don't block clicks when invisible */
}

.crm-dev-modal-overlay.crm-dev-modal--visible {
    opacity: 1;
    pointer-events: auto;
    /* Re-enable clicks when visible */
    visibility: visible;
}

.crm-dev-modal {
    background: var(--crmdev-bg);
    border: 1px solid var(--crmdev-card-border);
    border-radius: var(--crmdev-radius);
    width: 800px;
    max-width: 95vw;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 0 40px rgba(0, 255, 255, 0.08), 0 25px 60px rgba(0, 0, 0, 0.5);
    position: relative;
    transform: translateY(20px) scale(0.97);
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Top glow line on modal */
.crm-dev-modal::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--crmdev-cyan), transparent);
    z-index: 1;
}

.crm-dev-modal-overlay.crm-dev-modal--visible .crm-dev-modal {
    transform: translateY(0) scale(1);
}

.crm-dev-modal-top-actions {
    position: absolute !important;
    top: 15px !important;
    right: 15px !important;
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    gap: 10px !important;
    z-index: 9999 !important;
}

.crm-dev-modal-top-actions .crm-dev-modal-delete,
.crm-dev-modal-top-actions .crm-dev-modal-close {
    position: static !important;
    flex: 0 0 auto !important;
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    min-height: 34px !important;
    max-width: 34px !important;
    max-height: 34px !important;
    padding: 0 !important;
    margin: 0 !important;
    border-radius: 6px !important;
    box-sizing: border-box !important;
}

.crm-dev-modal-close,
.crm-dev-modal-delete {
    pointer-events: auto !important;
    background: transparent !important;
    border-radius: 6px !important;
    width: 34px !important;
    height: 34px !important;
    font-size: 18px !important;
    line-height: 1 !important;
    cursor: pointer !important;
    transition: all var(--crmdev-transition) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    margin: 0 !important;
}

.crm-dev-modal-close {
    border: 1px solid var(--crmdev-yellow) !important;
    color: var(--crmdev-yellow) !important;
}

.crm-dev-modal-delete {
    border: 1px solid var(--crmdev-red) !important;
    color: var(--crmdev-red) !important;
}

.crm-dev-modal-close:hover {
    box-shadow: var(--crmdev-glow-yellow);
    background: var(--crmdev-yellow-dim);
}

.crm-dev-modal-delete {
    border: 1px solid var(--crmdev-red);
    color: var(--crmdev-red);
}

.crm-dev-modal-delete:hover {
    box-shadow: var(--crmdev-glow-red);
    background: var(--crmdev-red-dim);
}

.crm-dev-modal-content {
    padding: 8px 12px 28px;
}

/* Scrollbar styling inside modal */
.crm-dev-modal::-webkit-scrollbar {
    width: 4px;
}

.crm-dev-modal::-webkit-scrollbar-track {
    background: transparent;
}

.crm-dev-modal::-webkit-scrollbar-thumb {
    background: var(--crmdev-card-border);
    border-radius: 100px;
}

/* Modal Sections */
.crm-dev-modal-section {
    border: 1px solid var(--crmdev-card-border);
    border-radius: var(--crmdev-radius-sm);
    /* 8px from Design System */
    padding: 20px;
    margin-bottom: 24px;
    background: rgba(21, 25, 30, 0.4);
    width: 100%;
    box-sizing: border-box;
}

.crm-dev-modal-section legend {
    --crmdev-font-size: 14px;
    /* Default 12px + 2px */
    font-size: var(--crmdev-font-size);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--crmdev-cyan);
    padding: 0 10px;
    background: transparent;
}

.crm-dev-modal-section:last-child {
    margin-bottom: 0;
}

/* Old section title removed since we use legends now */
.crm-dev-modal-section-title {
    display: none;
}

.crm-dev-modal-header-large {
    margin-bottom: 24px;
    padding: 8px 90px 8px 0;
    border-bottom: 1px solid var(--crmdev-cyan-dim);
}

.crm-dev-modal-title {
    font-size: 20px;
    /* Was 18px */
    font-weight: 700;
    color: var(--crmdev-cyan);
    margin: 0;
    line-height: 1.2;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-shadow: var(--crmdev-glow-cyan-soft);
}

.crm-dev-modal-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 0;
    --crmdev-font-size: 14px;
    /* Override for modal context */
    font-size: var(--crmdev-font-size);
}

.crm-dev-modal-label {
    color: var(--crmdev-text-muted);
    font-weight: 500;
}

.crm-dev-modal-value {
    color: var(--crmdev-text);
    font-weight: 600;
}

.crm-dev-modal-link {
    color: var(--crmdev-cyan);
    text-decoration: none;
    font-weight: 500;
    transition: all var(--crmdev-transition);
}

.crm-dev-modal-link:hover {
    text-shadow: var(--crmdev-glow-cyan-soft);
    text-decoration: none;
}

.crm-dev-modal-progress {
    margin-top: 12px;
}

.crm-dev-modal-progress .crm-dev-progress-bar {
    height: 8px;
}

.crm-dev-modal-adicional {
    --crmdev-font-size: 14px;
    /* Override for modal context */
    font-size: var(--crmdev-font-size);
    line-height: 1.6;
    color: var(--crmdev-text-secondary);
}

.crm-dev-modal-adicional p {
    margin: 0 0 12px;
}

.crm-dev-modal-adicional p:last-child {
    margin-bottom: 0;
}

.crm-dev-modal-adicional strong,
.crm-dev-modal-adicional b {
    color: var(--crmdev-text);
    font-weight: 700;
}

.crm-dev-modal-adicional ul,
.crm-dev-modal-adicional ol {
    margin: 0 0 12px 20px;
    padding: 0;
}

.crm-dev-modal-adicional li {
    margin-bottom: 4px;
}

.crm-dev-modal-adicional p {
    margin: 0 0 8px;
}

/* ==========================================================================
   Filter Bar
   ========================================================================== */

.crm-dev-filter-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    padding: 16px 0;
    font-family: var(--crmdev-font);
}

/* ── Stats / Counters ── */

.crm-dev-filter-stats {
    display: flex;
    gap: 8px;
    margin-right: auto;
}

.crm-dev-stat-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 12px;
    height: 38px;
    border-radius: var(--crmdev-radius-sm);
    background: var(--crmdev-card-bg);
    border: 1px solid var(--crmdev-card-border);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    box-sizing: border-box;
}

.crm-dev-stat-label {
    color: var(--crmdev-text-muted);
}

.crm-dev-stat-value {
    color: var(--crmdev-cyan);
    font-weight: 700;
}

.crm-dev-stat-item--indev {
    border-color: var(--crmdev-yellow-dim);
}

.crm-dev-stat-item--indev .crm-dev-stat-value {
    color: var(--crmdev-yellow);
}

.crm-dev-stat-item--offdev {
    border-color: var(--crmdev-cyan-dim);
}

.crm-dev-stat-item--offdev .crm-dev-stat-value {
    color: var(--crmdev-cyan);
}

.crm-dev-stat-item--total {
    border-color: var(--crmdev-card-border);
}

.crm-dev-stat-item--total .crm-dev-stat-value {
    color: var(--crmdev-text);
}

/* ── Tabs ── */

.crm-dev-filter-tabs {
    display: flex;
    gap: 4px;
}

.crm-dev-filter-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: 1px solid var(--crmdev-card-border);
    border-radius: var(--crmdev-radius-sm);
    background: transparent;
    color: var(--crmdev-text-secondary);
    font-size: var(--crmdev-font-size);
    font-weight: 600;
    font-family: var(--crmdev-font);
    cursor: pointer;
    transition: all var(--crmdev-transition);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.crm-dev-filter-tab:hover {
    border-color: var(--crmdev-card-border-hover);
    color: var(--crmdev-text);
}

.crm-dev-filter-tab--active {
    border-color: var(--crmdev-cyan);
    color: var(--crmdev-cyan);
    background: var(--crmdev-cyan-dim);
    box-shadow: var(--crmdev-glow-cyan-soft);
}

/* ── Search ── */

.crm-dev-filter-search-wrap {
    position: relative;
    flex: 1;
    min-width: 200px;
    max-width: 360px;
}

.crm-dev-filter-search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--crmdev-text-muted);
    font-size: var(--crmdev-font-size);
    pointer-events: none;
}

.crm-dev-filter-search {
    width: 100%;
    height: 38px;
    padding: 0 14px 0 38px;
    border: 1px solid var(--crmdev-card-border);
    border-radius: var(--crmdev-radius-sm);
    font-size: var(--crmdev-font-size);
    color: var(--crmdev-text);
    background: var(--crmdev-bg);
    transition: border-color var(--crmdev-transition), box-shadow var(--crmdev-transition);
    box-sizing: border-box;
    font-family: var(--crmdev-font);
}

.crm-dev-filter-search::placeholder {
    color: var(--crmdev-text-muted);
}

.crm-dev-filter-search:focus {
    outline: none;
    border-color: var(--crmdev-cyan);
    box-shadow: var(--crmdev-glow-cyan-soft);
}

/* ── Sort Button ── */

.crm-dev-filter-sort {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 38px;
    padding: 0 18px;
    border: 1px solid var(--crmdev-card-border);
    border-radius: var(--crmdev-radius-sm);
    background: transparent;
    color: var(--crmdev-text-secondary);
    font-size: var(--crmdev-font-size);
    font-weight: 600;
    font-family: var(--crmdev-font);
    cursor: pointer;
    transition: all var(--crmdev-transition);
    box-sizing: border-box;
}

.crm-dev-filter-sort:hover {
    border-color: var(--crmdev-cyan);
    color: var(--crmdev-cyan);
    box-shadow: var(--crmdev-glow-cyan-soft);
}

/* ── Reset Button ── */

.crm-dev-filter-reset {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 38px;
    padding: 0 18px;
    border: 1px solid var(--crmdev-yellow);
    border-radius: var(--crmdev-radius-sm);
    background: transparent;
    color: var(--crmdev-yellow);
    font-size: var(--crmdev-font-size);
    font-weight: 600;
    font-family: var(--crmdev-font);
    cursor: pointer;
    transition: all var(--crmdev-transition);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    box-sizing: border-box;
}

.crm-dev-filter-reset:hover {
    box-shadow: var(--crmdev-glow-yellow);
    background: var(--crmdev-yellow-dim);
}

.crm-dev-btn-action-cyan {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 38px;
    padding: 0 18px;
    border: 1px solid var(--crmdev-cyan);
    border-radius: var(--crmdev-radius-sm);
    background: transparent;
    color: var(--crmdev-cyan);
    font-size: var(--crmdev-font-size);
    font-weight: 600;
    font-family: var(--crmdev-font);
    cursor: pointer;
    transition: all var(--crmdev-transition);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    box-sizing: border-box;
}

.crm-dev-btn-action-cyan:hover {
    box-shadow: var(--crmdev-glow-cyan);
    background: var(--crmdev-cyan-dim);
}

/* ── List Section Wrapper ── */

.crm-dev-list-section {
    margin-top: 8px;
}

/* ==========================================================================
   Novo Projeto Form
   ========================================================================== */


.crm-dev-form-wrapper {
    background: none;
    border: none;
    border-radius: var(--crmdev-radius);
    padding: 20px 0;
    max-width: 100%;
    position: relative;
    overflow: hidden;
    font-family: var(--crmdev-font);
    --crmdev-font-size: 14px;
    /* Default 12px + 2px */
}

.crm-dev-form-title {
    font-size: var(--crmdev-font-size);
    font-weight: 700;
    color: var(--crmdev-cyan);
    margin: 0 0 24px;
}

.crm-dev-form-section {
    border: 1px solid var(--crmdev-card-border);
    border-radius: var(--crmdev-radius-sm);
    padding: 20px;
    margin-bottom: 20px;
    background: rgba(21, 25, 30, 0.5);
    width: 100%;
    box-sizing: border-box;
}

.crm-dev-form-section legend {
    font-size: var(--crmdev-font-size);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--crmdev-cyan);
    padding: 0 10px;
}

.crm-dev-form-field {
    margin-bottom: 16px;
}

.crm-dev-form-field:last-child {
    margin-bottom: 0;
}



.crm-dev-form-field label {
    display: block;
    font-size: var(--crmdev-font-size);
    font-weight: 600;
    color: var(--crmdev-text-secondary);
    margin-bottom: 6px;
}

.crm-dev-form-field label .required {
    color: var(--crmdev-red);
}

.crm-dev-form-field label .crm-dev-form-range-val {
    font-weight: 400;
    color: var(--crmdev-cyan);
    margin-left: 8px;
}

.crm-dev-form-field input[type="text"],
.crm-dev-form-field input[type="password"],
.crm-dev-form-field input[type="url"],
.crm-dev-form-field input[type="date"],
.crm-dev-form-field input[type="time"],
.crm-dev-form-field select,
.crm-dev-form-field textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--crmdev-card-border);
    border-radius: var(--crmdev-radius-sm);
    font-size: var(--crmdev-font-size);
    color: var(--crmdev-text);
    background: var(--crmdev-bg);
    transition: border-color var(--crmdev-transition), box-shadow var(--crmdev-transition);
    box-sizing: border-box;
    font-family: var(--crmdev-font);
}

.crm-dev-form-field input:focus,
.crm-dev-form-field select:focus,
.crm-dev-form-field textarea:focus {
    outline: none;
    border-color: var(--crmdev-cyan);
    box-shadow: var(--crmdev-glow-cyan-soft);
}

.crm-dev-form-field input[type="range"] {
    width: 100%;
    display: block;
    margin-bottom: 8px;
    accent-color: var(--crmdev-cyan);
}

.crm-dev-form-field textarea {
    resize: vertical;
    min-height: 100px;
}

.crm-dev-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.crm-dev-form-field-combo {
    display: flex;
    gap: 10px;
}

.crm-dev-form-field-combo select,
.crm-dev-form-field-combo input {
    flex: 1;
}

.crm-dev-form-alt-input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--crmdev-card-border);
    border-radius: var(--crmdev-radius-sm);
    font-size: var(--crmdev-font-size);
    color: var(--crmdev-text-muted);
    background: var(--crmdev-bg);
    box-sizing: border-box;
    font-family: var(--crmdev-font);
}

.crm-dev-form-alt-input:focus {
    outline: none;
    border-color: var(--crmdev-cyan);
    box-shadow: var(--crmdev-glow-cyan-soft);
    color: var(--crmdev-text);
}

.crm-dev-form-actions {
    margin-top: 24px;
}

.crm-dev-btn--submit {
    background: transparent;
    color: var(--crmdev-cyan);
    border: 2px solid var(--crmdev-cyan);
    padding: 12px 32px;
    font-size: var(--crmdev-font-size);
    font-weight: 700;
    border-radius: var(--crmdev-radius-sm);
    cursor: pointer;
    transition: all var(--crmdev-transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: var(--crmdev-font);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.crm-dev-btn--submit:hover {
    box-shadow: var(--crmdev-glow-cyan);
    background: var(--crmdev-cyan-dim);
}

.crm-dev-btn--submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    box-shadow: none;
}

.crm-dev-btn-loader svg {
    animation: crmdev-spin 1s linear infinite;
}

@keyframes crmdev-spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.crm-dev-form-feedback {
    margin-top: 16px;
    padding: 12px 16px;
    border-radius: var(--crmdev-radius-sm);
    font-size: var(--crmdev-font-size);
    font-weight: 500;
}

.crm-dev-form-feedback--success {
    background: var(--crmdev-cyan-dim);
    color: var(--crmdev-cyan);
    border: 1px solid rgba(0, 255, 255, 0.25);
}

.crm-dev-form-feedback--error {
    background: var(--crmdev-red-dim);
    color: var(--crmdev-red);
    border: 1px solid rgba(255, 77, 77, 0.25);
}

.crm-dev-no-permission {
    text-align: center;
    color: var(--crmdev-yellow);
    background: var(--crmdev-card-bg);
    border: 1px solid var(--crmdev-yellow);
    font-size: 11px;
    padding: 8px 16px;
    font-family: var(--crmdev-font);
    font-weight: 700;
    text-transform: uppercase;
    border-radius: var(--crmdev-radius-sm);
    display: table;
    margin: 32px auto;
    box-shadow: var(--crmdev-glow-cyan-soft);
    /* Using subtle cyan glow to contrast with yellow */
    letter-spacing: 0.05em;
}

/* ==========================================================================
   Admin Meta Box Styles
   ========================================================================== */

.crm-dev-metabox {
    padding: 12px 0;
}

.crm-dev-field {
    margin-bottom: 16px;
}

.crm-dev-field:last-child {
    margin-bottom: 0;
}

.crm-dev-field label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    font-size: var(--crmdev-font-size);
    color: #1e1e1e;
}

.crm-dev-field label span {
    font-weight: 400;
    color: #00bfbf;
    margin-left: 8px;
}

.crm-dev-field select,
.crm-dev-field input[type="date"],
.crm-dev-field input[type="time"],
.crm-dev-field input[type="url"],
.crm-dev-field input[type="text"] {
    width: 100%;
    max-width: 400px;
}

.crm-dev-field input[type="range"] {
    width: 100%;
    max-width: 400px;
    display: block;
    margin-bottom: 8px;
}

.crm-dev-fieldset {
    border: 1px solid #334155;
    border-radius: var(--crmdev-radius-sm);
    padding: 16px;
    margin-top: 8px;
}

.crm-dev-fieldset legend {
    font-weight: 600;
    font-size: var(--crmdev-font-size);
    padding: 0 8px;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 767px) {
    .crm-dev-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .crm-dev-card {
        padding: 18px;
    }

    .crm-dev-modal {
        max-height: 90vh;
    }

    .crm-dev-modal-content {
        padding: 8px 18px 18px;
    }

    .crm-dev-card-actions {
        gap: 6px;
    }

    .crm-dev-form-wrapper {
        padding: 18px;
    }

    .crm-dev-form-row {
        grid-template-columns: 1fr;
    }

    .crm-dev-form-field-combo {
        flex-direction: column;
    }

    .crm-dev-filter-bar {
        flex-direction: column;
        align-items: stretch;
        padding-bottom: 0 !important;
    }

    /* Forced hiding of search, secondary filters and Novo Projeto button on mobile */
    .crm-dev-filter-bar .crm-dev-filter-search-wrap,
    .crm-dev-filter-bar .crm-dev-filter-sort,
    .crm-dev-filter-bar .crm-dev-filter-reset,
    .crm-dev-new-project-toolbar {
        display: none !important;
    }

    /* Uniform grid for 3 counters */
    .crm-dev-filter-stats {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important;
        width: 100% !important;
        margin-right: 0 !important;
        gap: 8px !important;
        align-items: center;
    }

    .crm-dev-stat-item {
        justify-content: center !important;
        padding: 0 4px !important;
        text-align: center !important;
        height: 38px !important;
    }

    .crm-dev-stat-label {
        font-size: 10px !important;
    }
}

/* ==========================================================================
   WYSIWYG Editor Styles
   ========================================================================== */

.wp-editor-container {
    border: 1px solid var(--crmdev-card-border) !important;
    border-radius: var(--crmdev-radius-sm) !important;
    background: var(--crmdev-bg) !important;
    overflow: hidden;
}

.wp-editor-tabs {
    background: var(--crmdev-card-bg) !important;
    border-bottom: 1px solid var(--crmdev-card-border) !important;
    padding: 5px 10px 0 !important;
}

.wp-switch-editor {
    background: transparent !important;
    border: 1px solid transparent !important;
    color: var(--crmdev-text-secondary) !important;
    margin: 0 4px -1px 0 !important;
    font-size: 11px !important;
    text-transform: uppercase;
    font-weight: 600 !important;
    height: 28px !important;
}

.tmce-active .switch-tmce,
.html-active .switch-html {
    background: var(--crmdev-bg) !important;
    border-color: var(--crmdev-card-border) !important;
    border-bottom-color: var(--crmdev-bg) !important;
    color: var(--crmdev-cyan) !important;
}

.quicktags-toolbar,
.mce-toolbar-grp {
    background: var(--crmdev-card-bg) !important;
    border-bottom: 1px solid var(--crmdev-card-border) !important;
}

.mce-btn button {
    color: var(--crmdev-text) !important;
}

.mce-btn:hover,
.mce-btn.mce-active,
.mce-btn:focus {
    background: var(--crmdev-cyan-dim) !important;
}

.mce-panel {
    background: var(--crmdev-bg) !important;
    border-color: var(--crmdev-card-border) !important;
}

.mce-edit-area iframe {
    background: #ffffff !important;
    border-radius: 0 0 var(--crmdev-radius-sm) var(--crmdev-radius-sm);
}

.mce-floatpanel {
    z-index: 1000001 !important;
}

/* ==========================================================================
   Atenção Alert Icon & Toggle
   ========================================================================== */

.crm-dev-alert-icon {
    color: #ff4d4d;
    font-size: 12px;
    flex-shrink: 0;
    animation: crm-dev-pulse-alert 2s ease-in-out infinite;
}

@keyframes crm-dev-pulse-alert {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.crm-dev-atencao-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: 1px solid var(--crmdev-card-border);
    border-radius: 6px;
    background: transparent;
    cursor: pointer;
    transition: all var(--crmdev-transition);
    font-size: 14px;
}

.crm-dev-atencao-toggle:hover {
    border-color: #ff4d4d;
    background: rgba(255, 77, 77, 0.1);
    box-shadow: 0 0 10px rgba(255, 77, 77, 0.3);
}

.crm-dev-atencao-toggle--active {
    border-color: #ff4d4d;
    background: rgba(255, 77, 77, 0.15);
    box-shadow: 0 0 8px rgba(255, 77, 77, 0.2);
}