/* =============================================================================
   ZINGLE CALL CENTER - PROFESSIONAL THEME v3.0
   Clean, consolidated, modern design system
   =============================================================================
   Sections:
   1.  Google Font Import
   2.  CSS Variables
   3.  Reset & Base
   4.  Typography
   5.  Admin Layout (header + iframe)
   6.  Top Navigation & Dropdowns
   7.  User Profile Dropdown
   8.  Module Page Layout (loaded in iframe)
   9.  Tables
   10. Forms
   11. Buttons
   12. Action Icons in Tables
   13. Status Badges
   14. Realtime Dashboard Cards
   15. Pagination
   16. Search Bar
   17. Alert Boxes
   18. Fieldsets
   19. Scrollbar
   20. Login Page
   21. Utility Classes
   22. Responsive / Print
   =============================================================================
*/

/* --------------------------------------------------------------------------
   1. Google Font Import
   -------------------------------------------------------------------------- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

/* --------------------------------------------------------------------------
   2. CSS Variables
   -------------------------------------------------------------------------- */
:root {
    --primary:         #4F46E5;
    --primary-dark:    #3730A3;
    --primary-light:   #818CF8;
    --primary-bg:      #EEF2FF;
    --secondary:       #64748B;
    --success:         #10B981;
    --success-bg:      #DCFCE7;
    --danger:          #EF4444;
    --danger-bg:       #FEE2E2;
    --warning:         #F59E0B;
    --warning-bg:      #FEF9C3;
    --info:            #3B82F6;
    --info-bg:         #DBEAFE;
    --bg:              #F1F5F9;
    --surface:         #FFFFFF;
    --border:          #E2E8F0;
    --text:            #1E293B;
    --text-muted:      #64748B;
    --text-light:      #94A3B8;
    --radius:          8px;
    --radius-lg:       12px;
    --radius-xl:       16px;
    --radius-pill:     9999px;
    --shadow:          0 1px 3px rgba(0,0,0,0.10), 0 1px 2px rgba(0,0,0,0.06);
    --shadow-md:       0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.06);
    --shadow-lg:       0 10px 15px rgba(0,0,0,0.08), 0 4px 6px rgba(0,0,0,0.06);
    --font-sans:       'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --transition:      150ms ease;
    --header-bg-start: #1e2a5e;
    --header-bg-end:   #2d3f8e;
}

/* --------------------------------------------------------------------------
   3. Reset & Base
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
    font-family: var(--font-sans);
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.5;
    font-size: 14px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

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

/* --------------------------------------------------------------------------
   4. Typography
   -------------------------------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
    color: var(--text);
    font-weight: 700;
    margin-top: 0;
    line-height: 1.25;
}

/* --------------------------------------------------------------------------
   5. Admin Layout (index.php shell — header + iframe)
   -------------------------------------------------------------------------- */
.admin-body {
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
    background-color: var(--bg);
}

.main-content {
    flex: 1;
    overflow: hidden;
    position: relative;
    width: 100%;
}

iframe[name="right"] {
    border: none;
    display: block;
    width: 100%;
    height: 100%;
}

/* Header bar */
.header {
    background: linear-gradient(135deg, var(--header-bg-start) 0%, var(--header-bg-end) 100%);
    height: 58px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1.5rem;
    box-shadow: 0 2px 12px rgba(30,42,94,0.4);
    border-bottom: 1px solid rgba(255,255,255,0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
    color: white;
    flex-shrink: 0;
    overflow: visible;
}

.header-left  { display: flex; align-items: center; overflow: visible; }
.header-right { display: flex; align-items: center; }

.header-center {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    overflow: visible;
}

.logo-link {
    text-decoration: none;
    display: flex;
    align-items: center;
    cursor: pointer;
}

.header-logo-text {
    font-family: var(--font-sans);
    font-weight: 900;
    font-size: 1.4rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    background: linear-gradient(135deg, #ffffff 0%, #c7d2fe 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* --------------------------------------------------------------------------
   6. Top Navigation & Dropdowns
   -------------------------------------------------------------------------- */
.top-nav {
    display: flex;
    align-items: center;
    height: 100%;
    gap: 0.15rem;
    overflow: visible;
}

.top-nav-item {
    color: rgba(255,255,255,0.75);
    padding: 0.45rem 0.9rem;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    cursor: pointer;
    position: relative;
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: all var(--transition);
    overflow: visible;
    white-space: nowrap;
}

/* Invisible hover bridge */
.top-nav-item::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    height: 20px;
    background: transparent;
}

.top-nav-item:hover,
.top-nav-item.active {
    color: white;
    background: rgba(255,255,255,0.12);
}

.top-nav-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    background: white;
    min-width: 200px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.18);
    border-radius: 10px;
    padding: 0.4rem;
    z-index: 2000;
    border: 1px solid rgba(0,0,0,0.06);
    animation: dropdownSlide 0.18s ease-out;
}

.top-nav-dropdown::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 6px solid white;
}

