/**
 * RouteForge Frontend Styles
 */

:root {
    --rf-primary: #2563eb;
    --rf-primary-dark: #1d4ed8;
    --rf-secondary: #64748b;
    --rf-success: #10b981;
    --rf-warning: #f59e0b;
    --rf-danger: #ef4444;
    --rf-light: #f8fafc;
    --rf-dark: #1e293b;
    --rf-border: #e2e8f0;
    --rf-text: #334155;
    --rf-text-light: #64748b;
    --rf-radius: 8px;
    --rf-shadow: 0 1px 3px rgba(0,0,0,0.1);
    --rf-shadow-lg: 0 4px 15px rgba(0,0,0,0.1);
}

/* Reset */
.routeforge-dashboard *,
.routeforge-driver-app *,
.routeforge-login-form *,
.routeforge-register-form *,
.routeforge-pricing * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Buttons */
.rf-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: var(--rf-radius);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.rf-btn-primary {
    background: var(--rf-primary);
    color: white;
}

.rf-btn-primary:hover {
    background: var(--rf-primary-dark);
}

.rf-btn-success {
    background: var(--rf-success);
    color: white;
}

.rf-btn-danger {
    background: var(--rf-danger);
    color: white;
}

.rf-btn-outline {
    background: transparent;
    border: 1px solid var(--rf-border);
    color: var(--rf-text);
}

.rf-btn-outline:hover {
    background: var(--rf-light);
}

.rf-btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

.rf-btn-lg {
    padding: 14px 28px;
    font-size: 16px;
}

.rf-btn-block {
    display: flex;
    width: 100%;
}

.rf-btn-icon {
    width: 36px;
    height: 36px;
    padding: 0;
    border: none;
    border-radius: var(--rf-radius);
    background: var(--rf-light);
    color: var(--rf-text);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.rf-btn-icon:hover {
    background: var(--rf-border);
}

.rf-btn-icon.rf-btn-danger:hover {
    background: var(--rf-danger);
    color: white;
}

/* Forms */
.rf-form-group {
    margin-bottom: 16px;
}

.rf-form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 500;
    color: var(--rf-text);
}

.rf-form-group input,
.rf-form-group textarea,
.rf-form-group select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--rf-border);
    border-radius: var(--rf-radius);
    font-size: 16px;
    transition: border-color 0.2s;
}

.rf-form-group input:focus,
.rf-form-group textarea:focus,
.rf-form-group select:focus {
    outline: none;
    border-color: var(--rf-primary);
}

.rf-form-group small {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: var(--rf-text-light);
}

.rf-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.rf-form-message {
    padding: 10px;
    border-radius: var(--rf-radius);
    margin-top: 10px;
}

.rf-form-message.error {
    background: #fef2f2;
    color: var(--rf-danger);
}

.rf-form-message.success {
    background: #f0fdf4;
    color: var(--rf-success);
}

/* Login/Register Forms */
.routeforge-login-form,
.routeforge-register-form {
    max-width: 400px;
    margin: 40px auto;
    padding: 30px;
    background: white;
    border-radius: var(--rf-radius);
    box-shadow: var(--rf-shadow-lg);
}

.routeforge-login-form h2,
.routeforge-register-form h2 {
    margin-bottom: 24px;
    text-align: center;
    color: var(--rf-dark);
}

.rf-register-link,
.rf-login-link {
    margin-top: 20px;
    text-align: center;
    font-size: 14px;
    color: var(--rf-text-light);
}

.rf-register-link a,
.rf-login-link a {
    color: var(--rf-primary);
    text-decoration: none;
}

/* Dashboard */
.routeforge-dashboard {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--rf-light);
    min-height: 100vh;
    padding: 20px;
}

.rf-dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.rf-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.rf-header-left h1 {
    font-size: 24px;
    color: var(--rf-dark);
}

.rf-subscription-badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
}

.rf-badge-free {
    background: #e2e8f0;
    color: #64748b;
}

