#customSkillModal input:focus, #customSkillModal select:focus {
    outline: none !important;
    box-shadow: none !important;
    border-color: #6366f1;
}
/* Remove default focus ring and add custom focus for custom skill modal */
#customSkillModal input:focus, #customSkillModal select:focus {
    outline: none;
    box-shadow: 0 0 0 2px #a5b4fc; /* subtle indigo focus */
    border-color: #6366f1;
}
/* --- Fix for custom skill modal tier dropdown visibility --- */
#customSkillModal select#customSkillTier {
    min-height: 2.5rem;
    height: auto;
    border: 1.5px solid #6366f1;
    background: #fff;
    color: #222;
    font-size: 1rem;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    box-shadow: 0 1px 4px 0 rgba(0,0,0,0.04);
    z-index: 1002;
}

#customSkillModal .modal-content, #customSkillModal > div {
    overflow: visible !important;
    z-index: 1001;
}

#customSkillModal {
    z-index: 1000 !important;
    overflow: visible !important;
}

#customSkillModal select#customSkillTier::-ms-expand {
    display: block;
}
/* Center recurrence pattern buttons visually */
.recurrence-center {
    display: flex;
    justify-content: center;
    width: 100%;
}
/* Horizontal layout for recurrence pattern buttons */
/* Horizontal layout for recurrence pattern buttons */
.recurrence-patterns-inner {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
}
.recurrence-row {
    display: flex;
    flex-direction: row;
    gap: 1.5rem;
    justify-content: center;
    align-items: center;
    width: 100%;
    min-width: 400px;
    flex-wrap: wrap;
}
.recurrence-custom-row {
    display: none;
}
.recurrence-pattern {
    min-width: 140px;
    max-width: 180px;
    height: 80px;
    flex: 1 1 140px;
    display: flex !important;
    flex-direction: row !important;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.5rem 1rem !important;
    margin: 0;
    box-sizing: border-box;
}

.recurrence-pattern i {
    margin: 0 !important;
}

.recurrence-pattern span {
    margin: 0 !important;
    font-size: 1.1rem;
    font-weight: 500;
}

:root {
    --primary-color: #6C63FF;
    --secondary-color: #4D44DB;
    --dark-color: #2A2A72;
    --light-color: #F8F9FA;
    --success-color: #28A745;
    --error-color: #DC3545;
    --warning-color: #FFC107;
    --gray-color: #6C757D;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f5f5f7;
    color: #333;
    line-height: 1.6;
}

.login-container {
    max-width: 420px;
    margin: 50px auto;
    padding: 30px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header .logo {
    width: 120px;
    margin-bottom: 20px;
}

.login-header h1 {
    color: var(--dark-color);
    margin-bottom: 10px;
    font-size: 24px;
}

.login-header p {
    color: var(--gray-color);
    font-size: 14px;
}

.login-form {
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--dark-color);
    font-size: 14px;
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    transition: border 0.3s;
}

.form-group input:focus {
    border-color: var(--primary-color);
    outline: none;
}

