/*
 * Avukat Law Platform - Frontend CSS
 * Version: 6.0.0
 * Mobile-First Responsive Design
 */

/* ============================================
   CSS VARIABLES
   ============================================ */
:root {
    /* Colors */
    --alp-primary: #2563eb;
    --alp-primary-dark: #1d4ed8;
    --alp-primary-light: #dbeafe;
    --alp-secondary: #1e3a5f;
    --alp-accent: #c9a227;
    --alp-success: #10b981;
    --alp-warning: #f59e0b;
    --alp-danger: #ef4444;
    
    /* Text Colors */
    --alp-text: #1f2937;
    --alp-text-light: #6b7280;
    --alp-text-muted: #9ca3af;
    
    /* Background Colors */
    --alp-bg: #f3f4f6;
    --alp-bg-light: #f9fafb;
    --alp-white: #ffffff;
    --alp-border: #e5e7eb;
    
    /* Sizing */
    --alp-radius: 12px;
    --alp-radius-sm: 8px;
    --alp-radius-lg: 16px;
    
    /* Shadows */
    --alp-shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --alp-shadow: 0 1px 3px rgba(0,0,0,0.1);
    --alp-shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --alp-shadow-lg: 0 10px 15px rgba(0,0,0,0.1);
    
    /* Transitions */
    --alp-transition: 0.2s ease;
}

/* ============================================
   BASE RESET
   ============================================ */
.alp-container,
.alp-container * {
    box-sizing: border-box;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */
.alp-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--alp-text);
    margin: 0 0 16px;
}

.alp-subtitle {
    font-size: 16px;
    color: var(--alp-text-light);
    margin: 0 0 24px;
}

/* ============================================
   BUTTONS
   ============================================ */
.alp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
    text-decoration: none;
    border: none;
    border-radius: var(--alp-radius-sm);
    cursor: pointer;
    transition: all var(--alp-transition);
    white-space: nowrap;
}

.alp-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

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

.alp-btn-primary:hover:not(:disabled) {
    background: var(--alp-primary-dark);
}

.alp-btn-secondary {
    background: var(--alp-secondary);
    color: var(--alp-white);
}

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

.alp-btn-outline:hover:not(:disabled) {
    border-color: var(--alp-primary);
    color: var(--alp-primary);
}

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

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

.alp-btn-whatsapp {
    background: #25d366;
    color: var(--alp-white);
}

.alp-btn-sm {
    padding: 8px 16px;
    font-size: 13px;
}

.alp-btn-lg {
    padding: 16px 32px;
    font-size: 16px;
}

.alp-btn-block {
    width: 100%;
}

/* ============================================
   FORM ELEMENTS
   ============================================ */
.alp-form-group {
    margin-bottom: 16px;
}

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

.alp-form-group .required {
    color: var(--alp-danger);
}

.alp-input,
.alp-textarea,
.alp-select {
    width: 100%;
    padding: 12px 16px;
    font-size: 16px;
    line-height: 1.5;
    color: var(--alp-text);
    background: var(--alp-white);
    border: 2px solid var(--alp-border);
    border-radius: var(--alp-radius-sm);
    transition: all var(--alp-transition);
    -webkit-appearance: none;
}

.alp-input:focus,
.alp-textarea:focus,
.alp-select:focus {
    outline: none;
    border-color: var(--alp-primary);
    box-shadow: 0 0 0 3px var(--alp-primary-light);
}

.alp-textarea {
    min-height: 120px;
    resize: vertical;
}

.alp-select {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

/* Checkbox & Radio */
.alp-checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.alp-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 14px;
    color: var(--alp-text);
    cursor: pointer;
}

.alp-checkbox-label input {
    margin-top: 3px;
    flex-shrink: 0;
}

/* ============================================
   NOTICES & ALERTS
   ============================================ */
.alp-notice {
    padding: 14px 18px;
    border-radius: var(--alp-radius-sm);
    margin-bottom: 16px;
    font-size: 14px;
    line-height: 1.5;
}

.alp-notice-info {
    background: #eff6ff;
    border-left: 4px solid var(--alp-primary);
    color: #1e40af;
}