.rf-badge-pro {
    background: #dbeafe;
    color: #2563eb;
}

.rf-badge-fleet-starter,
.rf-badge-fleet-pro {
    background: #d1fae5;
    color: #059669;
}

.rf-badge-enterprise {
    background: #fef3c7;
    color: #d97706;
}

.rf-header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.rf-date-display {
    color: var(--rf-text-light);
    font-size: 14px;
}

/* Stats Grid */
.rf-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.rf-stat-card {
    background: white;
    border-radius: var(--rf-radius);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: var(--rf-shadow);
}

.rf-stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--rf-radius);
    background: var(--rf-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--rf-primary);
}

.rf-stat-success .rf-stat-icon {
    background: #d1fae5;
    color: var(--rf-success);
}

.rf-stat-warning .rf-stat-icon {
    background: #fef3c7;
    color: var(--rf-warning);
}

.rf-stat-content {
    display: flex;
    flex-direction: column;
}

.rf-stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--rf-dark);
}

.rf-stat-label {
    font-size: 13px;
    color: var(--rf-text-light);
}

/* Dashboard Content */
.rf-dashboard-content {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 24px;
}

.rf-dashboard-panel {
    background: white;
    border-radius: var(--rf-radius);
    box-shadow: var(--rf-shadow);
    overflow: hidden;
}

.rf-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--rf-border);
}

.rf-panel-header h3 {
    font-size: 16px;
    color: var(--rf-dark);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Tabs */
.rf-panel-tabs {
    display: flex;
    border-bottom: 1px solid var(--rf-border);
}

.rf-tab-btn {
    flex: 1;
    padding: 14px;
    border: none;
    background: none;
    font-size: 14px;
    font-weight: 500;
    color: var(--rf-text-light);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
    border-bottom: 2px solid transparent;
}

.rf-tab-btn:hover {
    color: var(--rf-primary);
}

.rf-tab-btn.active {
    color: var(--rf-primary);
    border-bottom-color: var(--rf-primary);
}

.rf-tab-content {
    display: none;
    padding: 20px;
}

.rf-tab-content.active {
    display: block;
}

/* Driver Cards */
.rf-drivers-list {
    max-height: 400px;
    overflow-y: auto;
}

.rf-driver-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: var(--rf-radius);
    transition: background 0.2s;
}

.rf-driver-card:hover {
    background: var(--rf-light);
}

.rf-driver-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--rf-primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rf-driver-info {
    flex: 1;
}

.rf-driver-info h4 {
    font-size: 14px;
    margin-bottom: 2px;
}

.rf-driver-email,
.rf-driver-phone {
    font-size: 12px;
    color: var(--rf-text-light);
    display: block;
}

.rf-driver-status {
    display: flex;
    align-items: center;
    gap: 8px;
}

.rf-status-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
}

.rf-status-available,
.rf-status-active {
    background: #d1fae5;
    color: #059669;
}

.rf-status-busy,
.rf-status-in_progress {
    background: #dbeafe;
    color: #2563eb;
}

.rf-status-offline,
.rf-status-pending {
    background: #e2e8f0;
    color: #64748b;
}

.rf-status-completed {
    background: #d1fae5;
    color: #059669;
}

