/* FlowCRM - Global Stylesheet */
/* Gebaseerd op NiceDash kleurenschema, aan te passen naar MW huisstijl */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

/* ============================================
   CSS VARIABELEN
   ============================================ */
:root {
    /* Primaire kleuren */
    --color-primary:        #1a7a4a;
    --color-primary-dark:   #145f39;
    --color-primary-light:  #e8f5ee;
    --color-accent:         #a8e063;

    /* Neutrale kleuren */
    --color-bg:             #f4f6f9;
    --color-surface:        #ffffff;
    --color-border:         #e5e9f0;
    --color-text:           #1e293b;
    --color-text-muted:     #6b7280;
    --color-text-light:     #94a3b8;

    /* Status kleuren */
    --color-success:        #16a34a;
    --color-success-bg:     #dcfce7;
    --color-warning:        #d97706;
    --color-warning-bg:     #fef3c7;
    --color-danger:         #dc2626;
    --color-danger-bg:      #fee2e2;
    --color-info:           #2563eb;
    --color-info-bg:        #dbeafe;

    /* Typografie */
    --font-family:          'Plus Jakarta Sans', sans-serif;
    --font-size-xs:         11px;
    --font-size-sm:         13px;
    --font-size-base:       14px;
    --font-size-md:         15px;
    --font-size-lg:         18px;
    --font-size-xl:         22px;
    --font-size-2xl:        28px;

    /* Spacing */
    --spacing-xs:           4px;
    --spacing-sm:           8px;
    --spacing-md:           16px;
    --spacing-lg:           24px;
    --spacing-xl:           32px;

    /* Layout */
    --header-height:        60px;
    --content-padding:      var(--spacing-xl);

    /* Schaduwen */
    --shadow-sm:            0 1px 4px rgba(0, 0, 0, 0.06);
    --shadow-md:            0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg:            0 8px 24px rgba(0, 0, 0, 0.10);

    /* Border radius */
    --radius-sm:            6px;
    --radius-md:            8px;
    --radius-lg:            12px;
    --radius-full:          999px;

    /* Transities */
    --transition:           0.18s ease;
}

/* ============================================
   RESET & BASIS
   ============================================ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
}

body {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    color: var(--color-text);
    background: var(--color-bg);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: var(--color-primary-dark);
}

/* ============================================
   LAYOUT
   ============================================ */
.page-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.page-content {
    padding: var(--content-padding);
    flex: 1;
}

.page-title {
    font-size: var(--font-size-xl);
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: var(--spacing-lg);
}

/* ============================================
   HEADER
   ============================================ */
.header {
    height: var(--header-height);
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    padding: 0 var(--spacing-xl);
    gap: var(--spacing-xl);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.header-logo {
    font-size: var(--font-size-lg);
    font-weight: 700;
    color: var(--color-primary);
    white-space: nowrap;
    letter-spacing: -0.3px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
}

.header-logo:hover {
    opacity: 0.85;
}

.header-nav {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    flex: 1;
}

.header-nav a {
    padding: 7px 14px;
    border-radius: var(--radius-md);
    font-size: var(--font-size-sm);
    font-weight: 500;
    color: var(--color-text-muted);
    transition: all var(--transition);
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 7px;
}

.header-nav a svg {
    flex-shrink: 0;
    opacity: 0.6;
    transition: opacity var(--transition);
}

.header-nav a:hover {
    color: var(--color-text);
    background: var(--color-bg);
}

.header-nav a:hover svg {
    opacity: 1;
}

.header-nav a.active {
    color: #ffffff;
    background: var(--color-primary);
    font-weight: 600;
}

.header-nav a.active svg {
    opacity: 1;
    stroke: #ffffff;
}

.header-right {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    margin-left: auto;
}

.header-user {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
}

.header-avatar {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    background: var(--color-primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-size-xs);
    font-weight: 700;
    text-transform: uppercase;
}

.header-logout {
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    transition: all var(--transition);
}

.header-logout:hover {
    color: var(--color-danger);
    background: var(--color-danger-bg);
}

/* ============================================
   KAARTEN
   ============================================ */
.card {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-border);
}