.alp-notice-success {
    background: #f0fdf4;
    border-left: 4px solid var(--alp-success);
    color: #166534;
}

.alp-notice-warning {
    background: #fffbeb;
    border-left: 4px solid var(--alp-warning);
    color: #92400e;
}

.alp-notice-error {
    background: #fef2f2;
    border-left: 4px solid var(--alp-danger);
    color: #991b1b;
}

/* ============================================
   CARDS
   ============================================ */
.alp-card {
    background: var(--alp-white);
    border-radius: var(--alp-radius);
    padding: 20px;
    box-shadow: var(--alp-shadow-sm);
}

/* ============================================
   BADGES & TAGS
   ============================================ */
.alp-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    font-size: 11px;
    font-weight: 600;
    background: var(--alp-danger);
    color: var(--alp-white);
    border-radius: 10px;
}

.alp-tag {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 500;
    background: var(--alp-bg);
    color: var(--alp-text);
    border-radius: 20px;
}

.alp-tag-primary {
    background: var(--alp-primary-light);
    color: var(--alp-primary);
}

/* ============================================
   AVATAR
   ============================================ */
.alp-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--alp-bg);
}

.alp-avatar-sm { width: 36px; height: 36px; }
.alp-avatar-lg { width: 64px; height: 64px; }
.alp-avatar-xl { width: 96px; height: 96px; }

/* ============================================
   AUTH PAGES (LOGIN/REGISTER)
   ============================================ */
.alp-auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: var(--alp-white);
}

.alp-auth-container {
    width: 100%;
    max-width: 440px;
}

.alp-auth-card {
    padding: 24px;
}

.alp-auth-header {
    text-align: center;
    margin-bottom: 32px;
}

.alp-auth-logo,
.alp-verify-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.alp-auth-header h1,
.alp-auth-header h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--alp-text);
    margin: 0 0 8px;
}

.alp-auth-header p {
    font-size: 14px;
    color: var(--alp-text-light);
    margin: 0;
}

/* Role Selector */
.alp-role-selector {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.alp-role-option {
    display: block;
}

.alp-role-option input {
    display: none;
}

.alp-role-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    background: var(--alp-white);
    border: 2px solid var(--alp-border);
    border-radius: var(--alp-radius);
    cursor: pointer;
    transition: all var(--alp-transition);
}

.alp-role-card:hover {
    border-color: var(--alp-primary);
}

.alp-role-option input:checked + .alp-role-card {
    border-color: var(--alp-primary);
    background: var(--alp-primary-light);
}

.alp-role-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--alp-bg);
    border-radius: 12px;
    font-size: 24px;
    flex-shrink: 0;
}

.alp-role-option input:checked + .alp-role-card .alp-role-icon {
    background: var(--alp-primary);
}

.alp-role-content {
    flex: 1;
}

.alp-role-title {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: var(--alp-text);
    margin-bottom: 2px;
}

.alp-role-desc {
    display: block;
    font-size: 13px;
    color: var(--alp-text-light);
}

.alp-role-check {
    width: 22px;
    height: 22px;
    border: 2px solid var(--alp-border);
    border-radius: 50%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: transparent;
}

.alp-role-option input:checked + .alp-role-card .alp-role-check {
    background: var(--alp-primary);
    border-color: var(--alp-primary);
    color: var(--alp-white);
}

.alp-role-option input:checked + .alp-role-card .alp-role-check::after {
    content: '✓';
}

/* Auth Form */
.alp-auth-form .alp-form-group {
    margin-bottom: 16px;
}

.alp-form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    font-size: 14px;
}

.alp-form-options a {
    color: var(--alp-primary);
    text-decoration: none;
}

.alp-auth-footer {
    text-align: center;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--alp-border);
    font-size: 14px;
    color: var(--alp-text-light);
}

.alp-auth-footer a {
    color: var(--alp-primary);
    font-weight: 600;
    text-decoration: none;
}

/* Verify Code */
.alp-input-code {
    text-align: center;
    font-size: 24px;
    letter-spacing: 8px;
    font-weight: 700;
}