.rf-location-indicator {
    color: var(--rf-success);
    font-size: 8px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.rf-driver-actions {
    display: flex;
    gap: 4px;
}

.rf-driver-limit {
    padding: 12px 20px;
    border-top: 1px solid var(--rf-border);
    font-size: 13px;
    color: var(--rf-text-light);
    display: flex;
    justify-content: space-between;
}

.rf-upgrade-link {
    color: var(--rf-primary);
    text-decoration: none;
}

/* Route Cards */
.rf-routes-list {
    max-height: 400px;
    overflow-y: auto;
}

.rf-route-card {
    padding: 16px;
    border: 1px solid var(--rf-border);
    border-radius: var(--rf-radius);
    margin-bottom: 12px;
}

.rf-route-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.rf-route-header h4 {
    font-size: 14px;
}

.rf-route-info {
    display: flex;
    gap: 16px;
    font-size: 13px;
    color: var(--rf-text-light);
    margin-bottom: 12px;
}

.rf-route-info span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.rf-text-warning {
    color: var(--rf-danger);
}

.rf-route-progress {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.rf-progress-bar {
    flex: 1;
    height: 8px;
    background: var(--rf-light);
    border-radius: 4px;
    overflow: hidden;
}

.rf-progress-fill {
    height: 100%;
    background: var(--rf-success);
    transition: width 0.3s;
}

.rf-progress-text {
    font-size: 13px;
    font-weight: 500;
    color: var(--rf-text);
    min-width: 40px;
}

.rf-route-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.rf-route-driver {
    font-size: 13px;
    color: var(--rf-text-light);
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Map */
.rf-map-container {
    height: 400px;
    background: #e2e8f0;
}

.rf-panel-map .rf-map-container {
    height: calc(100% - 100px);
}

.rf-map-legend {
    display: flex;
    justify-content: center;
    gap: 20px;
    padding: 12px;
    border-top: 1px solid var(--rf-border);
}

.rf-legend-item {
    font-size: 12px;
    color: var(--rf-text-light);
    display: flex;
    align-items: center;
    gap: 6px;
}

.rf-color-available { color: var(--rf-success); }
.rf-color-busy { color: var(--rf-primary); }
.rf-color-offline { color: var(--rf-secondary); }

/* Empty State */
.rf-empty-state {
    text-align: center;
    padding: 40px;
    color: var(--rf-text-light);
}

.rf-empty-state i {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.rf-empty-state p {
    font-size: 14px;
}

/* File Upload */
.rf-file-upload {
    position: relative;
}

.rf-file-upload input[type="file"] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.rf-file-upload label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px;
    border: 2px dashed var(--rf-border);
    border-radius: var(--rf-radius);
    cursor: pointer;
    transition: border-color 0.2s;
}

.rf-file-upload:hover label {
    border-color: var(--rf-primary);
}

.rf-file-upload label i {
    font-size: 24px;
    color: var(--rf-text-light);
    margin-bottom: 8px;
}

/* Modal */
.rf-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.rf-modal.active {
    display: flex;
}

.rf-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
}

.rf-modal-content {
    position: relative;
    background: white;
    border-radius: var(--rf-radius);
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--rf-shadow-lg);
}

.rf-modal-sm {
    max-width: 360px;
}

.rf-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--rf-border);
}

.rf-modal-header h3 {
    font-size: 18px;
}

.rf-modal-close {
    width: 32px;
    height: 32px;
    border: none;
    background: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--rf-text-light);
}

.rf-modal-body {
    padding: 20px;
}

.rf-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 20px;
    border-top: 1px solid var(--rf-border);
}

.rf-modal-content .rf-form {
    padding: 20px;
}

/* Pricing */
.routeforge-pricing {
    padding: 40px 0;
}

.rf-pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    max-width: 1200px;
    margin: 0 auto;
}

.rf-pricing-card {
    background: white;
    border-radius: var(--rf-radius);
    padding: 30px;
    box-shadow: var(--rf-shadow);
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
}

.rf-pricing-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--rf-shadow-lg);
}

.rf-pricing-card.featured {
    border: 2px solid var(--rf-primary);
    position: relative;
}

.rf-pricing-card.featured::before {
    content: 'Most Popular';
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--rf-primary);
    color: white;
    padding: 4px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.rf-plan-name {
    font-size: 22px;
    margin-bottom: 8px;
    color: var(--rf-dark);
}

.rf-plan-description {
    font-size: 14px;
    color: var(--rf-text-light);
    margin-bottom: 20px;
}

.rf-plan-price {
    margin-bottom: 24px;
}

.rf-price-amount {
    font-size: 40px;
    font-weight: 700;
    color: var(--rf-dark);
}

.rf-price-period {
    font-size: 14px;
    color: var(--rf-text-light);
}