.top-nav-item:hover .top-nav-dropdown {
    display: block;
}

.top-nav-dropdown a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 0.875rem;
    color: #475569;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-radius: 6px;
    text-decoration: none;
    transition: all var(--transition);
}

.top-nav-dropdown a:hover {
    background: var(--primary-bg);
    color: var(--primary);
}

@keyframes dropdownSlide {
    from { opacity: 0; transform: translateX(-50%) translateY(-8px); }
    to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* --------------------------------------------------------------------------
   7. User Profile Dropdown
   -------------------------------------------------------------------------- */
.user-profile { position: relative; }

.user-profile-trigger {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 4px 8px 4px 14px;
    border-radius: 20px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
    transition: all var(--transition);
}

.user-profile-trigger:hover {
    background: rgba(255,255,255,0.15);
    border-color: rgba(255,255,255,0.25);
}

.user-details { text-align: right; display: none; }
@media (min-width: 768px) { .user-details { display: block; } }

.user-name {
    font-size: 0.88rem;
    font-weight: 700;
    color: white;
    letter-spacing: 0.04em;
}

.user-avatar {
    width: 34px;
    height: 34px;
    background: linear-gradient(135deg, #818cf8 0%, #6366f1 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 800;
    font-size: 0.9rem;
    border: 2px solid rgba(255,255,255,0.4);
    box-shadow: 0 2px 6px rgba(99,102,241,0.35);
    transition: all var(--transition);
}

.user-avatar:hover { transform: scale(1.1); border-color: white; }

.user-dropdown {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 10px);
    background: white;
    min-width: 220px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.15);
    border-radius: 12px;
    padding: 0.5rem;
    z-index: 99999;
    border: 1px solid var(--border);
    animation: dropdownFade 0.18s ease-out;
}

.user-dropdown::before {
    content: '';
    position: absolute;
    top: -6px;
    right: 20px;
    width: 12px;
    height: 12px;
    background: white;
    transform: rotate(45deg);
    border-left: 1px solid var(--border);
    border-top: 1px solid var(--border);
}

@keyframes dropdownFade {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0.875rem 1rem;
    font-weight: 700;
    font-size: 0.88rem;
    color: var(--text);
    background: #f8fafc;
    border-radius: 8px;
    margin-bottom: 0.4rem;
}

.user-dropdown a {
    display: flex;
    align-items: center;
    padding: 0.65rem 1rem;
    color: #475569;
    font-size: 0.83rem;
    font-weight: 600;
    border-radius: 8px;
    text-decoration: none;
    transition: all var(--transition);
    text-transform: none;
    margin: 0.15rem 0.25rem;
}

.user-dropdown a i {
    width: 18px;
    text-align: center;
    margin-right: 8px;
    color: #94a3b8;
    transition: color var(--transition);
    font-size: 0.9rem;
}

.user-dropdown a:hover { background: var(--primary-bg); color: var(--primary); }
.user-dropdown a:hover i { color: var(--primary); }

/* --------------------------------------------------------------------------
   8. Module Page Layout (inside iframe)
   -------------------------------------------------------------------------- */
.layout-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: var(--bg);
}

.layout-header {
    background: white;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
    box-shadow: var(--shadow);
}

.layout-body {
    flex: 1;
    padding: 1.25rem 1.5rem;
    overflow-y: auto;
}

/* Dashboard header card (top of each module page) */
.dashboard-header {
    background: white;
    padding: 0.875rem 1.25rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    margin-bottom: 1.25rem;
    border: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dashboard-title {
    font-size: 1rem;
    font-weight: 800;
    color: var(--text);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dashboard-title i { color: var(--primary); font-size: 1.1rem; }

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
}

.page-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--header-bg-start);
    margin: 0;
}

.page-actions { display: flex; gap: 0.5rem; align-items: center; }

/* --------------------------------------------------------------------------
   9. Tables
   -------------------------------------------------------------------------- */
.table-container {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    overflow-x: auto;
    overflow-y: hidden;
    margin-bottom: 1.25rem;
}

/* Embedded table inside a form (e.g. Lists in Campaign) */
.form-content .overflow-x-auto {
    overflow-x: auto !important;
    max-width: 100%;
}
.form-content .overflow-x-auto table,
.form-content .overflow-x-auto table.INBOX {
    min-width: 1100px;
}

table, table.INBOX, .INBOX {
    width: 100%;
    border-collapse: collapse;
    background: white;
    font-size: 0.83rem;
}

/* Dark gradient header row */
table.INBOX thead,
table.INBOX thead tr,
.INBOX thead tr,
thead {
    background: linear-gradient(135deg, var(--header-bg-start) 0%, var(--header-bg-end) 100%);
}

/* Campaign group sub-header (bg-gray-100 thead) — keep subtle bg, force white text on td */
table.INBOX thead.bg-gray-100,
table.INBOX thead.bg-gray-100 tr {
    background: rgba(255,255,255,0.10);
}
table.INBOX thead.bg-gray-100 td {
    color: rgba(255,255,255,0.92);
    font-weight: 600;
}