.alp-resend-section {
    margin-top: 20px;
    font-size: 14px;
    color: var(--alp-text-light);
    text-align: center;
}

.alp-resend-section a {
    color: var(--alp-primary);
    font-weight: 600;
    text-decoration: none;
}

/* ============================================
   LAWYER LIST PAGE
   ============================================ */
.alp-lawyer-search-page {
    padding: 20px 0;
}

/* Search Filters */
.alp-search-filters {
    background: var(--alp-white);
    border-radius: var(--alp-radius);
    padding: 16px;
    margin-bottom: 20px;
    box-shadow: var(--alp-shadow-sm);
}

.alp-filter-row {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.alp-filter-group select,
.alp-filter-group input {
    width: 100%;
    padding: 12px 16px;
    font-size: 15px;
    border: 2px solid var(--alp-border);
    border-radius: var(--alp-radius-sm);
    background: var(--alp-white);
}

.alp-filter-group select:focus,
.alp-filter-group input:focus {
    outline: none;
    border-color: var(--alp-primary);
}

/* Active Filters */
.alp-active-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--alp-border);
}

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

.alp-filter-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: var(--alp-primary-light);
    color: var(--alp-primary);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.alp-filter-remove {
    color: var(--alp-primary);
    text-decoration: none;
    font-weight: 700;
}

.alp-clear-all {
    font-size: 12px;
    color: var(--alp-danger);
    text-decoration: none;
    margin-left: auto;
}

/* Results Info */
.alp-results-info {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    font-size: 14px;
    color: var(--alp-text-light);
}

.alp-results-count {
    font-weight: 600;
    color: var(--alp-text);
}

/* Lawyer Grid */
.alp-lawyers-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

/* Lawyer Card */
.alp-lawyer-card {
    background: var(--alp-white);
    border-radius: var(--alp-radius);
    overflow: hidden;
    box-shadow: var(--alp-shadow-sm);
    transition: all var(--alp-transition);
}

.alp-lawyer-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.alp-lawyer-photo {
    position: relative;
    padding: 20px;
    padding-bottom: 0;
    text-align: center;
}

.alp-lawyer-photo img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
}

.alp-verified-badge {
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(20px);
    width: 24px;
    height: 24px;
    background: var(--alp-success);
    color: var(--alp-white);
    border-radius: 50%;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--alp-white);
}

.alp-lawyer-info {
    padding: 16px 20px 20px;
    text-align: center;
}

.alp-lawyer-info h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--alp-text);
    margin: 0 0 4px;
}

.alp-lawyer-bar {
    display: block;
    font-size: 13px;
    color: var(--alp-text-light);
    margin-bottom: 4px;
}

.alp-lawyer-city {
    display: block;
    font-size: 12px;
    color: var(--alp-text-muted);
    margin-bottom: 10px;
}

.alp-lawyer-specs {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    margin-bottom: 10px;
}

.alp-spec-tag {
    display: inline-block;
    padding: 4px 10px;
    font-size: 11px;
    background: var(--alp-bg);
    color: var(--alp-text-light);
    border-radius: 12px;
}

.alp-spec-more {
    padding: 4px 10px;
    font-size: 11px;
    background: var(--alp-primary-light);
    color: var(--alp-primary);
    border-radius: 12px;
}

.alp-lawyer-rating {
    font-size: 14px;
    color: var(--alp-text);
}

/* Empty State */
.alp-empty-state {
    text-align: center;
    padding: 48px 24px;
    background: var(--alp-white);
    border-radius: var(--alp-radius);
}

.alp-empty-icon {
    font-size: 56px;
    display: block;
    margin-bottom: 16px;
    opacity: 0.5;
}

.alp-empty-state h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--alp-text);
    margin: 0 0 8px;
}

.alp-empty-state p {
    font-size: 14px;
    color: var(--alp-text-light);
    margin: 0 0 20px;
}

/* ============================================
   PANEL / DASHBOARD
   ============================================ */
.alp-panel {
    background: var(--alp-bg);
    min-height: 100vh;
}