.rf-plan-features {
    list-style: none;
    margin-bottom: 24px;
    text-align: left;
}

.rf-plan-features li {
    padding: 8px 0;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.rf-plan-features i {
    width: 20px;
    color: var(--rf-success);
}

/* Driver App Styles */
.routeforge-driver-app {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--rf-light);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.rf-app-header {
    background: var(--rf-primary);
    color: white;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.rf-app-header h1 {
    font-size: 18px;
}

.rf-driver-name {
    font-size: 12px;
    opacity: 0.8;
}

.rf-header-actions {
    display: flex;
    gap: 8px;
}

.rf-header-actions .rf-btn-icon {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

/* Route Overview */
.rf-route-overview {
    background: white;
    padding: 20px;
    margin: 16px;
    border-radius: var(--rf-radius);
    box-shadow: var(--rf-shadow);
}

.rf-route-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.rf-route-title h2 {
    font-size: 18px;
}

.rf-route-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}

.rf-route-stats .rf-stat {
    text-align: center;
    padding: 12px;
    background: var(--rf-light);
    border-radius: var(--rf-radius);
}

.rf-route-stats .rf-stat-value {
    font-size: 24px;
    font-weight: 700;
}

.rf-route-stats .rf-stat-label {
    font-size: 11px;
    color: var(--rf-text-light);
}

.rf-route-stats .rf-stat-success {
    background: #d1fae5;
}

.rf-route-stats .rf-stat-warning {
    background: #fef3c7;
}

.rf-route-stats .rf-stat-danger {
    background: #fee2e2;
}

.rf-route-progress-bar {
    display: flex;
    align-items: center;
    gap: 12px;
}

.rf-progress-track {
    flex: 1;
    height: 8px;
    background: var(--rf-border);
    border-radius: 4px;
    overflow: hidden;
}

/* Bottom Navigation */
.rf-bottom-nav {
    display: flex;
    background: white;
    border-top: 1px solid var(--rf-border);
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
}

.rf-nav-btn {
    flex: 1;
    padding: 12px;
    border: none;
    background: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: var(--rf-text-light);
    cursor: pointer;
}

.rf-nav-btn i {
    font-size: 20px;
}

.rf-nav-btn.active {
    color: var(--rf-primary);
}

/* Tab Panels */
.rf-tab-panels {
    flex: 1;
    padding-bottom: 70px;
}

.rf-panel {
    display: none;
    padding: 16px;
}

.rf-panel.active {
    display: block;
}

/* Current Stop */
.rf-current-stop {
    background: white;
    border-radius: var(--rf-radius);
    padding: 20px;
    box-shadow: var(--rf-shadow);
}

.rf-stop-header {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 16px;
}

.rf-stop-number {
    font-size: 28px;
    font-weight: 700;
    color: var(--rf-primary);
}

.rf-stop-of {
    font-size: 14px;
    color: var(--rf-text-light);
}

.rf-stop-address {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.rf-stop-address i {
    color: var(--rf-danger);
    font-size: 20px;
    margin-top: 2px;
}

.rf-address-main {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 4px;
}

.rf-address-full {
    font-size: 13px;
    color: var(--rf-text-light);
}

.rf-customer-info {
    background: var(--rf-light);
    padding: 12px;
    border-radius: var(--rf-radius);
    margin-bottom: 16px;
}

.rf-customer-info p {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    margin-bottom: 4px;
}

.rf-customer-info a {
    color: var(--rf-primary);
    text-decoration: none;
}

.rf-stop-notes {
    display: flex;
    gap: 10px;
    padding: 12px;
    background: #fef3c7;
    border-radius: var(--rf-radius);
    margin-bottom: 16px;
}

.rf-stop-notes i {
    color: var(--rf-warning);
}

.rf-stop-notes p {
    font-size: 13px;
}

.rf-stop-eta {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-bottom: 20px;
    font-size: 14px;
    color: var(--rf-text-light);
}

.rf-stop-eta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.rf-stop-actions {
    margin-bottom: 16px;
}

.rf-btn-navigate {
    width: 100%;
}

.rf-stop-complete-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 12px;
}

.rf-btn-skip {
    width: 100%;
}

/* Stop List */
.rf-stops-list {
    background: white;
    border-radius: var(--rf-radius);
    overflow: hidden;
}

.rf-stop-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    border-bottom: 1px solid var(--rf-border);
}

.rf-stop-item:last-child {
    border-bottom: none;
}

.rf-stop-status-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--rf-light);
}