table.INBOX thead th,
.INBOX thead tr th,
.INBOX tr.header th,
thead th {
    background: transparent;
    color: rgba(255,255,255,0.92);
    padding: 0.75rem 1rem;
    text-align: left;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    white-space: nowrap;
    border-bottom: none;
    border-right: none;
}

table.INBOX thead th:last-child,
.INBOX thead tr th:last-child { text-align: center; }

/* Body rows */
table.INBOX tbody tr,
.INBOX tbody tr,
tbody tr { border-bottom: 1px solid #f1f5f9; transition: background var(--transition); }

table.INBOX tbody tr:nth-child(even),
.INBOX tbody tr:nth-child(even) { background: #f8fafc; }

table.INBOX tbody tr:nth-child(odd),
.INBOX tbody tr:nth-child(odd) { background: white; }

table.INBOX tbody tr:hover,
.INBOX tbody tr:hover,
tbody tr:hover { background: var(--primary-bg) !important; }
thead tr:hover { background: inherit !important; }

table.INBOX tbody tr:last-child,
.INBOX tbody tr:last-child { border-bottom: none; }

table.INBOX tbody td,
.INBOX tbody tr td,
.INBOX tr td,
td {
    padding: 0.7rem 1rem;
    color: var(--text);
    font-size: 0.83rem;
    vertical-align: middle;
    text-align: left;
    border-right: none;
    border-bottom: 1px solid #f1f5f9;
}

table.INBOX tbody td:last-child,
td:last-child { text-align: center; }

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

.no-records {
    padding: 3rem 2rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.88rem;
    font-style: italic;
    background: white;
}

/* --------------------------------------------------------------------------
   10. Forms
   -------------------------------------------------------------------------- */
.form-container {
    max-width: 960px;
    margin: 1.5rem auto;
    background: white;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
    overflow: visible;
}

.form-header {
    background: linear-gradient(135deg, var(--header-bg-start) 0%, var(--header-bg-end) 100%);
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.form-header h3,
.form-header .text-xl {
    color: white;
    font-size: 0.9rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin: 0;
}

.form-content { padding: 1.75rem 2rem; }

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem 2rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-bottom: 0.25rem;
}

.form-group.full-width  { grid-column: span 2; }
.form-group.half-width  { grid-column: span 1; }

.form-group label,
.form-group .block {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin-bottom: 0.2rem;
    display: block;
}

.form-group label.required::after { content: " *"; color: var(--danger); }

/* All form inputs */
.form-control,
input[type="text"],
input[type="password"],
input[type="number"],
input[type="email"],
input[type="date"],
input[type="datetime-local"],
select,
textarea {
    width: 100%;
    padding: 0.55rem 0.875rem;
    border: 1.5px solid #d1d5db;
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-family: var(--font-sans);
    background: white;
    color: var(--text);
    transition: border-color var(--transition), box-shadow var(--transition);
    box-sizing: border-box;
    outline: none;
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
input[type="email"]:focus,
input[type="date"]:focus,
input[type="datetime-local"]:focus,
select:focus,
textarea:focus,
.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79,70,229,0.12);
    background: white;
}

/* Custom select arrow */
select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.6rem center;
    background-repeat: no-repeat;
    background-size: 1.2em 1.2em;
    padding-right: 2.25rem;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

/* Form select alias */
.form-select {
    display: block;
    width: 100%;
    padding: 0.55rem 2.25rem 0.55rem 0.875rem;
    font-size: 0.875rem;
    color: var(--text);
    background-color: white;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.6rem center;
    background-repeat: no-repeat;
    background-size: 1.2em 1.2em;
    border: 1.5px solid #d1d5db;
    border-radius: var(--radius);
    appearance: none;
    -webkit-appearance: none;
    outline: none;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79,70,229,0.12);
}

.form-actions {
    margin-top: 1.5rem;
    padding: 1.25rem 2rem;
    border-top: 1px solid var(--border);
    background: #f8fafc;
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    align-items: center;
}

/* Fieldset */
fieldset {
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
    background: #fcfcfe;
}

legend {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--primary);
    padding: 0 0.5rem;
    background: white;
    border-radius: 4px;
}

.form-fieldset {
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
    margin-top: 1rem;
    background: #fcfcfe;
}

.form-fieldset legend {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--primary);
    padding: 0 0.5rem;
    background: white;
    border-radius: 4px;
}