.alp-panel-header {
    background: var(--alp-white);
    padding: 16px 20px;
    border-bottom: 1px solid var(--alp-border);
    display: flex;
    align-items: center;
    gap: 12px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.alp-panel-header h2 {
    font-size: 18px;
    font-weight: 700;
    margin: 0;
    flex: 1;
}

.alp-role-badge {
    padding: 4px 12px;
    background: var(--alp-primary);
    color: var(--alp-white);
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}

.alp-role-badge.alp-role-client {
    background: var(--alp-success);
}

/* Panel Nav */
.alp-panel-nav {
    display: flex;
    background: var(--alp-white);
    border-top: 1px solid var(--alp-border);
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 8px 0;
    padding-bottom: calc(8px + env(safe-area-inset-bottom, 0));
}

.alp-panel-nav a {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 4px;
    font-size: 10px;
    color: var(--alp-text-muted);
    text-decoration: none;
    transition: all var(--alp-transition);
    position: relative;
}

.alp-panel-nav a .nav-icon {
    font-size: 20px;
}

.alp-panel-nav a.active,
.alp-panel-nav a:hover {
    color: var(--alp-primary);
}

.alp-panel-nav .alp-logout {
    color: var(--alp-danger);
}

.alp-panel-content {
    padding: 16px;
    padding-bottom: 100px;
}

/* Stats Grid */
.alp-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.alp-stat-card {
    background: var(--alp-white);
    border-radius: var(--alp-radius);
    padding: 16px;
    text-align: center;
}

.alp-stat-icon {
    width: 44px;
    height: 44px;
    margin: 0 auto 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--alp-primary-light);
    color: var(--alp-primary);
    border-radius: 12px;
    font-size: 20px;
}

.alp-stat-number {
    display: block;
    font-size: 24px;
    font-weight: 700;
    color: var(--alp-text);
}

.alp-stat-label {
    font-size: 12px;
    color: var(--alp-text-muted);
}

/* Section */
.alp-section {
    background: var(--alp-white);
    border-radius: var(--alp-radius);
    padding: 16px;
    margin-bottom: 16px;
}

.alp-section h4 {
    font-size: 14px;
    font-weight: 700;
    color: var(--alp-text);
    margin: 0 0 12px;
}

/* Quick Actions */
.alp-quick-actions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.alp-quick-action {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 20px 12px;
    background: var(--alp-white);
    border-radius: var(--alp-radius);
    text-decoration: none;
    color: var(--alp-text);
    transition: all var(--alp-transition);
}

.alp-quick-action:hover {
    background: var(--alp-primary);
    color: var(--alp-white);
}

.alp-quick-action-icon {
    font-size: 24px;
}

/* Recent List */
.alp-recent-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.alp-recent-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--alp-border);
}

.alp-recent-list li:last-child {
    border-bottom: none;
}

.alp-recent-info {
    flex: 1;
    min-width: 0;
}

.alp-recent-info strong {
    display: block;
    font-size: 14px;
    font-weight: 600;
}

.alp-recent-info span {
    display: block;
    font-size: 12px;
    color: var(--alp-text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.alp-empty {
    text-align: center;
    padding: 32px 16px;
    color: var(--alp-text-muted);
}

/* ============================================
   MESSENGER
   ============================================ */
.alp-messenger {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 140px);
    background: var(--alp-white);
    border-radius: var(--alp-radius);
    overflow: hidden;
}

.alp-messenger-sidebar {
    display: none;
    flex-direction: column;
    border-right: 1px solid var(--alp-border);
}

.alp-messenger-sidebar.active {
    display: flex;
    flex: 1;
}

.alp-conversations-list {
    flex: 1;
    overflow-y: auto;
}

.alp-conv-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--alp-border);
    cursor: pointer;
    transition: background var(--alp-transition);
}

.alp-conv-item:hover,
.alp-conv-item.active {
    background: var(--alp-bg);
}

.alp-conv-info {
    flex: 1;
    min-width: 0;
}

.alp-conv-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--alp-text);
}