.rf-stop-pending .rf-stop-num {
    font-weight: 600;
    color: var(--rf-text);
}

.rf-stop-completed .rf-stop-status-icon {
    background: #d1fae5;
    color: var(--rf-success);
}

.rf-stop-unsuccessful .rf-stop-status-icon {
    background: #fee2e2;
    color: var(--rf-danger);
}

.rf-stop-details {
    flex: 1;
}

.rf-stop-addr {
    font-size: 14px;
    margin-bottom: 2px;
}

.rf-stop-customer {
    font-size: 12px;
    color: var(--rf-text-light);
}

.rf-stop-reason {
    font-size: 12px;
    color: var(--rf-danger);
    display: block;
}

/* Route Complete */
.rf-route-complete {
    text-align: center;
    padding: 40px 20px;
    background: white;
    border-radius: var(--rf-radius);
}

.rf-complete-icon {
    font-size: 64px;
    color: var(--rf-success);
    margin-bottom: 16px;
}

.rf-route-complete h2 {
    margin-bottom: 8px;
}

.rf-complete-stats {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-top: 20px;
    font-size: 14px;
}

/* No Route */
.rf-no-route {
    text-align: center;
    padding: 60px 20px;
}

.rf-empty-icon {
    font-size: 64px;
    color: var(--rf-border);
    margin-bottom: 16px;
}

.rf-no-route h2 {
    margin-bottom: 8px;
    color: var(--rf-text);
}

/* Start Route */
.rf-start-route {
    text-align: center;
    padding: 40px 20px;
    background: white;
    border-radius: var(--rf-radius);
}

/* Reason Options */
.rf-reason-options {
    display: grid;
    gap: 8px;
}

.rf-reason-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    border: 1px solid var(--rf-border);
    border-radius: var(--rf-radius);
    cursor: pointer;
    transition: all 0.2s;
}

.rf-reason-option:hover {
    border-color: var(--rf-primary);
}

.rf-reason-option input {
    width: auto;
}

.rf-reason-option input:checked + span {
    color: var(--rf-primary);
    font-weight: 500;
}

/* Company Code Box */
.rf-company-code-box {
    margin-top: 20px;
    padding: 16px;
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border-radius: var(--rf-radius);
    border: 1px dashed var(--rf-primary);
}

.rf-company-code-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--rf-primary);
    margin-bottom: 8px;
}

.rf-company-code-value {
    display: flex;
    align-items: center;
    gap: 8px;
}

.rf-company-code-value code {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--rf-dark);
    background: white;
    padding: 8px 16px;
    border-radius: var(--rf-radius);
}

.rf-company-code-hint {
    margin-top: 8px;
    font-size: 12px;
    color: var(--rf-text-light);
}

/* Settings Modal */
.rf-modal-lg {
    max-width: 600px;
}

.rf-modal-xl {
    max-width: 900px;
}

.rf-settings-section {
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--rf-border);
}

.rf-settings-section:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.rf-settings-section h4 {
    font-size: 16px;
    color: var(--rf-dark);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.rf-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
}

.rf-info-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.rf-info-item label {
    font-size: 12px;
    color: var(--rf-text-light);
    text-transform: uppercase;
}

.rf-info-item span {
    font-size: 14px;
    color: var(--rf-text);
}

.rf-info-item code {
    background: var(--rf-light);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
}

/* Subscription Info */
.rf-subscription-info {
    background: var(--rf-light);
    padding: 16px;
    border-radius: var(--rf-radius);
}

