/* Unified Professional Form Elements - Consistent Styling Across All Pages */

/* ============================================
   SELECT / DROPDOWN - Premium Styling
   ============================================ */

select,
.form-group select,
.input-wrapper select,
.data-table select,
.filter-select,
.status-select {
    width: 100%;
    padding: 0.875rem 2.75rem 0.875rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 0.9375rem;
    font-family: var(--font-family);
    font-weight: 500;
    color: #1e293b;
    background: #ffffff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.875rem center;
    background-size: 1.125rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

select:hover,
.form-group select:hover,
.input-wrapper select:hover,
.data-table select:hover {
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23667eea' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    transform: translateY(-1px);
}

select:focus,
.form-group select:focus,
.input-wrapper select:focus,
.data-table select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 
        0 0 0 4px rgba(102, 126, 234, 0.1),
        0 6px 16px rgba(102, 126, 234, 0.2);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23667eea' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    transform: translateY(-2px);
    background-color: #ffffff;
}

select:disabled,
.form-group select:disabled {
    background-color: #f8fafc;
    color: #94a3b8;
    cursor: not-allowed;
    opacity: 0.6;
    border-color: #e5e7eb;
}

select option {
    padding: 0.75rem 1rem;
    font-size: 0.9375rem;
    font-weight: 500;
    color: #1e293b;
    background: #ffffff;
}

select option:hover {
    background: #f8fafc;
}

select option:checked {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: 600;
}

/* Small Select Variant */
select.btn-sm,
select.form-control-sm {
    padding: 0.625rem 2.25rem 0.625rem 0.875rem;
    font-size: 0.875rem;
    border-radius: 10px;
    background-size: 1rem;
    background-position: right 0.75rem center;
}

/* Large Select Variant */
select.btn-lg,
select.form-control-lg {
    padding: 1.125rem 3rem 1.125rem 1.25rem;
    font-size: 1.0625rem;
    border-radius: 14px;
    background-size: 1.25rem;
    background-position: right 1rem center;
}

/* ============================================
   INPUT FIELDS - Premium Styling
   ============================================ */

input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="number"],
input[type="date"],
input[type="time"],
input[type="search"],
.form-group input,
.input-wrapper input {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 0.9375rem;
    font-family: var(--font-family);
    font-weight: 500;
    color: #1e293b;
    background: #ffffff;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

input[type="text"]:hover,
input[type="email"]:hover,
input[type="password"]:hover,
input[type="tel"]:hover,
input[type="number"]:hover,
input[type="date"]:hover,
input[type="time"]:hover,
.form-group input:hover {
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
    transform: translateY(-1px);
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="tel"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
input[type="time"]:focus,
.form-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 
        0 0 0 4px rgba(102, 126, 234, 0.1),
        0 6px 16px rgba(102, 126, 234, 0.2);
    transform: translateY(-2px);
    background-color: #ffffff;
}

/* ============================================
   BUTTONS - Premium Consistent Styling
   ============================================ */

.btn,
button.btn,
a.btn,
input[type="submit"].btn,
input[type="button"].btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.75rem;
    font-size: 0.9375rem;
    font-weight: 600;
    font-family: var(--font-family);
    border-radius: 12px;
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: white;
    color: #374151;
    border: 2px solid #e5e7eb;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-color: #667eea;
    color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.2);
}

.btn-sm {
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
    border-radius: 10px;
}

.btn-lg {
    padding: 1.125rem 2.25rem;
    font-size: 1.0625rem;
    border-radius: 14px;
}

.btn svg,
.btn i {
    width: 1.125rem;
    height: 1.125rem;
    flex-shrink: 0;
}

.btn-sm svg,
.btn-sm i {
    width: 1rem;
    height: 1rem;
}

.btn-lg svg,
.btn-lg i {
    width: 1.25rem;
    height: 1.25rem;
}

/* ============================================
   BADGES - Consistent Styling
   ============================================ */

.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.375rem 0.875rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: 8px;
    white-space: nowrap;
    line-height: 1;
}

.badge-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.25);
}

.badge-error,
.badge-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.25);
}

.badge-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.25);
}

.badge-info {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.25);
}

/* ============================================
   FILTER BAR / ACTION BAR - Premium
   ============================================ */

.filter-bar,
.action-bar {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-lg) var(--spacing-xl);
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 16px;
    border: 2px solid #e5e7eb;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08), 0 2px 6px rgba(0, 0, 0, 0.04);
    margin-bottom: var(--spacing-xl);
    flex-wrap: wrap;
    transition: all 0.3s ease;
}

.filter-bar:hover,
.action-bar:hover {
    border-color: #cbd5e1;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1), 0 4px 8px rgba(0, 0, 0, 0.06);
}

.filter-bar select,
.action-bar select {
    min-width: 200px;
    flex: 0 1 auto;
    font-weight: 600;
}

.filter-bar .btn,
.action-bar .btn {
    flex-shrink: 0;
    font-weight: 600;
}

/* ============================================
   TABLE ACTIONS
   ============================================ */

.data-table .btn {
    padding: 0.5rem 0.875rem;
    font-size: 0.875rem;
    border-radius: 10px;
}

.data-table .btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.8125rem;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    select,
    .form-group select {
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .filter-bar,
    .action-bar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-bar select,
    .action-bar select {
        width: 100%;
        min-width: 100%;
    }
}