.alp-conv-preview {
    font-size: 13px;
    color: var(--alp-text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.alp-messenger-main {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.alp-messenger-main.hidden {
    display: none;
}

.alp-conversation-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--alp-border);
}

.alp-conversation-header .back-btn {
    font-size: 20px;
    cursor: pointer;
    color: var(--alp-text-light);
}

.alp-messages-list {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.alp-message {
    max-width: 80%;
    padding: 10px 14px;
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.4;
}

.alp-message.sent {
    align-self: flex-end;
    background: var(--alp-primary);
    color: var(--alp-white);
    border-bottom-right-radius: 4px;
}

.alp-message.received {
    align-self: flex-start;
    background: var(--alp-bg);
    color: var(--alp-text);
    border-bottom-left-radius: 4px;
}

.alp-message-time {
    font-size: 10px;
    margin-top: 4px;
    opacity: 0.7;
}

.alp-message-form {
    display: flex;
    gap: 10px;
    padding: 12px 16px;
    border-top: 1px solid var(--alp-border);
}

.alp-message-form textarea {
    flex: 1;
    padding: 10px 14px;
    border: 2px solid var(--alp-border);
    border-radius: 20px;
    resize: none;
    font-size: 15px;
    max-height: 100px;
}

.alp-message-form textarea:focus {
    outline: none;
    border-color: var(--alp-primary);
}

.alp-message-form button {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    flex-shrink: 0;
}

.alp-no-conversation {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--alp-text-muted);
    padding: 32px;
    text-align: center;
}

/* ============================================
   PAGINATION
   ============================================ */
.alp-pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 24px;
    flex-wrap: wrap;
}

.alp-pagination a,
.alp-pagination span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border-radius: var(--alp-radius-sm);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all var(--alp-transition);
}

.alp-pagination a {
    background: var(--alp-white);
    color: var(--alp-text);
    border: 1px solid var(--alp-border);
}

.alp-pagination a:hover {
    border-color: var(--alp-primary);
    color: var(--alp-primary);
}

.alp-pagination .current,
.alp-pagination .active {
    background: var(--alp-primary);
    color: var(--alp-white);
    border: none;
}

/* ============================================
   LOADING
   ============================================ */
.alp-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: var(--alp-text-muted);
}

.alp-loading::after {
    content: '';
    width: 24px;
    height: 24px;
    border: 3px solid var(--alp-border);
    border-top-color: var(--alp-primary);
    border-radius: 50%;
    animation: alp-spin 0.8s linear infinite;
    margin-left: 10px;
}

@keyframes alp-spin {
    to { transform: rotate(360deg); }
}

/* ============================================
   RESPONSIVE - TABLET (768px+)
   ============================================ */
@media (min-width: 768px) {
    /* Auth */
    .alp-auth-card {
        padding: 40px;
        background: var(--alp-white);
        border-radius: var(--alp-radius);
        box-shadow: var(--alp-shadow-md);
    }
    
    /* Filters */
    .alp-filter-row {
        flex-direction: row;
        flex-wrap: wrap;
    }
    
    .alp-filter-row > * {
        flex: 1;
        min-width: 150px;
    }
    
    /* Lawyer Grid */
    .alp-lawyers-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    /* Panel Nav */
    .alp-panel-nav {
        position: static;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 8px;
        padding: 16px 20px;
        border-top: none;
        border-bottom: 1px solid var(--alp-border);
    }
    
    .alp-panel-nav a {
        flex: none;
        flex-direction: row;
        padding: 10px 16px;
        font-size: 14px;
        border-radius: var(--alp-radius-sm);
    }
    
    .alp-panel-nav a .nav-icon {
        font-size: 18px;
    }
    
    .alp-panel-nav .alp-logout {
        margin-left: auto;
    }
    
    .alp-panel-content {
        padding: 24px;
        padding-bottom: 24px;
    }
    
    /* Stats */
    .alp-stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    /* Quick Actions */
    .alp-quick-actions {
        grid-template-columns: repeat(4, 1fr);
    }
    
    /* Messenger */
    .alp-messenger {
        flex-direction: row;
        height: 600px;
    }
    
    .alp-messenger-sidebar {
        display: flex;
        width: 320px;
    }
    
    .alp-messenger-sidebar.active {
        flex: none;
    }
    
    .alp-messenger-main {
        display: flex;
        flex: 1;
    }
    
    .alp-messenger-main.hidden {
        display: flex;
    }
    
    .alp-conversation-header .back-btn {
        display: none;
    }
}