.btn-login {
    width: 100%;
    padding: 12px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn-login:hover {
    background-color: var(--secondary-color);
}

.login-footer {
    text-align: center;
    font-size: 14px;
    color: var(--gray-color);
}

.login-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.login-footer a:hover {
    text-decoration: underline;
}

.alert {
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
}

.alert-error {
    background-color: rgba(220, 53, 69, 0.1);
    color: var(--error-color);
    border: 1px solid rgba(220, 53, 69, 0.3);
}

.alert-success {
    background-color: rgba(40, 167, 69, 0.1);
    color: var(--success-color);
    border: 1px solid rgba(40, 167, 69, 0.3);
}

/* Dashboard Styles */
.dashboard-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid #eee;
    margin-bottom: 30px;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-left .logo {
    width: 40px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.welcome-message {
    font-weight: 500;
    color: var(--dark-color);
}

.btn-logout {
    padding: 8px 16px;
    background-color: var(--error-color);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn-logout:hover {
    background-color: #c82333;
}

.role-badge {
    margin-bottom: 30px;
    text-align: center;
}

.badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    color: white;
}

.badge-taker {
    background-color: var(--primary-color);
}

.badge-giver {
    background-color: var(--success-color);
}

.badge-admin {
    background-color: var(--warning-color);
}

.dashboard-content {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.dashboard-content h2 {
    color: var(--dark-color);
    margin-bottom: 20px;
}

.giver-actions {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.giver-actions h3 {
    margin-bottom: 15px;
    color: var(--dark-color);
}

.btn-action {
    padding: 10px 20px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    margin-right: 10px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn-action:hover {
    background-color: var(--secondary-color);
}

/* Disabled submit-like button used in my_quests when deadline passed */
.btn.disabled,
.btn[disabled] {
    background: #e5e7eb !important;
    color: #9ca3af !important;
    border: 1px solid #d1d5db !important;
    box-shadow: none !important;
    cursor: not-allowed !important;
    filter: grayscale(20%);
    opacity: 0.95;
}

/* Add a subtle blurred look when desired */
.btn.disabled.blur {
    filter: blur(0.6px) grayscale(30%);
    opacity: 0.9;
}

.employee-id {
    font-size: 14px;
    color: var(--gray-color);
    margin-right: 15px;
}

.user-info {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.user-info p {
    margin-bottom: 8px;
}

/* Error debugging styles */
.debug-info {
    background-color: #fff3cd;
    padding: 15px;
    margin: 20px 0;
    border-radius: 5px;
    border-left: 4px solid #ffc107;
}

.debug-info pre {
    white-space: pre-wrap;
    word-wrap: break-word;
    font-family: monospace;
}

.alert.alert-error {
    background-color: #ffebee;
    border-left: 4px solid #f44336;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
}

/* Client & Support specific UI helpers */
.cs-section-title {
    font-weight: 700;
    margin-bottom: 8px;
    color: #111827;
}
.cs-dl {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 10px 18px;
    align-items: start;
    margin: 0;
}
.evidence-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 8px;
    border-radius: 8px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
}
/* Client & Support submission styles (migrated from inline styles) */
.cs-section-title { font-weight:700; margin-bottom:8px; font-size:1rem; color:#111827; }
.cs-dl { display:grid; grid-template-columns:200px 1fr; gap:10px 18px; align-items:start; margin:0; }
.cs-dl dt { color:#6b7280; font-weight:700; }
.cs-dl dd { margin:0; color:#111827; }
.evidence-item { display:flex; align-items:center; gap:10px; padding:6px 8px; border-radius:8px; background:#f8fafc; border:1px solid #e5e7eb; }
.evidence-item input[type="checkbox"] { width:16px; height:16px; }
.file-pill { display:inline-flex; align-items:center; gap:6px; padding:6px 10px; border-radius:9999px; background:#EEF2FF; color:#3730A3; border:1px solid #C7D2FE; font-weight:600; font-size:0.95rem; }
.btn-gray { display:inline-block; padding:8px 12px; border-radius:8px; text-decoration:none; background:#F3F4F6; color:#111827; border:1px solid #D1D5DB; }
.btn-green { display:inline-block; padding:8px 12px; border-radius:8px; text-decoration:none; background:#10B981; color:#fff; }

.alert.alert-success {
    background-color: #e8f5e9;
    border-left: 4px solid #4caf50;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
}

.error-help {
    margin-top: 10px;
    font-size: 14px;
}

.error-help a {
    color: #2196f3;
    text-decoration: none;
}

.error-help a:hover {
    text-decoration: underline;
}

.recurrence-patterns {
    width: 100%;
    display: flex;
    justify-content: center;
}

/* Status badge colors for created_quests.php */
.status-created {
  background: #e0e7ff;
  color: #3730a3;
  border: 1.5px solid #6366f1;
}
.status-assigned {
  background: #fef9c3;
  color: #b45309;
  border: 1.5px solid #f59e42;
}
.status-active {
  background: #d1fae5;
  color: #065f46;
  border: 1.5px solid #10b981;
}
.status-draft {
  background: #f3f4f6;
  color: #6b7280;
  border: 1.5px solid #9ca3af;
}
.status-completed {
  background: #bbf7d0;
  color: #166534;
  border: 1.5px solid #22c55e;
}
.status-missed {
  background: #fee2e2;
  color: #991b1b;
  border: 1.5px solid #ef4444;
}
.status-deleted {
  background: #f3f4f6;
  color: #9ca3af;
  border: 1.5px solid #d1d5db;
}
.status-approved {
  background: #f0fdf4;
  color: #15803d;
  border: 1.5px solid #22c55e;
}
.status-pending {
  background: #fef3c7;
  color: #92400e;
  border: 1.5px solid #f59e42;
}
.status-rejected {
  background: #fee2e2;
  color: #b91c1c;
  border: 1.5px solid #ef4444;
}
.status-cancelled {
  background: #f3f4f6;
  color: #6b7280;
  border: 1.5px solid #9ca3af;
}
.status-in_progress {
  background: #e0f2fe;
  color: #0369a1;
  border: 1.5px solid #0ea5e9;
}
.status-submitted {
  background: #f1f5f9;
  color: #334155;
  border: 1.5px solid #64748b;
}
.status-graded {
  background: #f0fdf4;
  color: #166534;
  border: 1.5px solid #22c55e;
}

.meta-badge {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 9999px;
  font-size: 0.98em;
  font-weight: 600;
  letter-spacing: 0.01em;
  margin-right: 6px;
  margin-bottom: 2px;
  vertical-align: middle;
  transition: background 0.2s, color 0.2s, border 0.2s;
}
