/* ============================================================
   P2P Platform - App Styles
   ============================================================ */

/* Base */
* { box-sizing: border-box; }

/* Navigation Links */
.nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 0.75rem;
    border-radius: 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #6b7280;
    transition: all 0.15s;
    text-decoration: none;
}

.nav-link:hover {
    background-color: #f9fafb;
    color: #111827;
}

.dark .nav-link:hover {
    background-color: rgba(255,255,255,0.05);
    color: #f3f4f6;
}

.nav-link.active {
    background-color: #eff6ff;
    color: #2563eb;
}

.dark .nav-link.active {
    background-color: rgba(37, 99, 235, 0.15);
    color: #60a5fa;
}

/* Form Inputs */
.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    border: 1px solid #d1d5db;
    background-color: #ffffff;
    color: #111827;
    font-size: 0.875rem;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.form-input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.dark .form-input {
    background-color: #374151;
    border-color: #4b5563;
    color: #f9fafb;
}

.dark .form-input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.form-input::placeholder {
    color: #9ca3af;
}

/* Select */
.select-input {
    width: 100%;
    padding: 0.625rem 0.75rem;
    border-radius: 0.75rem;
    border: 1px solid #d1d5db;
    background-color: #ffffff;
    color: #111827;
    font-size: 0.875rem;
    outline: none;
    cursor: pointer;
    transition: border-color 0.15s;
}

.select-input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.dark .select-input {
    background-color: #374151;
    border-color: #4b5563;
    color: #f9fafb;
}

/* Buttons */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    border-radius: 0.75rem;
    background-color: #2563eb;
    color: white;
    font-size: 0.875rem;
    font-weight: 500;
    transition: background-color 0.15s;
    cursor: pointer;
    border: none;
    text-decoration: none;
}

.btn-primary:hover { background-color: #1d4ed8; }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    border-radius: 0.75rem;
    background-color: #f3f4f6;
    color: #374151;
    font-size: 0.875rem;
    font-weight: 500;
    transition: background-color 0.15s;
    cursor: pointer;
    border: 1px solid #e5e7eb;
    text-decoration: none;
}

.btn-secondary:hover { background-color: #e5e7eb; }
.dark .btn-secondary {
    background-color: #374151;
    color: #f9fafb;
    border-color: #4b5563;
}

.btn-danger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    border-radius: 0.75rem;
    background-color: #dc2626;
    color: white;
    font-size: 0.875rem;
    font-weight: 500;
    transition: background-color 0.15s;
    cursor: pointer;
    border: none;
    text-decoration: none;
}

.btn-danger:hover { background-color: #b91c1c; }

/* Skeleton Loader */
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.skeleton {
    background: linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 50%, #f3f4f6 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 0.75rem;
}

.dark .skeleton {
    background: linear-gradient(90deg, #374151 25%, #4b5563 50%, #374151 75%);
    background-size: 200% 100%;
}

/* Toast Notifications */
.toast {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-radius: 0.75rem;
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
    max-width: 360px;
    animation: slideIn 0.3s ease, fadeOut 0.3s ease 3.7s forwards;
    pointer-events: none;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(100%); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

.toast-success { background: #f0fdf4; color: #166534; border: 1px solid #86efac; }
.toast-error { background: #fef2f2; color: #991b1b; border: 1px solid #fca5a5; }
.toast-warning { background: #fffbeb; color: #92400e; border: 1px solid #fcd34d; }
.toast-info { background: #eff6ff; color: #1e40af; border: 1px solid #93c5fd; }

/* Line clamp */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Custom scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 9999px; }
::-webkit-scrollbar-thumb:hover { background: #9ca3af; }
.dark ::-webkit-scrollbar-thumb { background: #4b5563; }

/* Status badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.125rem 0.625rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

/* Rating stars */
.stars { color: #fbbf24; letter-spacing: -1px; }

/* Transitions */
[x-cloak] { display: none !important; }

/* Focus visible */
*:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .sidebar, header, footer, .btn-primary, .btn-secondary, .btn-danger { display: none !important; }
    main { margin: 0 !important; padding: 0 !important; }
}