/* ============================================
   RESPONSIVE - DESKTOP (1024px+)
   ============================================ */
@media (min-width: 1024px) {
    /* Lawyer Grid */
    .alp-lawyers-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    /* Lawyer Card Hover */
    .alp-lawyer-card:hover {
        transform: translateY(-4px);
        box-shadow: var(--alp-shadow-md);
    }
}

/* ============================================
   RESPONSIVE - LARGE DESKTOP (1280px+)
   ============================================ */
@media (min-width: 1280px) {
    .alp-lawyers-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ============================================
   UTILITIES
   ============================================ */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.hidden { display: none !important; }
.mt-16 { margin-top: 16px; }
.mb-16 { margin-bottom: 16px; }

/* ============================================
   SECTION HEADERS
   ============================================ */
.alp-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 2px solid var(--alp-bg);
}

.alp-section-header h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--alp-text);
    margin: 0;
}

/* ============================================
   FAVORITE BUTTON
   ============================================ */
.alp-btn-favorite {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: var(--alp-white);
    border: 2px solid var(--alp-border);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--alp-text);
    cursor: pointer;
    transition: all 0.2s ease;
}

.alp-btn-favorite:hover {
    border-color: var(--alp-warning);
    color: var(--alp-warning);
    background: #fffbeb;
}

.alp-btn-favorite.alp-favorited {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    border-color: #f59e0b;
    color: #78350f;
}

.alp-btn-favorite .alp-fav-icon {
    font-size: 16px;
}

/* ============================================
   REVIEWS SECTION
   ============================================ */
.alp-reviews-section {
    background: var(--alp-white);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.alp-reviews-summary {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 20px;
    background: var(--alp-bg-light);
    border-radius: 10px;
    margin-bottom: 20px;
}

.alp-reviews-score {
    text-align: center;
}

.alp-score-big {
    display: block;
    font-size: 42px;
    font-weight: 700;
    color: var(--alp-text);
    line-height: 1;
}

.alp-score-stars {
    color: #fbbf24;
    font-size: 18px;
    margin: 8px 0;
}

.alp-score-count {
    font-size: 13px;
    color: var(--alp-text-muted);
}

.alp-reviews-breakdown {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.alp-breakdown-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.alp-breakdown-label {
    width: 100px;
    font-size: 13px;
    color: var(--alp-text-light);
    flex-shrink: 0;
}

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

.alp-breakdown-fill {
    height: 100%;
    background: linear-gradient(90deg, #fbbf24, #f59e0b);
    border-radius: 4px;
}

.alp-breakdown-val {
    width: 30px;
    font-size: 13px;
    font-weight: 600;
    color: var(--alp-text);
    text-align: right;
}

.alp-reviews-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.alp-review-item {
    padding: 16px;
    background: var(--alp-bg-light);
    border-radius: 10px;
}

.alp-review-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.alp-review-author {
    display: flex;
    align-items: center;
    gap: 10px;
}

.alp-review-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.alp-review-name {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--alp-text);
}

.alp-review-case {
    display: block;
    font-size: 12px;
    color: var(--alp-text-muted);
}

.alp-review-rating {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.alp-review-rating .alp-stars {
    color: #fbbf24;
    font-size: 14px;
}

.alp-review-date {
    font-size: 11px;
    color: var(--alp-text-muted);
}

.alp-review-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--alp-text);
    margin: 0 0 8px;
}

.alp-review-content {
    font-size: 14px;
    line-height: 1.6;
    color: var(--alp-text-light);
    margin: 0;
}

.alp-review-response {
    margin-top: 14px;
    padding: 14px;
    background: var(--alp-white);
    border-radius: 8px;
    border-left: 3px solid var(--alp-primary);
}

.alp-review-response strong {
    display: block;
    font-size: 13px;
    color: var(--alp-primary);
    margin-bottom: 6px;
}

.alp-review-response p {
    font-size: 13px;
    color: var(--alp-text-light);
    margin: 0;
}

/* ============================================
   ENDORSEMENTS SECTION
   ============================================ */
.alp-endorsements-section {
    background: var(--alp-white);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.alp-endorsements-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.alp-endorsement-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: var(--alp-bg-light);
    border-radius: 10px;
}

.alp-endorsement-skill {
    display: flex;
    align-items: center;
    gap: 10px;
}

.alp-skill-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--alp-text);
}