.rf-current-plan {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.rf-current-plan .rf-plan-name {
    font-size: 18px;
    font-weight: 600;
    color: var(--rf-dark);
}

.rf-plan-status {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
}

.rf-plan-limits {
    display: flex;
    gap: 16px;
    font-size: 14px;
    color: var(--rf-text);
}

.rf-plan-limits span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.rf-plan-expires {
    margin-top: 12px;
    font-size: 13px;
    color: var(--rf-text-light);
}

.rf-subscription-actions {
    margin-top: 16px;
}

/* Billing Toggle */
.rf-billing-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 24px;
}

.rf-billing-label {
    font-size: 14px;
    color: var(--rf-text);
}

.rf-save-badge {
    background: #d1fae5;
    color: var(--rf-success);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
}

.rf-switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
}

.rf-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.rf-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--rf-border);
    transition: 0.4s;
    border-radius: 26px;
}

.rf-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
}

input:checked + .rf-slider {
    background-color: var(--rf-primary);
}

input:checked + .rf-slider:before {
    transform: translateX(22px);
}

/* Plans Grid */
.rf-plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.rf-plan-card {
    background: white;
    border: 1px solid var(--rf-border);
    border-radius: var(--rf-radius);
    padding: 20px;
    text-align: center;
    transition: all 0.2s;
}

.rf-plan-card:hover {
    border-color: var(--rf-primary);
    box-shadow: var(--rf-shadow);
}

.rf-plan-current {
    border-color: var(--rf-primary);
    background: #eff6ff;
}

.rf-plan-card .rf-plan-header {
    margin-bottom: 12px;
}

.rf-plan-card .rf-plan-header h4 {
    font-size: 16px;
    color: var(--rf-dark);
    margin-bottom: 8px;
}

.rf-plan-card .rf-plan-price {
    margin-bottom: 0;
}

.rf-price-free {
    font-size: 24px;
    font-weight: 600;
    color: var(--rf-text);
}

.rf-plan-desc {
    font-size: 13px;
    color: var(--rf-text-light);
    margin-bottom: 12px;
}

.rf-plan-card .rf-plan-features {
    margin-bottom: 16px;
    text-align: left;
}

.rf-plan-card .rf-plan-features li {
    font-size: 13px;
    padding: 6px 0;
}

.rf-loading {
    text-align: center;
    padding: 40px;
    color: var(--rf-text-light);
}

/* Toast Notifications */
.rf-toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    padding: 12px 24px;
    border-radius: var(--rf-radius);
    font-size: 14px;
    z-index: 10000;
    opacity: 0;
    transition: all 0.3s ease;
}

.rf-toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.rf-toast-success {
    background: var(--rf-success);
    color: white;
}

.rf-toast-error {
    background: var(--rf-danger);
    color: white;
}

.rf-toast-warning {
    background: var(--rf-warning);
    color: white;
}

/* Auth Screen (Driver App) */
.rf-auth-screen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--rf-primary) 0%, var(--rf-primary-dark) 100%);
    padding: 20px;
}

.rf-auth-form {
    background: white;
    border-radius: 12px;
    padding: 40px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.rf-auth-logo {
    text-align: center;
    margin-bottom: 24px;
}

.rf-auth-logo h1 {
    font-size: 28px;
    color: var(--rf-dark);
}

.rf-auth-logo p {
    color: var(--rf-text-light);
    font-size: 14px;
}

.rf-auth-toggle {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
    color: var(--rf-text-light);
}

.rf-auth-toggle button {
    background: none;
    border: none;
    color: var(--rf-primary);
    cursor: pointer;
    font-weight: 500;
}

/* Responsive */
@media (max-width: 1024px) {
    .rf-dashboard-content {
        grid-template-columns: 1fr;
    }

    .rf-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .rf-form-row {
        grid-template-columns: 1fr;
    }

    .rf-pricing-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .rf-stats-grid {
        grid-template-columns: 1fr;
    }

    .rf-dashboard-header {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }

    .rf-date-display {
        display: none;
    }
}
