/* =============================================
   COURIER WEBSITE - MAIN STYLESHEET
   ============================================= */

/* CSS Variables */
:root {
    --primary-color: #4f46e5;
    --primary-dark: #4338ca;
    --primary-light: #818cf8;
    --secondary-color: #0ea5e9;
    --success-color: #22c55e;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --info-color: #06b6d4;
    --dark-color: #1e293b;
    --light-color: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;
    --border-radius: 0.5rem;
    --border-radius-lg: 0.75rem;
    --box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --box-shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --box-shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --transition: all 0.3s ease;
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 0.9375rem;
    line-height: 1.6;
    color: var(--gray-700);
    background-color: var(--gray-100);
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-dark);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    color: var(--gray-800);
    font-weight: 600;
    line-height: 1.3;
}

/* =============================================
   AUTH PAGES (Login, Register)
   ============================================= */

.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
}

.auth-card {
    width: 100%;
    max-width: 480px;
    background: #fff;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--box-shadow-lg);
    overflow: hidden;
}

.auth-card.wide {
    max-width: 600px;
}

.auth-header {
    padding: 2rem 2rem 1rem;
    text-align: center;
}

.auth-header .logo {
    max-height: 50px;
    margin-bottom: 1rem;
}

.auth-header h1 {
    font-size: 1.5rem;
    color: var(--gray-800);
    margin-bottom: 0.5rem;
}

.auth-header p {
    color: var(--gray-500);
    font-size: 0.9rem;
}

.auth-body {
    padding: 1.5rem 2rem 2rem;
}

.auth-footer {
    padding: 1.5rem 2rem;
    background: var(--gray-100);
    text-align: center;
    font-size: 0.9rem;
    color: var(--gray-600);
}

/* =============================================
   FORM ELEMENTS
   ============================================= */

.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--gray-700);
    font-size: 0.875rem;
}

.form-label .required {
    color: var(--danger-color);
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 0.9375rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--border-radius);
    background-color: #fff;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.form-control.is-invalid {
    border-color: var(--danger-color);
}

.form-control.is-valid {
    border-color: var(--success-color);
}

.invalid-feedback {
    display: none;
    color: var(--danger-color);
    font-size: 0.8rem;
    margin-top: 0.25rem;
}

.form-control.is-invalid + .invalid-feedback {
    display: block;
}

.form-text {
    font-size: 0.8rem;
    color: var(--gray-500);
    margin-top: 0.25rem;
}

/* Input with icon */
.input-group {
    position: relative;
}

.input-group .input-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-400);
}

.input-group .form-control {
    padding-left: 2.75rem;
}

.input-group .input-icon-right {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-400);
    cursor: pointer;
}

/* Select */
.form-select {
    width: 100%;
    padding: 0.75rem 2.5rem 0.75rem 1rem;
    font-size: 0.9375rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--border-radius);
    background-color: #fff;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 16px 12px;
    appearance: none;
    cursor: pointer;
    transition: var(--transition);
}

.form-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