.alp-skill-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 8px;
    background: var(--alp-primary);
    color: var(--alp-white);
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.alp-endorsers {
    display: flex;
    align-items: center;
}

.alp-endorser {
    margin-left: -8px;
}

.alp-endorser:first-child {
    margin-left: 0;
}

.alp-endorser img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid var(--alp-white);
    object-fit: cover;
}

.alp-endorser-more {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: var(--alp-border);
    border-radius: 50%;
    font-size: 11px;
    font-weight: 600;
    color: var(--alp-text-light);
    margin-left: -8px;
    border: 2px solid var(--alp-white);
}

/* ============================================
   ARTICLES PAGE
   ============================================ */
.alp-articles-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.alp-articles-header {
    text-align: center;
    margin-bottom: 32px;
}

.alp-articles-header h1 {
    font-size: 28px;
    font-weight: 700;
    color: var(--alp-text);
    margin: 0 0 8px;
}

.alp-articles-header p {
    font-size: 16px;
    color: var(--alp-text-light);
    margin: 0;
}

.alp-articles-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

.alp-articles-page .alp-article-card {
    display: flex;
    flex-direction: column;
    background: var(--alp-white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--alp-shadow-sm);
    transition: all 0.2s ease;
}

.alp-articles-page .alp-article-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--alp-shadow-md);
}

.alp-article-thumb {
    display: block;
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: var(--alp-bg);
}

.alp-article-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.alp-article-card:hover .alp-article-thumb img {
    transform: scale(1.05);
}

.alp-articles-page .alp-article-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.alp-articles-page .alp-article-content h3 {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 10px;
    line-height: 1.4;
}

.alp-articles-page .alp-article-content h3 a {
    color: var(--alp-text);
    text-decoration: none;
}

.alp-articles-page .alp-article-content h3 a:hover {
    color: var(--alp-primary);
}

.alp-articles-page .alp-article-content > p {
    font-size: 14px;
    line-height: 1.6;
    color: var(--alp-text-light);
    margin: 0 0 16px;
    flex: 1;
}

.alp-article-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-top: 14px;
    border-top: 1px solid var(--alp-border);
    flex-wrap: wrap;
}

.alp-article-author {
    display: flex;
    align-items: center;
    gap: 10px;
}

.alp-author-mini {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}

.alp-article-author span {
    font-size: 13px;
    font-weight: 600;
    color: var(--alp-text);
}

.alp-article-date {
    font-size: 12px;
    color: var(--alp-text-muted);
}

.alp-article-stats {
    font-size: 13px;
    color: var(--alp-text-muted);
    margin-top: 10px;
}

/* ============================================
   QA FORUM PAGE
   ============================================ */
.alp-qa-forum {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

.alp-qa-header {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 24px;
    text-align: center;
}

.alp-qa-title h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--alp-text);
    margin: 0 0 6px;
}

.alp-qa-title p {
    font-size: 15px;
    color: var(--alp-text-light);
    margin: 0;
}

.alp-qa-filters {
    background: var(--alp-white);
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: var(--alp-shadow-sm);
}