/* ============================================
   STAT KAARTEN
   ============================================ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-xl);
}

.stat-card {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-border);
}

.stat-label {
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: #222222;
    margin-bottom: var(--spacing-sm);
}

.stat-value {
    font-size: var(--font-size-2xl);
    font-weight: 700;
    color: var(--color-text);
    line-height: 1.1;
}

.stat-sub {
    font-size: var(--font-size-xs);
    color: var(--color-text-light);
    margin-top: var(--spacing-xs);
}

/* ============================================
   BADGES & LABELS
   ============================================ */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 10px;
    border-radius: var(--radius-full);
    font-size: var(--font-size-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.badge-role       { background: var(--color-info-bg);    color: var(--color-info); }
.badge-success    { background: var(--color-success-bg); color: var(--color-success); }
.badge-warning    { background: var(--color-warning-bg); color: var(--color-warning); }
.badge-danger     { background: var(--color-danger-bg);  color: var(--color-danger); }
.badge-primary    { background: var(--color-primary-light); color: var(--color-primary); }

/* ============================================
   KNOPPEN
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: 8px 18px;
    border-radius: var(--radius-sm);
    font-size: var(--font-size-sm);
    font-weight: 600;
    font-family: var(--font-family);
    cursor: pointer;
    border: none;
    transition: all var(--transition);
    text-decoration: none;
    line-height: 1;
}

.btn-primary {
    background: var(--color-primary);
    color: #fff;
}

.btn-primary:hover {
    background: var(--color-primary-dark);
    color: #fff;
}

.btn-outline {
    background: transparent;
    color: var(--color-primary);
    border: 1px solid var(--color-primary);
}

.btn-outline:hover {
    background: var(--color-primary-light);
}

.btn-danger {
    background: var(--color-danger-bg);
    color: var(--color-danger);
}

.btn-danger:hover {
    background: var(--color-danger);
    color: #fff;
}

/* ============================================
   TABELLEN
   ============================================ */
.table-wrapper {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--font-size-sm);
}

thead th {
    text-align: left;
    padding: var(--spacing-sm) var(--spacing-md);
    font-size: var(--font-size-xs);
    font-weight: 600;
    color: var(--color-text-muted);
    border-bottom: 1px solid var(--color-border);
}

tbody td {
    padding: var(--spacing-md);
    border-bottom: 1px solid var(--color-border);
    color: var(--color-text);
    vertical-align: middle;
}

tbody tr:last-child td {
    border-bottom: none;
}

tbody tr:hover {
    background: var(--color-bg);
}

/* ============================================
   FORMULIEREN
   ============================================ */
.form-group {
    margin-bottom: var(--spacing-md);
}

label {
    display: block;
    font-size: var(--font-size-sm);
    font-weight: 500;
    color: var(--color-text);
    margin-bottom: 6px;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="search"],
select,
textarea {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-size: var(--font-size-base);
    font-family: var(--font-family);
    color: var(--color-text);
    background: var(--color-surface);
    transition: border-color var(--transition), box-shadow var(--transition);
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(26, 122, 74, 0.12);
}

input[type="date"],
input[type="datetime-local"] {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Crect x='3' y='4' width='18' height='18' rx='2'/%3E%3Cline x1='16' y1='2' x2='16' y2='6'/%3E%3Cline x1='8' y1='2' x2='8' y2='6'/%3E%3Cline x1='3' y1='10' x2='21' y2='10'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 36px;
}

input[type="date"]::-webkit-calendar-picker-indicator,
input[type="datetime-local"]::-webkit-calendar-picker-indicator {
    opacity: 0;
    cursor: pointer;
    margin-left: -24px;
    width: 24px;
    height: 24px;
}

/* Bedrag wrapper */
.amount-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}
.amount-wrapper .euro-prefix {
    position: absolute;
    left: 12px;
    color: var(--color-text-muted);
    font-size: var(--font-size-base);
    pointer-events: none;
    z-index: 1;
}
.amount-wrapper input[type="number"],
.amount-wrapper input[type="text"] {
    padding-left: 26px;
    width: 100%;
}

/* ============================================
   ALERTS / MELDINGEN
   ============================================ */
.alert {
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-size: var(--font-size-sm);
    margin-bottom: var(--spacing-md);
}