/* Error text */
.error-text { color: var(--danger); font-size: 0.72rem; margin-top: 0.2rem; }
.error-message { background: #FEF2F2; border: 1px solid #fecaca; color: #991B1B; border-radius: var(--radius); padding: 0.875rem 1.25rem; font-size: 0.875rem; font-weight: 500; margin-bottom: 1.5rem; display: flex; align-items: center; gap: 0.5rem; }
.success-message { background: #F0FDF4; border: 1px solid #bbf7d0; color: #166534; border-radius: var(--radius); padding: 0.875rem 1.25rem; font-size: 0.875rem; font-weight: 500; margin-bottom: 1.5rem; display: flex; align-items: center; gap: 0.5rem; }

/* --------------------------------------------------------------------------
   11. Buttons
   -------------------------------------------------------------------------- */
.btn,
input[type="submit"],
input[type="button"],
button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.5rem 1.1rem;
    border: none;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    font-family: var(--font-sans);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    transition: all var(--transition);
    user-select: none;
    -webkit-user-select: none;
    background: linear-gradient(135deg, #4F46E5 0%, #3730A3 100%);
    color: white;
    box-shadow: 0 2px 4px rgba(79,70,229,0.2);
}

button:hover,
input[type="submit"]:hover,
input[type="button"]:hover {
    background: linear-gradient(135deg, #4338CA 0%, #312E81 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(79,70,229,0.3);
    color: white;
}

button:active, input[type="submit"]:active, .btn:active { transform: translateY(0); }

/* Primary */
.btn-primary,
input[type="submit"].btn-primary,
input[type="button"].btn-primary {
    background: linear-gradient(135deg, #4F46E5 0%, #3730A3 100%);
    color: white;
    box-shadow: 0 2px 4px rgba(79,70,229,0.25);
    border: none;
}

.btn-primary:hover,
input[type="submit"].btn-primary:hover,
input[type="button"].btn-primary:hover {
    background: linear-gradient(135deg, #4338CA 0%, #312E81 100%);
    box-shadow: 0 4px 8px rgba(79,70,229,0.35);
    transform: translateY(-1px);
    color: white;
}

/* Secondary */
.btn-secondary {
    background: white;
    color: var(--text);
    border: 1.5px solid var(--border);
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

.btn-secondary:hover {
    background: #f8fafc;
    border-color: #94a3b8;
    color: var(--primary);
    transform: translateY(-1px);
}

/* Success */
.btn-success {
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
    color: white;
    box-shadow: 0 2px 4px rgba(16,185,129,0.25);
    border: none;
}

.btn-success:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(16,185,129,0.35);
    color: white;
}

/* Danger */
.btn-danger {
    background: linear-gradient(135deg, #EF4444 0%, #DC2626 100%);
    color: white;
    box-shadow: 0 2px 4px rgba(239,68,68,0.25);
    border: none;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #DC2626 0%, #B91C1C 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(239,68,68,0.35);
    color: white;
}

/* Legacy add alias */
.btn-add {
    background: linear-gradient(135deg, #4F46E5 0%, #3730A3 100%);
    color: white;
    box-shadow: 0 2px 4px rgba(79,70,229,0.25);
    text-decoration: none;
    border: none;
}

.btn-add:hover {
    background: linear-gradient(135deg, #4338CA 0%, #312E81 100%);
    color: white;
    transform: translateY(-1px);
}

/* Small */
.btn-sm { padding: 0.35rem 0.7rem; font-size: 0.7rem; }

/* Login */
.btn-login {
    width: 100%;
    padding: 0.875rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.25s;
    box-shadow: 0 4px 6px rgba(99,102,241,0.3);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 0.5rem;
    display: block;
    text-align: center;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px rgba(99,102,241,0.4);
    background: var(--primary-dark);
    color: white;
}

/* Pagination btn */
.btn-pagination {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.875rem;
    background: white;
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.8rem;
    font-weight: 600;
    font-family: var(--font-sans);
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    white-space: nowrap;
}

.btn-pagination:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(79,70,229,0.25);
}

/* --------------------------------------------------------------------------
   12. Action Icons in Tables
   -------------------------------------------------------------------------- */
.action-col,
.action-icons {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.INBOX a, .action-col a, .action-icons a { text-decoration: none; position: relative; }

/* FA icons inside table links */
.INBOX a .fa,
.INBOX a .fas,
.INBOX a .far,
.action-col a .fa,
.action-col a .fas,
.action-icons .fa,
.action-icons .fas {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 6px;
    font-size: 13px;
    transition: all var(--transition);
}

/* Edit */
.fa-pencil-alt, .fa-edit {
    color: #3b82f6;
    background-color: rgba(59,130,246,0.1);
}
.fa-pencil-alt:hover, .fa-edit:hover {
    background-color: #3b82f6;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(59,130,246,0.35);
}

/* Delete */
.fa-trash-alt, .fa-trash {
    color: #ef4444;
    background-color: rgba(239,68,68,0.1);
}
.fa-trash-alt:hover, .fa-trash:hover {
    background-color: #ef4444;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(239,68,68,0.35);
}

/* Phone */
.fa-phone, .fa-phone-volume {
    color: #16a34a;
    background-color: rgba(22,163,74,0.1);
}
.fa-phone:hover, .fa-phone-volume:hover {
    background-color: #16a34a;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(22,163,74,0.35);
}

/* Play */
.fa-play, .fa-play-circle {
    color: #0ea5e9;
    background-color: rgba(14,165,233,0.1);
}
.fa-play:hover, .fa-play-circle:hover {
    background-color: #0ea5e9;
    color: white;
    transform: translateY(-1px);
}

/* Stop */
.fa-stop, .fa-stop-circle {
    color: #f97316;
    background-color: rgba(249,115,22,0.1);
}
.fa-stop:hover, .fa-stop-circle:hover {
    background-color: #f97316;
    color: white;
    transform: translateY(-1px);
}

/* Settings */
.fa-cog, .fa-wrench {
    color: #7c3aed;
    background-color: rgba(124,58,237,0.1);
}
.fa-cog:hover, .fa-wrench:hover {
    background-color: #7c3aed;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(124,58,237,0.35);
}

/* CSS tooltip */
.INBOX i[title] { position: relative; cursor: pointer; }
.INBOX i[title]:hover::after {
    content: attr(title);
    position: absolute;
    bottom: 110%;
    left: 50%;
    transform: translateX(-50%);
    background: #1e293b;
    color: white;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 11px;
    white-space: nowrap;
    z-index: 100;
    pointer-events: none;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    font-family: var(--font-sans);
    font-weight: 500;
}

/* Action btn helpers */
.action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.72rem;
    transition: all var(--transition);
}
.action-edit   { background: #EFF6FF; color: #2563EB; }
.action-edit:hover  { background: #2563EB; color: white; }
.action-delete { background: #FEF2F2; color: #DC2626; }
.action-delete:hover { background: #DC2626; color: white; }
.action-view   { background: #F0FDF4; color: #059669; }
.action-view:hover  { background: #059669; color: white; }

/* Legacy named classes */
.action-btn-edit   { background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%); color: white; border: none; }
.action-btn-delete { background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%); color: white; border: none; }

/* --------------------------------------------------------------------------
   13. Status Badges
   -------------------------------------------------------------------------- */
.badge, .status-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.6rem;
    border-radius: var(--radius-pill);
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    white-space: nowrap;
}

.badge-success,
.status-running,
.badge-running {
    background: var(--success-bg);
    color: #166534;
    border: 1px solid #86efac;
}

.badge-danger,
.status-stopped,
.badge-stopped {
    background: var(--danger-bg);
    color: #991B1B;
    border: 1px solid #fca5a5;
}

.badge-warning {
    background: var(--warning-bg);
    color: #854D0E;
    border: 1px solid #fde68a;
}

.badge-info {
    background: var(--info-bg);
    color: #1E40AF;
    border: 1px solid #93c5fd;
}

.dial-status-badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
}

.dial-status-running {
    background: var(--success-bg);
    color: #16a34a;
    border: 1px solid #86efac;
}

.dial-status-stopped {
    background: #fed7aa;
    color: #ea580c;
    border: 1px solid #fb923c;
}

/* --------------------------------------------------------------------------
   14. Realtime Dashboard Cards
   -------------------------------------------------------------------------- */
.card {
    background: white;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    padding: 1.5rem;
    transition: all var(--transition);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

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

.card-stat {
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    transition: all var(--transition);
    height: 100%;
}

.card-stat:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }

.card-stat::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 5px; height: 100%;
}

.card-new    { background: linear-gradient(135deg, #fff7ed 0%, #fef3c7 100%); border: 1px solid #fde68a; }
.card-new::before { background: #f59e0b; }

.card-ringing { background: linear-gradient(135deg, #fff7ed 0%, #fef3c7 100%); border: 1px solid #fde68a; }
.card-ringing::before { background: #f97316; }

.card-connected { background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%); border: 1px solid #bfdbfe; }
.card-connected::before { background: #3b82f6; }

.card-stat-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.5rem;
    z-index: 1;
}

.card-ringing .card-stat-label,
.card-new .card-stat-label    { color: #9a3412; }
.card-connected .card-stat-label { color: #1e40af; }

.card-stat-value {
    font-size: 3rem;
    font-weight: 900;
    line-height: 1;
    z-index: 1;
}

.card-ringing .card-stat-value,
.card-new .card-stat-value    { color: #ea580c; }
.card-connected .card-stat-value { color: #2563eb; }

/* Stat card aliases (spec) */
.stat-card { background: white; border-radius: var(--radius-xl); padding: 1.5rem; box-shadow: var(--shadow); text-align: center; }
.stat-card .stat-value { font-size: 2.5rem; font-weight: 700; line-height: 1; margin: 8px 0; }
.stat-card .stat-label { font-size: 0.7rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-muted); }
.stat-new .stat-value      { color: #F59E0B; }
.stat-ringing .stat-value  { color: #EF4444; }
.stat-connected .stat-value { color: #10B981; }

/* --------------------------------------------------------------------------
   15. Pagination
   -------------------------------------------------------------------------- */
.layout-footer {
    padding: 0.875rem 1.5rem;
    background: white;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
    flex-shrink: 0;
}

.pagination {
    display: flex;
    gap: 4px;
    align-items: center;
    margin-top: 1rem;
}

.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 8px;
    border-radius: 6px;
    font-size: 0.8rem;
    text-decoration: none;
    color: var(--text);
    border: 1.5px solid var(--border);
    transition: all var(--transition);
}

.pagination a:hover { background: var(--primary); color: white; border-color: var(--primary); }
.pagination .active { background: var(--primary); color: white; border-color: var(--primary); }
.pagination-info { font-size: 0.8rem; color: var(--text-muted); font-weight: 500; }

/* --------------------------------------------------------------------------
   16. Search Bar
   -------------------------------------------------------------------------- */
.search-bar,
.search-form {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

input[name="search_box"],
.search-input {
    padding: 0.5rem 1rem;
    border-radius: var(--radius-pill);
    border: 1.5px solid var(--border);
    font-size: 0.83rem;
    width: 220px;
    background: white;
    transition: all var(--transition);
    font-family: var(--font-sans);
    outline: none;
}

input[name="search_box"]:focus,
.search-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79,70,229,0.12);
    width: 260px;
}

/* --------------------------------------------------------------------------
   17. Alert / Notification Boxes
   -------------------------------------------------------------------------- */
.alert {
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    font-size: 0.875rem;
    margin-bottom: 1rem;
    border-left: 4px solid;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.alert-success { background: #F0FDF4; border-color: var(--success); color: #166534; }
.alert-danger  { background: #FEF2F2; border-color: var(--danger);  color: #991B1B; }
.alert-info    { background: #EFF6FF; border-color: var(--info);    color: #1E40AF; }
.alert-warning { background: #FFFBEB; border-color: var(--warning); color: #92400E; }

/* --------------------------------------------------------------------------
   18. Scrollbar
   -------------------------------------------------------------------------- */
::-webkit-scrollbar        { width: 6px; height: 6px; }
::-webkit-scrollbar-track  { background: #f1f5f9; border-radius: 3px; }
::-webkit-scrollbar-thumb  { background: #cbd5e1; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* --------------------------------------------------------------------------
   19. Login Page
   -------------------------------------------------------------------------- */
.login-page-wrapper {
    min-height: 100vh;
    width: 100%;
    background: linear-gradient(135deg, rgba(109,40,217,0.92) 0%, rgba(76,29,149,0.95) 100%), url('../images/voice_pattern.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: var(--font-sans);
    padding: 20px;
    position: relative;
    overflow: hidden;
}

.login-page-wrapper::before {
    content: '';
    position: absolute;
    width: 100%; height: 100%;
    background-image:
        radial-gradient(circle at 10% 20%, rgba(255,255,255,0.05) 0%, transparent 20%),
        radial-gradient(circle at 90% 80%, rgba(255,255,255,0.05) 0%, transparent 20%);
    z-index: 0;
}

.login-card-centered {
    display: flex;
    width: 100%;
    max-width: 850px;
    background: white;
    border-radius: 24px;
    box-shadow: 0 25px 50px rgba(0,0,0,0.15);
    overflow: hidden;
    position: relative;
    z-index: 1;
}

.login-brand-panel {
    flex: 0 0 50%;
    max-width: 50%;
    background: url('../images/login_3d_illustration.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    overflow: hidden;
}

.brand-content { position: relative; z-index: 2; text-align: center; }

.brand-illustration {
    max-width: 100%;
    height: auto;
    margin-bottom: 2rem;
    filter: drop-shadow(0 10px 20px rgba(0,0,0,0.1));
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-10px); }
}

.brand-hero-text-dark { font-size: 1.5rem; font-weight: 800; color: #1e293b; margin-bottom: 0.5rem; line-height: 1.2; }
.brand-subtext-dark   { font-size: 0.95rem; color: #64748b; line-height: 1.5; max-width: 80%; margin: 0 auto; }

.login-form-panel {
    flex: 0 0 50%;
    max-width: 50%;
    padding: 1.5rem 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: white;
}

.login-header { text-align: center; margin-bottom: 1rem; }
.login-logo-header { max-width: 350px; height: auto; margin-bottom: 0.5rem; display: inline-block; }

.login-header h3 {
    font-size: 1.75rem;
    color: #1e293b;
    margin-bottom: 0.5rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: -0.025em;
}

.text-muted  { color: #64748b; font-size: 0.95rem; }
.mobile-only { display: none; }

.login-tabs { display: flex; margin-bottom: 1.25rem; border-bottom: 2px solid #f1f5f9; }

.login-tab {
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    font-weight: 600;
    color: #94a3b8;
    transition: all 0.2s;
    font-size: 0.95rem;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
}

.login-tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.login-tab:hover:not(.active) { color: var(--text); }

.form-label {
    display: block;
    margin-bottom: 0.4rem;
    font-weight: 600;
    color: #334155;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.copyright-text { text-align: center; margin-top: 1.5rem; color: #cbd5e1; font-size: 0.78rem; font-weight: 500; }

.login-footer {
    position: absolute;
    bottom: 10px;
    width: 100%;
    text-align: center;
    color: rgba(255,255,255,0.5);
    font-size: 0.75rem;
    z-index: 10;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.circle-2 {
    width: 300px; height: 300px;
    bottom: -50px; right: -50px;
    animation: pulse 12s infinite alternate-reverse;
}

@keyframes pulse {
    0%   { transform: scale(1);   opacity: 0.1; }
    100% { transform: scale(1.1); opacity: 0.2; }
}

/* --------------------------------------------------------------------------
   20. Utility Classes (Tailwind fallback for module pages)
   -------------------------------------------------------------------------- */
/* Grid */
.grid            { display: grid; gap: 1.5rem; }
.grid-cols-1     { grid-template-columns: repeat(1, minmax(0, 1fr)); }

@media (min-width: 768px) {
    .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .md\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .md\:grid-cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
    .md\:col-span-2  { grid-column: span 2; }
}

/* Flex */
.flex            { display: flex; }
.flex-col        { flex-direction: column; }
.items-center    { align-items: center; }
.justify-center  { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-end     { justify-content: flex-end; }
.gap-2           { gap: 0.5rem; }
.gap-3           { gap: 0.75rem; }
.gap-4           { gap: 1rem; }
.gap-6           { gap: 1.5rem; }

/* Display */
.hidden          { display: none; }
.block           { display: block; }
.inline-flex     { display: inline-flex; }
.relative        { position: relative; }
.w-full          { width: 100%; }
.h-full          { height: 100%; }
.min-h-screen    { min-height: 100vh; }

/* Spacing */
.p-2  { padding: 0.5rem; }
.p-3  { padding: 0.75rem; }
.p-4  { padding: 1rem; }
.p-6  { padding: 1.5rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.pb-4 { padding-bottom: 1rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 0.75rem; }
.mb-6 { margin-bottom: 1.25rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mr-3 { margin-right: 0.75rem; }

/* Text */
.text-xs   { font-size: 0.75rem; }
.text-sm   { font-size: 0.875rem; }
.text-lg   { font-size: 1.125rem; }
.text-xl   { font-size: 1.25rem; }
.text-3xl  { font-size: 1.875rem; }
.font-bold   { font-weight: 700; }
.font-medium { font-weight: 500; }
.text-center { text-align: center; }
.uppercase   { text-transform: uppercase; }
.tracking-wider { letter-spacing: 0.05em; }
.italic      { font-style: italic; }

/* Colour utilities */
.text-gray-800   { color: #1f2937; }
.text-gray-700   { color: #374151; }
.text-gray-600   { color: #4b5563; }
.text-gray-500   { color: #6b7280; }
.text-gray-400   { color: #9ca3af; }
.text-indigo-600 { color: #4f46e5; }
.text-red-500    { color: #ef4444; }
.text-green-600  { color: #16a34a; }
.text-blue-800   { color: #1e40af; }
.text-yellow-800 { color: #854d0e; }

.bg-white        { background-color: white; }
.bg-gray-50      { background-color: #f9fafb; }
.bg-blue-50      { background-color: #eff6ff; }
.bg-yellow-50    { background-color: #fefce8; }
.bg-green-100    { background-color: #dcfce7; }
.bg-gray-100     { background-color: #f3f4f6; }
.bg-indigo-100   { background-color: #e0e7ff; }

.rounded-lg   { border-radius: var(--radius-lg); }
.rounded-full { border-radius: 9999px; }
.rounded      { border-radius: var(--radius); }
.shadow-sm    { box-shadow: var(--shadow); }
.border       { border: 1px solid var(--border); }
.border-b     { border-bottom: 1px solid var(--border); }
.border-gray-100 { border-color: #f3f4f6; }
.border-gray-200 { border-color: #e5e7eb; }
.border-l-4      { border-left-width: 4px; }
.overflow-auto   { overflow: auto; }
.overflow-hidden { overflow: hidden; }
.transition-colors { transition: color var(--transition), background-color var(--transition); }

/* Size helpers */
.w-8  { width: 2rem; }
.h-8  { height: 2rem; }
.w-10 { width: 2.5rem; }
.h-10 { height: 2.5rem; }
.w-64 { width: 16rem; }

/* Input rounded from Tailwind classes in module HTML */
input.rounded-lg,
select.rounded-lg,
textarea.rounded-lg {
    border-radius: var(--radius-lg);
    border: 1.5px solid #d1d5db;
}

/* Misc */
.min-h-\[60px\] { min-height: 60px; }

/* --------------------------------------------------------------------------
   21. Footer
   -------------------------------------------------------------------------- */
.footer {
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 100%);
    color: rgba(255,255,255,0.6);
    text-align: center;
    padding: 0.6rem 1.5rem;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    border-top: 1px solid rgba(255,255,255,0.08);
    flex-shrink: 0;
}

/* --------------------------------------------------------------------------
   22. Responsive / Print
   -------------------------------------------------------------------------- */
@media (max-width: 900px) {
    .login-card-centered { flex-direction: column; max-width: 450px; }
    .login-brand-panel   { flex: 0 0 auto; min-height: 200px; max-width: 100%; }
    .login-form-panel    { flex: 0 0 auto; max-width: 100%; padding: 2rem; }
}

@media (max-width: 768px) {
    .header         { padding: 0 1rem; }
    .top-nav        { display: none; }
    .layout-body    { padding: 0.875rem 1rem; }
    .form-grid      { grid-template-columns: 1fr; }
    .form-group.full-width { grid-column: span 1; }
    .form-content   { padding: 1.25rem 1rem; }
    .form-container { margin: 0.75rem; }
    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    table, .INBOX, table.INBOX {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    thead th, table.INBOX thead th {
        padding: 0.6rem 0.75rem;
        font-size: 0.65rem;
    }
    td, table.INBOX tbody td {
        padding: 0.6rem 0.75rem;
        font-size: 0.78rem;
    }
    .btn { padding: 0.45rem 0.875rem; font-size: 0.7rem; }
    input[name="search_box"] { width: 160px; }
    .md\:grid-cols-5 { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .header-logo-text { font-size: 1.1rem; }
    .user-details     { display: none; }
}

/* Focus visible */
:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Print */
@media print {
    .header, .footer, .layout-footer, .action-col {
        display: none !important;
    }
    table.INBOX thead th {
        background: #1e2a5e !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}

/* Global link transitions */
a { transition: color var(--transition), background-color var(--transition); }

/* ============================================================
   GLOBAL SELECT / DROPDOWN OVERRIDE
   Ensures all <select> elements match <input> height & style,
   even after Tailwind CDN preflight resets everything.
   Applied project-wide — no per-page changes needed.
   ============================================================ */
select,
select.w-full,
select[class*="rounded"],
select[class*="border"],
.form-group select,
.form-container select,
td select,
th select {
    display: block !important;
    width: 100% !important;
    min-height: 42px !important;
    padding: 0.55rem 2.5rem 0.55rem 0.875rem !important;
    font-size: 0.875rem !important;
    font-family: var(--font-sans) !important;
    line-height: 1.5 !important;
    color: var(--text) !important;
    background-color: #ffffff !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e") !important;
    background-position: right 0.65rem center !important;
    background-repeat: no-repeat !important;
    background-size: 1.25em 1.25em !important;
    border: 1.5px solid #d1d5db !important;
    border-radius: 0.5rem !important;
    box-shadow: 0 1px 2px 0 rgba(0,0,0,0.05) !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    outline: none !important;
    box-sizing: border-box !important;
    cursor: pointer !important;
    transition: border-color 0.15s ease, box-shadow 0.15s ease !important;
    vertical-align: middle !important;
}

select:focus,
select.w-full:focus,
select[class*="rounded"]:focus,
.form-group select:focus,
.form-container select:focus,
td select:focus {
    border-color: #4f46e5 !important;
    box-shadow: 0 0 0 3px rgba(79,70,229,0.15) !important;
    background-color: #ffffff !important;
}

select:disabled,
select[disabled] {
    background-color: #f3f4f6 !important;
    color: #9ca3af !important;
    cursor: not-allowed !important;
    opacity: 0.7 !important;
}

/* Make sure inputs match the same min-height so they are visually equal */
input[type="text"],
input[type="password"],
input[type="number"],
input[type="email"],
input[type="date"],
input[type="datetime-local"],
input[type="tel"],
input[type="url"],
input[type="search"] {
    min-height: 42px !important;
    padding: 0.55rem 0.875rem !important;
    font-size: 0.875rem !important;
    border: 1.5px solid #d1d5db !important;
    border-radius: 0.5rem !important;
    box-shadow: 0 1px 2px 0 rgba(0,0,0,0.05) !important;
    box-sizing: border-box !important;
    background-color: #ffffff !important;
    color: var(--text) !important;
    transition: border-color 0.15s ease, box-shadow 0.15s ease !important;
    outline: none !important;
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
input[type="email"]:focus,
input[type="date"]:focus,
input[type="datetime-local"]:focus {
    border-color: #4f46e5 !important;
    box-shadow: 0 0 0 3px rgba(79,70,229,0.15) !important;
}


/* Tailwind utility shims (Tailwind not loaded — define common classes used in templates) */
.text-white { color: #ffffff !important; }
.text-white\/70 { color: rgba(255,255,255,0.70) !important; }
.text-white\/80 { color: rgba(255,255,255,0.80) !important; }
.text-white\/90 { color: rgba(255,255,255,0.90) !important; }
.bg-green-500 { background-color: #22c55e !important; }
.bg-gray-500  { background-color: #6b7280 !important; }