.alp-qa-filter-form .alp-filter-row {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.alp-qa-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.alp-qa-item {
    display: flex;
    gap: 16px;
    padding: 18px;
    background: var(--alp-white);
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    box-shadow: var(--alp-shadow-sm);
    transition: all 0.2s ease;
}

.alp-qa-item:hover {
    box-shadow: var(--alp-shadow-md);
    transform: translateY(-2px);
}

.alp-qa-stats {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 60px;
}

.alp-qa-stat {
    text-align: center;
    padding: 8px;
    background: var(--alp-bg);
    border-radius: 8px;
}

.alp-qa-stat .alp-stat-num {
    display: block;
    font-size: 18px;
    font-weight: 700;
    color: var(--alp-text);
    line-height: 1;
}

.alp-qa-stat .alp-stat-label {
    display: block;
    font-size: 10px;
    color: var(--alp-text-muted);
    margin-top: 2px;
}

.alp-qa-content {
    flex: 1;
    min-width: 0;
}

.alp-qa-content h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--alp-text);
    margin: 0 0 8px;
    line-height: 1.4;
}

.alp-qa-content > p {
    font-size: 14px;
    color: var(--alp-text-light);
    margin: 0 0 12px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.alp-qa-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 12px;
}

.alp-qa-cat {
    padding: 4px 10px;
    background: var(--alp-primary-light);
    color: var(--alp-primary);
    border-radius: 12px;
    font-weight: 500;
}

.alp-qa-author,
.alp-qa-date {
    color: var(--alp-text-muted);
}

.alp-qa-answered {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: var(--alp-success);
    color: var(--alp-white);
    border-radius: 50%;
    font-size: 16px;
    flex-shrink: 0;
    align-self: center;
}

/* QA Ask Form */
.alp-qa-ask-form {
    background: var(--alp-white);
    border-radius: 12px;
    padding: 24px;
    box-shadow: var(--alp-shadow-sm);
}

.alp-qa-ask-form h2 {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 20px;
    color: var(--alp-text);
}

/* QA Single Question */
.alp-qa-question {
    background: var(--alp-white);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: var(--alp-shadow-sm);
}

.alp-qa-question-header {
    margin-bottom: 16px;
}

.alp-qa-question-header h1 {
    font-size: 22px;
    font-weight: 700;
    color: var(--alp-text);
    margin: 0 0 12px;
    line-height: 1.4;
}

.alp-qa-question-body {
    font-size: 15px;
    line-height: 1.7;
    color: var(--alp-text);
}

.alp-qa-answers {
    margin-top: 24px;
}

.alp-qa-answers-header {
    font-size: 16px;
    font-weight: 600;
    color: var(--alp-text);
    margin-bottom: 16px;
}

.alp-qa-answer {
    background: var(--alp-white);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 14px;
    box-shadow: var(--alp-shadow-sm);
}

.alp-qa-answer.accepted {
    border: 2px solid var(--alp-success);
}

.alp-qa-answer-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.alp-qa-answer-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
}

.alp-qa-answer-body {
    font-size: 14px;
    line-height: 1.7;
    color: var(--alp-text);
}

/* ============================================
   MODAL
   ============================================ */
.alp-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.alp-modal-content {
    background: var(--alp-white);
    border-radius: 16px;
    padding: 24px;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.alp-modal-lg {
    max-width: 600px;
}

.alp-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    font-size: 24px;
    color: var(--alp-text-muted);
    cursor: pointer;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.alp-modal-close:hover {
    background: var(--alp-bg);
    color: var(--alp-text);
}

.alp-modal-content h2 {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 20px;
    padding-right: 40px;
}

/* ============================================
   RESPONSIVE - TABLET (768px+)
   ============================================ */
@media (min-width: 768px) {
    /* Reviews */
    .alp-reviews-summary {
        flex-direction: row;
        align-items: center;
    }
    
    .alp-reviews-score {
        padding-right: 30px;
        border-right: 1px solid var(--alp-border);
        min-width: 140px;
    }
    
    .alp-reviews-breakdown {
        flex: 1;
    }
    
    /* Endorsements */
    .alp-endorsements-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Articles */
    .alp-articles-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* QA */
    .alp-qa-header {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
    }
    
    .alp-qa-filter-form .alp-filter-row {
        flex-direction: row;
    }
    
    .alp-qa-filter-form .alp-input {
        flex: 1;
    }
}

/* ============================================
   RESPONSIVE - DESKTOP (1024px+)
   ============================================ */
@media (min-width: 1024px) {
    /* Articles */
    .alp-articles-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}