.alert-error   { background: var(--color-danger-bg);  color: var(--color-danger);  border: 1px solid #fecaca; }
.alert-success { background: var(--color-success-bg); color: var(--color-success); border: 1px solid #bbf7d0; }
.alert-warning { background: var(--color-warning-bg); color: var(--color-warning); border: 1px solid #fde68a; }

/* ============================================
   UTILITIES
   ============================================ */
.text-muted   { color: var(--color-text-muted); }
.text-sm      { font-size: var(--font-size-sm); }
.text-xs      { font-size: var(--font-size-xs); }
.mt-sm        { margin-top: var(--spacing-sm); }
.mt-md        { margin-top: var(--spacing-md); }
.mt-lg        { margin-top: var(--spacing-lg); }
.mb-md        { margin-bottom: var(--spacing-md); }
.mb-lg        { margin-bottom: var(--spacing-lg); }
.flex         { display: flex; }
.flex-center  { display: flex; align-items: center; }
.gap-sm       { gap: var(--spacing-sm); }
.gap-md       { gap: var(--spacing-md); }
.justify-between { justify-content: space-between; }


/* ============================================
   PIPELINE
   ============================================ */

        .pipeline-wrapper {
            overflow-x: auto;
            padding-bottom: var(--spacing-lg);
        }

        .pipeline-board {
            display: flex;
            gap: var(--spacing-md);
            min-width: max-content;
            align-items: flex-start;
        }

        .pipeline-column {
            width: 280px;
            flex-shrink: 0;
            background: var(--col-bg, #f1f5f9);
            border-radius: var(--radius-lg);
            border: 1px solid var(--col-border, var(--color-border));
            display: flex;
            flex-direction: column;
        }

        .column-header {
            padding: 12px var(--spacing-md);
            border-bottom: 1px solid var(--col-border, var(--color-border));
            border-radius: var(--radius-lg) var(--radius-lg) 0 0;
        }

        .column-title {
            display: flex;
            align-items: center;
            gap: var(--spacing-sm);
            font-size: var(--font-size-sm);
            font-weight: 700;
            color: var(--color-text);
            margin-bottom: 4px;
        }

        .column-dot {
            width: 10px;
            height: 10px;
            border-radius: 50%;
            flex-shrink: 0;
        }

        .column-meta {
            display: flex;
            justify-content: space-between;
            font-size: var(--font-size-xs);
            color: var(--color-text-muted);
        }

        .column-cards {
            padding: var(--spacing-sm);
            display: flex;
            flex-direction: column;
            gap: var(--spacing-sm);
            min-height: 80px;
        }

        /* Kaart */
        .opp-card {
            background: #ffffff;
            border-radius: var(--radius-md);
            padding: var(--spacing-md);
            border: 1px solid rgba(0,0,0,0.06);
            box-shadow: 0 1px 3px rgba(0,0,0,0.06);
            transition: box-shadow var(--transition), transform var(--transition);
            cursor: pointer;
            text-decoration: none;
            display: block;
            color: inherit;
        }

        .opp-card:hover {
            box-shadow: var(--shadow-md);
            transform: translateY(-1px);
            color: inherit;
        }

        .opp-name {
            font-size: var(--font-size-sm);
            font-weight: 600;
            color: var(--color-text);
            margin-bottom: 2px;
            line-height: 1.3;
        }

        .opp-account {
            font-size: var(--font-size-xs);
            color: var(--color-text-muted);
            margin-bottom: var(--spacing-sm);
        }

        .opp-amount {
            font-size: var(--font-size-md);
            font-weight: 700;
            color: var(--color-primary);
            margin-bottom: var(--spacing-sm);
        }

        .opp-meta {
            display: flex;
            flex-direction: column;
            gap: 3px;
            font-size: var(--font-size-xs);
            color: var(--color-text-muted);
        }

        .opp-meta-row {
            display: flex;
            align-items: center;
            gap: 5px;
        }

        .opp-meta-row svg {
            flex-shrink: 0;
            opacity: 0.5;
        }

        .days-badge {
            display: inline-block;
            padding: 1px 7px;
            border-radius: var(--radius-full);
            font-size: var(--font-size-xs);
            font-weight: 600;
            background: var(--color-bg);
            color: var(--color-text-muted);
            border: 1px solid var(--color-border);
        }

        .days-badge.warning { background: var(--color-warning-bg); color: var(--color-warning); border-color: #fde68a; }
        .days-badge.danger  { background: var(--color-danger-bg);  color: var(--color-danger);  border-color: #fecaca; }

        .close-date         { font-size: var(--font-size-xs); color: var(--color-text-muted); }
        .close-date.soon    { color: var(--color-warning); font-weight: 600; }
        .close-date.overdue { color: var(--color-danger);  font-weight: 600; }

        .badge-source {
            display: inline-block;
            padding: 1px 7px;
            border-radius: var(--radius-full);
            font-size: var(--font-size-xs);
            font-weight: 600;
            white-space: nowrap;
        }

        .owner-toggle {
            display: flex;
            align-items: center;
            background: var(--color-bg);
            border: 1px solid var(--color-border);
            border-radius: var(--radius-full);
            padding: 3px;
            gap: 2px;
        }

        .owner-toggle button {
            padding: 5px 14px;
            border-radius: var(--radius-full);
            border: none;
            background: transparent;
            font-size: var(--font-size-sm);
            font-weight: 500;
            color: var(--color-text-muted);
            cursor: pointer;
            transition: all var(--transition);
            font-family: var(--font-family);
            white-space: nowrap;
        }

        .owner-toggle button.active {
            background: var(--color-surface);
            color: var(--color-text);
            font-weight: 600;
            box-shadow: var(--shadow-sm);
        }

        .owner-toggle {
            display: flex;
            align-items: center;
            background: var(--color-bg);
            border: 1px solid var(--color-border);
            border-radius: var(--radius-full);
            padding: 3px;
            gap: 2px;
        }
        .owner-toggle button {
            padding: 5px 14px;
            border-radius: var(--radius-full);
            border: none;
            background: transparent;
            font-size: var(--font-size-sm);
            font-weight: 500;
            color: var(--color-text-muted);
            cursor: pointer;
            transition: all var(--transition);
            font-family: var(--font-family);
            white-space: nowrap;
        }
        .owner-toggle button.active {
            background: var(--color-surface);
            color: var(--color-text);
            font-weight: 600;
            box-shadow: var(--shadow-sm);
        }

        .empty-column {
            padding: var(--spacing-md);
            text-align: center;
            color: var(--color-text-light);
            font-size: var(--font-size-xs);
        }

        /* Toolbar */
        .pipeline-toolbar {
            display: flex;
            align-items: center;
            gap: var(--spacing-md);
            margin-bottom: var(--spacing-lg);
            flex-wrap: wrap;
        }

        .pipeline-toolbar input[type="search"] {
            width: 240px;
            margin: 0;
        }



        /* Datum inputs */
        input[type="date"],
        input[type="datetime-local"] {
            appearance: none;
            -webkit-appearance: none;
            background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Crect x='3' y='4' width='18' height='18' rx='2'/%3E%3Cline x1='16' y1='2' x2='16' y2='6'/%3E%3Cline x1='8' y1='2' x2='8' y2='6'/%3E%3Cline x1='3' y1='10' x2='21' y2='10'/%3E%3C/svg%3E");
            background-repeat: no-repeat;
            background-position: right 10px center;
            padding-right: 36px;
        }
        input[type="date"]::-webkit-calendar-picker-indicator,
        input[type="datetime-local"]::-webkit-calendar-picker-indicator {
            opacity: 0;
            cursor: pointer;
            margin-left: -24px;
            width: 24px;
            height: 24px;
        }

        /* Drag & Drop */
        .opp-card {
            cursor: grab;
        }
        .opp-card:active {
            cursor: grabbing;
        }
        .opp-card.dragging {
            opacity: 0.4;
            transform: rotate(1deg);
        }
        .dropzone.drag-over {
            background: var(--color-primary-light);
            border-color: var(--color-primary);
        }
        .dropzone.drag-over .column-cards {
            min-height: 120px;
        }

        /* Modal */
        .modal-overlay {
            display: none;
            position: fixed;
            inset: 0;
            background: rgba(0,0,0,0.45);
            z-index: 1000;
            align-items: flex-start;
            justify-content: center;
            padding: 40px 20px;
            overflow-y: auto;
        }
        .modal-overlay.open {
            display: flex;
        }
        .modal {
            background: var(--color-surface);
            border-radius: var(--radius-lg);
            width: 100%;
            max-width: 680px;
            box-shadow: var(--shadow-lg);
            animation: modalIn 0.18s ease;
        }
        @keyframes modalIn {
            from { opacity: 0; transform: translateY(-12px); }
            to   { opacity: 1; transform: translateY(0); }
        }
        .modal-header {
            display: flex;
            align-items: flex-start;
            justify-content: space-between;
            padding: var(--spacing-lg);
            border-bottom: 1px solid var(--color-border);
            gap: var(--spacing-md);
        }
        .modal-title {
            font-size: var(--font-size-lg);
            font-weight: 700;
            color: var(--color-text);
        }
        .modal-subtitle {
            font-size: var(--font-size-sm);
            color: var(--color-text-muted);
            margin-top: 2px;
        }
        .modal-close {
            background: none;
            border: none;
            font-size: 22px;
            color: var(--color-text-muted);
            cursor: pointer;
            padding: 0 4px;
            line-height: 1;
            flex-shrink: 0;
        }
        .modal-close:hover { color: var(--color-text); }
        .modal-body {
            padding: var(--spacing-lg);
        }
        .modal-footer {
            padding: var(--spacing-md) var(--spacing-lg);
            border-top: 1px solid var(--color-border);
            display: flex;
            justify-content: space-between;
            align-items: center;
            gap: var(--spacing-sm);
        }
        .modal-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: var(--spacing-md);
            margin-bottom: var(--spacing-md);
        }
        .modal-grid .full-width {
            grid-column: 1 / -1;
        }
        .modal-label {
            font-size: var(--font-size-xs);
            font-weight: 600;
            color: var(--color-text-muted);
            text-transform: uppercase;
            letter-spacing: 0.05em;
            margin-bottom: 4px;
        }
        .modal-value {
            font-size: var(--font-size-sm);
            color: var(--color-text);
        }
        .modal-loading {
            text-align: center;
            padding: 48px;
            color: var(--color-text-muted);
            font-size: var(--font-size-sm);
        }
        .modal-section-title {
            font-size: var(--font-size-sm);
            font-weight: 700;
            color: var(--color-text);
            margin: var(--spacing-lg) 0 var(--spacing-sm);
            padding-bottom: var(--spacing-sm);
            border-bottom: 1px solid var(--color-border);
        }
        .notes-field {
            width: 100%;
            min-height: 120px;
            resize: vertical;
            font-family: var(--font-family);
        }
        .stage-note-box {
            background: var(--color-primary-light);
            border: 1px solid var(--color-primary);
            border-radius: var(--radius-md);
            padding: var(--spacing-md);
            margin-bottom: var(--spacing-md);
        }
        .stage-note-box p {
            font-size: var(--font-size-sm);
            color: var(--color-primary-dark);
            margin-bottom: var(--spacing-sm);
            font-weight: 500;
        }
        .save-indicator {
            font-size: var(--font-size-xs);
            color: var(--color-success);
            display: none;
        }
    
/* ============================================
   PIPELINE UTILITIES
   ============================================ */
.mb-0                { margin-bottom: 0; }
.pipeline-stats-bar  { display: flex; align-items: center; gap: var(--spacing-sm); margin-left: auto; flex-wrap: wrap; }
.pipeline-stat-label { font-size: var(--font-size-xs); color: var(--color-text-muted); }
.pipeline-overdue-badge {
    display: inline-flex; align-items: center; gap: 5px;
    background: #fee2e2; color: #dc2626;
    font-size: var(--font-size-xs); font-weight: 600;
    padding: 3px 10px; border-radius: var(--radius-full);
}
.modal-sm           { max-width: 460px; }
.note-textarea-sm   { min-height: 80px; }
.opp-badges-row     { margin-top: 4px; flex-wrap: wrap; gap: 4px; }

/* ============================================
   PIPELINE ALERT BALK
   ============================================ */
.pipeline-alert {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-radius: var(--radius-lg);
    margin-bottom: var(--spacing-md);
    gap: var(--spacing-md);
    background: var(--color-primary);
    border: 1px solid var(--color-primary-dark);
}

.pipeline-alert-urgent,
.pipeline-alert-info {
    background: var(--color-primary);
    border-color: var(--color-primary-dark);
}

.pipeline-alert-left {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    flex-wrap: wrap;
}

.pipeline-alert-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #f87171;
    flex-shrink: 0;
    margin-top: 4px;
    animation: pulse 2s infinite;
}

.pipeline-alert-info .pipeline-alert-dot {
    background: rgba(255,255,255,0.6);
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.4; }
}

.pipeline-alert-label {
    font-size: var(--font-size-xs);
    font-weight: 700;
    color: rgba(255,255,255,0.6);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.pipeline-alert-sep {
    color: rgba(255,255,255,0.3);
    font-size: var(--font-size-xs);
}

.pipeline-alert-text {
    font-size: var(--font-size-sm);
    font-weight: 500;
    color: #fff;
}

.pipeline-alert-text strong {
    font-weight: 700;
    color: #a3e635;
}

.pipeline-alert-btn {
    flex-shrink: 0;
    background: rgba(163,230,53,0.15);
    color: #a3e635;
    border: 1px solid rgba(163,230,53,0.3);
    padding: 6px 16px;
    border-radius: var(--radius-full);
    font-size: var(--font-size-xs);
    font-weight: 600;
    text-decoration: none;
    transition: all var(--transition);
    white-space: nowrap;
}

.pipeline-alert-btn:hover {
    background: rgba(163,230,53,0.25);
    color: #a3e635;
}

.pipeline-search-card {
    padding: var(--spacing-md) var(--spacing-lg);
    margin-top: 20px;
    margin-bottom: var(--spacing-md);
}

.pipeline-search-card .pipeline-toolbar {
    margin-bottom: 0;
}

.pipeline-alert-left {
    gap: 12px;
}

.pipeline-alert-label {
    font-size: var(--font-size-xs);
    font-weight: 700;
    color: rgba(255,255,255,0.75);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 2px;
}

/* ============================================
   GLOBALE MODAL STYLES
   ============================================ */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 1000;
    align-items: flex-start;
    justify-content: center;
    padding: 60px 20px;
    overflow-y: auto;
}
.modal-overlay.open { display: flex; }
.modal {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 500px;
    box-shadow: var(--shadow-lg);
}
.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-lg);
    border-bottom: 1px solid var(--color-border);
}
.modal-title { font-size: var(--font-size-md); font-weight: 700; }
.modal-close { background: none; border: none; font-size: 20px; cursor: pointer; color: var(--color-text-muted); }
.modal-body  { padding: var(--spacing-lg); }
.modal-footer {
    padding: var(--spacing-md) var(--spacing-lg);
    border-top: 1px solid var(--color-border);
    display: flex;
    justify-content: flex-end;
    gap: var(--spacing-sm);
}

/* ============================================
   DATE PICKER
   ============================================ */
.datepicker-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.datepicker-input {
    flex: 1;
    padding-right: 36px !important;
    cursor: pointer;
}

.datepicker-icon {
    position: absolute;
    right: 10px;
    color: var(--color-text-muted);
    cursor: pointer;
    pointer-events: none;
}

.datepicker-popup {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    z-index: 500;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 12px;
    min-width: 280px;
    user-select: none;
}

.datepicker-popup.open { display: block; }

.dp-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.dp-nav {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-text-muted);
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    font-size: 16px;
    line-height: 1;
    transition: all var(--transition);
}

.dp-nav:hover { background: var(--color-bg); color: var(--color-text); }

.dp-month-year {
    font-weight: 700;
    font-size: var(--font-size-sm);
    color: var(--color-text);
}

.dp-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}

.dp-day-name {
    text-align: center;
    font-size: 10px;
    font-weight: 600;
    color: var(--color-text-muted);
    padding: 4px 0;
}

.dp-day {
    text-align: center;
    font-size: 12px;
    padding: 6px 4px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    color: var(--color-text);
    transition: all var(--transition);
}

.dp-day:hover { background: var(--color-primary-light); color: var(--color-primary); }
.dp-day.today { font-weight: 700; color: var(--color-primary); }
.dp-day.selected { background: var(--color-primary); color: #fff; }
.dp-day.other-month { color: var(--color-text-muted); opacity: 0.4; }
.dp-day.empty { cursor: default; }
.dp-day.empty:hover { background: none; }