/* Checkbox & Radio */
.form-check {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.form-check-input {
    width: 1.1rem;
    height: 1.1rem;
    margin-top: 0.15rem;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.form-check-label {
    font-size: 0.9rem;
    color: var(--gray-600);
    cursor: pointer;
}

/* File Input */
.file-upload {
    position: relative;
    border: 2px dashed var(--gray-300);
    border-radius: var(--border-radius);
    padding: 2rem;
    text-align: center;
    background: var(--gray-50);
    transition: var(--transition);
    cursor: pointer;
}

.file-upload:hover {
    border-color: var(--primary-color);
    background: rgba(79, 70, 229, 0.05);
}

.file-upload input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.file-upload-icon {
    font-size: 2.5rem;
    color: var(--gray-400);
    margin-bottom: 0.5rem;
}

.file-upload-text {
    font-size: 0.9rem;
    color: var(--gray-600);
}

.file-upload-text span {
    color: var(--primary-color);
    font-weight: 500;
}

.file-upload-hint {
    font-size: 0.8rem;
    color: var(--gray-400);
    margin-top: 0.25rem;
}

.file-preview {
    margin-top: 1rem;
}

.file-preview img {
    max-width: 150px;
    max-height: 100px;
    border-radius: var(--border-radius);
    border: 1px solid var(--gray-200);
}

/* =============================================
   BUTTONS
   ============================================= */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 0.9375rem;
    font-weight: 500;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-primary {
    background: var(--primary-color);
    color: #fff;
}

.btn-primary:hover:not(:disabled) {
    background: var(--primary-dark);
    color: #fff;
}

.btn-secondary {
    background: var(--gray-200);
    color: var(--gray-700);
}

.btn-secondary:hover:not(:disabled) {
    background: var(--gray-300);
}

.btn-success {
    background: var(--success-color);
    color: #fff;
}

.btn-danger {
    background: var(--danger-color);
    color: #fff;
}

.btn-outline-primary {
    background: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    color: #fff;
}

.btn-block {
    width: 100%;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1rem;
}

/* =============================================
   ALERTS
   ============================================= */

.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.alert-success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.alert-danger {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert-warning {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}

.alert-info {
    background: #e0f2fe;
    color: #075985;
    border: 1px solid #bae6fd;
}

/* =============================================
   BADGES
   ============================================= */

.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.625rem;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 9999px;
}

.bg-success {
    background: #dcfce7;
    color: #166534;
}

.bg-danger {
    background: #fee2e2;
    color: #991b1b;
}

.bg-warning {
    background: #fef3c7;
    color: #92400e;
}

.bg-info {
    background: #e0f2fe;
    color: #075985;
}

.bg-secondary {
    background: var(--gray-200);
    color: var(--gray-700);
}

.bg-dark {
    background: var(--gray-800);
    color: #fff;
}

.bg-primary {
    background: var(--primary-color);
    color: #fff;
}

/* =============================================
   CARDS
   ============================================= */

.card {
    background: #fff;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--box-shadow);
    overflow: hidden;
}

.card-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--gray-200);
    background: var(--gray-50);
}

.card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--gray-800);
    margin: 0;
}

.card-body {
    padding: 1.5rem;
}

.card-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--gray-200);
    background: var(--gray-50);
}

/* =============================================
   PROGRESS BAR
   ============================================= */

.progress {
    height: 0.5rem;
    background: var(--gray-200);
    border-radius: 9999px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: var(--primary-color);
    border-radius: 9999px;
    transition: width 0.3s ease;
}

.progress-bar.bg-success {
    background: var(--success-color);
}

.progress-bar.bg-warning {
    background: var(--warning-color);
}

/* =============================================
   STEPS / STEPPER
   ============================================= */

.steps {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2rem;
}

.step {
    flex: 1;
    text-align: center;
    position: relative;
}

.step::before {
    content: '';
    position: absolute;
    top: 15px;
    left: 50%;
    width: 100%;
    height: 2px;
    background: var(--gray-300);
}

.step:last-child::before {
    display: none;
}

.step-number {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--gray-300);
    color: var(--gray-600);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
    position: relative;
    z-index: 1;
    transition: var(--transition);
}

.step.active .step-number,
.step.completed .step-number {
    background: var(--primary-color);
    color: #fff;
}

.step.completed .step-number {
    background: var(--success-color);
}

.step-label {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: var(--gray-500);
}

.step.active .step-label {
    color: var(--primary-color);
    font-weight: 500;
}

/* =============================================
   LOADING / SPINNER
   ============================================= */

.spinner {
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 0.75s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* =============================================
   UTILITIES
   ============================================= */

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.text-primary { color: var(--primary-color); }
.text-success { color: var(--success-color); }
.text-danger { color: var(--danger-color); }
.text-warning { color: var(--warning-color); }
.text-muted { color: var(--gray-500); }

.fw-normal { font-weight: 400; }
.fw-medium { font-weight: 500; }
.fw-semibold { font-weight: 600; }
.fw-bold { font-weight: 700; }

.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mt-5 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mb-5 { margin-bottom: 2rem; }

.d-flex { display: flex; }
.d-block { display: block; }
.d-none { display: none; }

.align-items-center { align-items: center; }
.justify-content-between { justify-content: space-between; }
.justify-content-center { justify-content: center; }

.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 1rem; }

.w-100 { width: 100%; }

/* =============================================
   RESPONSIVE
   ============================================= */

@media (max-width: 576px) {
    .auth-wrapper {
        padding: 1rem;
    }
    
    .auth-card {
        border-radius: var(--border-radius);
    }
    
    .auth-header,
    .auth-body,
    .auth-footer {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }
    
    .steps {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .step::before {
        display: none;
    }
    
    .step-label {
        display: none;
    }
}