/* Datasource Jobber Integration - Global Custom Styles */

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

:root {
    --bg-dark: #0b1329;
    --card-bg: rgba(15, 23, 42, 0.85);
    --card-border: rgba(255, 255, 255, 0.1);
    --jobber-green: #7db928;
    --jobber-green-hover: #6ca520;
    --jobber-glow: rgba(125, 185, 40, 0.4);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --accent-blue: #38bdf8;
    --accent-amber: #fbbf24;
    --accent-emerald: #10b981;
    --accent-rose: #f43f5e;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    min-height: 100vh;
    margin: 0;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6, .brand-font {
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
}

/* Glassmorphism Panels */
.glass-panel {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.9) 0%, rgba(30, 41, 59, 0.8) 100%);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    color: #f8fafc;
    border: 1px solid var(--card-border);
    border-radius: 16px;
    box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.6), inset 0 1px 0 0 rgba(255, 255, 255, 0.1);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.glass-panel-hover:hover {
    border-color: rgba(125, 185, 40, 0.3);
    box-shadow: 0 25px 50px -12px rgba(125, 185, 40, 0.15), inset 0 1px 0 0 rgba(255, 255, 255, 0.15);
}

/* Typography & Titles */
.page-title {
    font-size: 2.25rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
    background: linear-gradient(135deg, #ffffff 0%, #cbd5e1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.025em;
}

.page-title-gradient {
    background: linear-gradient(135deg, #7db928 0%, #38bdf8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.page-subtitle {
    font-size: 1.05rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Badges */
.badge-clear {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
    padding: 0.35rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
}

.badge-pending {
    background: rgba(251, 191, 36, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(251, 191, 36, 0.3);
    padding: 0.35rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
}

.badge-review {
    background: rgba(244, 63, 94, 0.15);
    color: #fb7185;
    border: 1px solid rgba(244, 63, 94, 0.3);
    padding: 0.35rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
}

.badge-not-ordered {
    background: rgba(148, 163, 184, 0.15);
    color: #94a3b8;
    border: 1px solid rgba(148, 163, 184, 0.3);
    padding: 0.35rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
}

/* Pulsing Status Dots */
.dot-pulse-green {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #34d399;
    box-shadow: 0 0 8px #34d399;
}

.dot-pulse-amber {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #fbbf24;
    box-shadow: 0 0 8px #fbbf24;
    animation: pulse 2s infinite;
}

.dot-pulse-rose {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #fb7185;
    box-shadow: 0 0 8px #fb7185;
}

.dot-pulse-gray {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #94a3b8;
}

@keyframes pulse {
    0% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.2); }
    100% { opacity: 1; transform: scale(1); }
}

/* Buttons */
.btn-jobber {
    background: linear-gradient(135deg, #7db928 0%, #6ca520 100%);
    color: #ffffff;
    font-weight: 700;
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 14px var(--jobber-glow);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
}

.btn-jobber:hover {
    background: linear-gradient(135deg, #8bc92e 0%, #7db928 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(125, 185, 40, 0.5);
    color: #ffffff;
}

.btn-jobber:disabled, .btn-jobber.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-secondary-glass {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #f8fafc;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
}

.btn-secondary-glass:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.25);
    color: #ffffff;
    transform: translateY(-1px);
}

/* Custom Checkbox */
.custom-checkbox {
    appearance: none;
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.25);
    border-radius: 6px;
    outline: none;
    cursor: pointer;
    background-color: rgba(15, 23, 42, 0.6);
    transition: all 0.2s ease;
    position: relative;
}

.custom-checkbox:checked {
    background-color: #7db928;
    border-color: #7db928;
    box-shadow: 0 0 10px var(--jobber-glow);
}

.custom-checkbox:checked::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.custom-checkbox:focus {
    box-shadow: 0 0 0 3px rgba(125, 185, 40, 0.3);
}

/* Form Inputs */
.search-input {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    padding: 0.75rem 1rem 0.75rem 2.75rem;
    color: #f8fafc;
    font-size: 0.95rem;
    width: 100%;
    transition: all 0.2s ease;
}

.search-input:focus {
    outline: none;
    border-color: #7db928;
    box-shadow: 0 0 0 3px rgba(125, 185, 40, 0.25);
    background: rgba(15, 23, 42, 0.85);
}

.select-input {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    padding: 0.75rem 2.25rem 0.75rem 1rem;
    color: #f8fafc;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    cursor: pointer;
}

.select-input:focus {
    outline: none;
    border-color: #7db928;
    box-shadow: 0 0 0 3px rgba(125, 185, 40, 0.25);
}

/* Table Styling */
.roster-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.roster-table th {
    background: rgba(15, 23, 42, 0.8);
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    text-align: left;
}

.roster-table td {
    padding: 1.15rem 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: #e2e8f0;
    font-size: 0.925rem;
    vertical-align: middle;
    transition: background-color 0.15s ease;
}

.roster-table tr:hover td {
    background-color: rgba(255, 255, 255, 0.03);
}

.roster-table tr.selected td {
    background-color: rgba(125, 185, 40, 0.06);
}

/* Icons and Badges */
.icon-box {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(125, 185, 40, 0.2) 0%, rgba(56, 189, 248, 0.1) 100%);
    border: 1px solid rgba(125, 185, 40, 0.3);
    color: #7db928;
}

.icon-box-success {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2) 0%, rgba(52, 211, 153, 0.1) 100%);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #34d399;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
    animation: fadeIn 0.4s ease-out forwards;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.5);
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(125, 185, 40, 0.4);
}