/* ========================================
   DIGITALVOICES REPAIR SYSTEM - ENHANCED
   Dark Purple & Gold Animated Theme
   No White Backgrounds - Full Coverage
   ======================================== */

/* GLOBAL BODY BACKGROUND - Full Coverage */
body {
    background: linear-gradient(
        135deg,
        #0a0015 0%,
        #1a0033 25%,
        #2d0a4e 50%,
        #3b0764 75%,
        #000000 100%
    ) !important;
    background-attachment: fixed !important;
    background-size: 400% 400% !important;
    animation: dvGlobalGradient 25s ease infinite !important;
    min-height: 100vh;
}

@keyframes dvGlobalGradient {
    0% { background-position: 0% 50%; }
    25% { background-position: 50% 75%; }
    50% { background-position: 100% 50%; }
    75% { background-position: 50% 25%; }
    100% { background-position: 0% 50%; }
}

/* Main Wrapper - Animated Gradient */
body .dv-wrapper {
    margin: 0 auto 24px;
    padding: 16px 10px;
    max-width: 1200px;
    background: linear-gradient(
        135deg,
        #1a0033 0%,
        #2d0a4e 15%,
        #0f001a 30%,
        #3b0764 50%,
        #1a0033 70%,
        #0a0015 85%,
        #000000 100%
    );
    background-size: 400% 400%;
    animation: dvWrapperGradient 20s ease infinite;
    border-radius: 32px;
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.9), 0 0 60px rgba(139, 92, 246, 0.3);
    position: relative;
    overflow: hidden;
}

@keyframes dvWrapperGradient {
    0% { background-position: 0% 50%; }
    25% { background-position: 50% 75%; }
    50% { background-position: 100% 50%; }
    75% { background-position: 50% 25%; }
    100% { background-position: 0% 50%; }
}

/* Floating Gold Orb - Enhanced */
body .dv-wrapper::before {
    content: "";
    position: absolute;
    width: 350px;
    height: 350px;
    border-radius: 999px;
    background: radial-gradient(
        circle at center,
        rgba(250, 204, 21, 0.4) 0%,
        rgba(212, 175, 55, 0.25) 30%,
        transparent 70%
    );
    top: -120px;
    right: -100px;
    filter: blur(60px);
    animation: dvFloatGold 25s ease-in-out infinite;
    pointer-events: none;
    mix-blend-mode: screen;
    opacity: 0.8;
    z-index: 1;
}

@keyframes dvFloatGold {
    0%, 100% {
        transform: translate(0, 0) scale(1);
        opacity: 0.7;
    }
    25% {
        transform: translate(-40px, 50px) scale(1.15);
        opacity: 0.9;
    }
    50% {
        transform: translate(-70px, -30px) scale(0.95);
        opacity: 0.75;
    }
    75% {
        transform: translate(-30px, 60px) scale(1.1);
        opacity: 0.85;
    }
}

/* Floating Purple Orb - Enhanced */
body .dv-wrapper::after {
    content: "";
    position: absolute;
    width: 400px;
    height: 400px;
    border-radius: 999px;
    background: radial-gradient(
        circle at center,
        rgba(139, 92, 246, 0.4) 0%,
        rgba(168, 85, 247, 0.25) 40%,
        transparent 70%
    );
    bottom: -150px;
    left: -120px;
    filter: blur(70px);
    animation: dvFloatPurple 30s ease-in-out infinite;
    pointer-events: none;
    mix-blend-mode: screen;
    opacity: 0.7;
    z-index: 1;
}

@keyframes dvFloatPurple {
    0%, 100% {
        transform: translate(0, 0) scale(1);
        opacity: 0.6;
    }
    33% {
        transform: translate(50px, -40px) scale(1.2);
        opacity: 0.8;
    }
    66% {
        transform: translate(90px, 30px) scale(0.9);
        opacity: 0.7;
    }
}

/* Cards with Shimmer */
.dv-card {
    background: radial-gradient(circle at top left, rgba(212, 175, 55, 0.07), transparent 55%),
                radial-gradient(circle at bottom right, rgba(88, 28, 135, 0.3), transparent 55%),
                #020014;
    border-radius: 20px;
    padding: 18px 20px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.7);
    margin-bottom: 18px;
    color: #e5e7eb;
    position: relative;
    overflow: hidden;
    z-index: 2;
}

/* Card Shimmer Effect */
.dv-card::before {
    content: "";
    position: absolute;
    top: -50%;
    left: -100%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(250, 204, 21, 0.1) 50%,
        transparent 100%
    );
    animation: dvCardShimmer 12s linear infinite;
    pointer-events: none;
    z-index: 1;
}

@keyframes dvCardShimmer {
    0% { transform: translateX(0); }
    100% { transform: translateX(100%); }
}

/* Card Glow Pulse */
.dv-card::after {
    content: "";
    position: absolute;
    inset: -40%;
    background: radial-gradient(circle at 0 0, rgba(250, 204, 21, 0.12), transparent 55%),
                radial-gradient(circle at 100% 100%, rgba(139, 92, 246, 0.18), transparent 55%);
    opacity: 0.6;
    pointer-events: none;
    mix-blend-mode: screen;
    animation: dvCardGlow 8s ease-in-out infinite;
    z-index: 0;
}

@keyframes dvCardGlow {
    0%, 100% {
        opacity: 0.4;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.05);
    }
}

/* Hero Card Enhanced */
.dv-card-hero {
    background: radial-gradient(circle at top left, rgba(250, 204, 21, 0.15), transparent 60%),
                radial-gradient(circle at center, rgba(139, 92, 246, 0.12), transparent 70%),
                #020014;
}

.dv-card-hero::before {
    content: "";
    position: absolute;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.4), transparent 70%);
    top: -60px;
    right: -60px;
    filter: blur(40px);
    animation: dvHeroGlow 12s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes dvHeroGlow {
    0%, 100% {
        transform: translate(0, 0) scale(1);
        opacity: 0.5;
    }
    50% {
        transform: translate(-20px, 20px) scale(1.2);
        opacity: 0.8;
    }
}

/* Typography */
.dv-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #facc15;
    margin: 0 0 6px;
    position: relative;
    z-index: 3;
}

.dv-section-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: #f9fafb;
    margin: 0 0 6px;
    position: relative;
    z-index: 3;
}

.dv-subtitle {
    font-size: 0.9rem;
    font-weight: 600;
    color: #c4b5fd;
    margin: 10px 0 4px;
    position: relative;
    z-index: 3;
}

.dv-tagline {
    font-size: 0.85rem;
    color: #9ca3af;
    margin: 4px 0;
    position: relative;
    z-index: 3;
}

.dv-hint {
    font-size: 0.8rem;
    color: #a5b4fc;
    margin-top: 6px;
    position: relative;
    z-index: 3;
}

.dv-label {
    font-size: 0.82rem;
    color: #e5e7eb;
    margin-top: 4px;
    position: relative;
    z-index: 3;
}

/* Form Elements */
.dv-input,
.dv-select,
.dv-textarea {
    width: 100%;
    background: rgba(15, 23, 42, 0.95);
    color: #e5e7eb;
    border-radius: 999px;
    border: 1px solid #4b5563;
    padding: 8px 12px;
    font-size: 0.9rem;
    margin-bottom: 8px;
    outline: none;
    transition: all 0.3s ease;
    position: relative;
    z-index: 3;
}

.dv-textarea {
    border-radius: 16px;
    min-height: 80px;
    resize: vertical;
}

.dv-input:focus,
.dv-select:focus,
.dv-textarea:focus {
    border-color: #a855f7;
    box-shadow: 0 0 0 2px rgba(168, 85, 247, 0.3),
                0 0 20px rgba(168, 85, 247, 0.6),
                0 0 40px rgba(250, 204, 21, 0.3);
    transform: translateY(-1px);
}

/* Buttons with Enhanced Animation */
.dv-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #8b5cf6, #d4af37);
    border-radius: 999px;
    border: none;
    padding: 8px 18px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #020617;
    cursor: pointer;
    box-shadow: 0 14px 40px rgba(76, 29, 149, 0.9);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    z-index: 3;
}

.dv-btn::after {
    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 ease, height 0.6s ease;
}

.dv-btn:hover::after {
    width: 300px;
    height: 300px;
}

.dv-btn:hover {
    transform: translateY(-2px) scale(1.02);
    filter: brightness(1.15);
    box-shadow: 0 20px 50px rgba(76, 29, 149, 1), 0 0 40px rgba(250, 204, 21, 0.5);
}

.dv-btn-secondary {
    background: radial-gradient(circle at top left, rgba(139, 92, 246, 0.9), rgba(15, 23, 42, 1));
    color: #e5e7eb;
    border: 1px solid rgba(212, 175, 55, 0.5);
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.9);
}

.dv-btn-outline {
    background: transparent;
    color: #e5e7eb;
    border: 1px solid rgba(148, 163, 184, 0.7);
    box-shadow: none;
}

.dv-btn-outline:hover {
    border-color: #facc15;
    box-shadow: 0 0 20px rgba(250, 204, 21, 0.4);
}

/* Dashboard Grid */
.dv-dashboard-grid {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    margin-bottom: 18px;
}

/* Auth Grid */
.dv-auth-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 18px;
}

/* Table Styling */
.dv-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    position: relative;
    z-index: 3;
}

.dv-table th,
.dv-table td {
    padding: 8px 10px;
    border-bottom: 1px solid rgba(15, 23, 42, 0.9);
}

.dv-table th {
    text-align: left;
    color: #9ca3af;
    font-weight: 500;
}

.dv-table tbody tr {
    transition: all 0.3s ease;
}

.dv-table tbody tr:hover {
    background: linear-gradient(90deg, rgba(139, 92, 246, 0.2) 0%, rgba(15, 23, 42, 0.9) 100%);
    transform: translateX(5px);
    box-shadow: -5px 0 15px rgba(250, 204, 21, 0.2);
}

/* Badges with Pulse */
.dv-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    animation: dvBadgePulse 2s ease-in-out infinite;
    position: relative;
    z-index: 3;
}

@keyframes dvBadgePulse {
    0%, 100% {
        box-shadow: 0 0 10px rgba(250, 204, 21, 0.4);
    }
    50% {
        box-shadow: 0 0 20px rgba(250, 204, 21, 0.7);
    }
}

.dv-badge-status-new,
.dv-badge-status_intake {
    background: rgba(59, 130, 246, 0.25);
    color: #bfdbfe;
}

.dv-badge-status_assigned,
.dv-badge-status_diagnosing,
.dv-badge-status_in_repair {
    background: rgba(168, 85, 247, 0.3);
    color: #e9d5ff;
}

.dv-badge-status_ready_for_pickup {
    background: rgba(34, 197, 94, 0.3);
    color: #bbf7d0;
}

.dv-badge-status_collected {
    background: rgba(55, 65, 81, 0.8);
    color: #d1d5db;
}

/* Lists */
.dv-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.dv-list-item {
    padding: 8px 6px;
    border-radius: 10px;
    border: 1px solid rgba(15, 23, 42, 0.9);
    margin-bottom: 6px;
    background: radial-gradient(circle at top left, rgba(15, 23, 42, 0.8), rgba(2, 6, 23, 1));
    position: relative;
    z-index: 3;
}

/* Chat Box */
.dv-chat-box {
    max-height: 220px;
    overflow-y: auto;
    border-radius: 12px;
    border: 1px solid #374151;
    padding: 8px;
    background: radial-gradient(circle at top left, rgba(15, 23, 42, 0.96), rgba(2, 6, 23, 1));
    margin-bottom: 8px;
    position: relative;
    z-index: 3;
}

.dv-chat-message {
    margin-bottom: 6px;
    font-size: 0.8rem;
}

.dv-chat-meta {
    opacity: 0.6;
    font-size: 0.75rem;
}

.dv-chat-form {
    margin-top: 6px;
}

/* Messages Layout */
.dv-messages-layout {
    display: grid;
    grid-template-columns: minmax(160px, 260px) minmax(0, 1fr);
    gap: 14px;
}

.dv-messages-list {
    border-right: 1px solid rgba(31, 41, 55, 0.7);
    padding-right: 8px;
}

.dv-messages-panel {
    padding-left: 4px;
}

/* Media Grid */
.dv-media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
    gap: 6px;
    margin-top: 6px;
}

.dv-media-item img,
.dv-media-item video {
    width: 100%;
    border-radius: 10px;
    display: block;
}

/* Inline Elements */
.dv-inline {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: #e5e7eb;
}

/* Divider */
.dv-divider {
    border: none;
    border-top: 1px solid rgba(31, 41, 55, 0.8);
    margin: 14px 0;
}

/* Links */
.dv-link {
    color: #facc15;
    font-size: 0.8rem;
    text-decoration: underline;
    transition: color 0.2s ease;
}

.dv-link:hover {
    color: #fde047;
}

/* Subsection */
.dv-subsection {
    margin-top: 8px;
    padding-top: 6px;
    border-top: 1px dashed rgba(55, 65, 81, 0.9);
}

/* Alert Success with Animation */
.dv-alert-success {
    background: rgba(22, 163, 74, 0.18);
    border: 1px solid rgba(34, 197, 94, 0.6);
    color: #bbf7d0;
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 0.85rem;
    margin-bottom: 10px;
    animation: dvAlertPop 0.5s ease-out;
    position: relative;
    z-index: 3;
}

@keyframes dvAlertPop {
    0% {
        transform: translateY(-20px) scale(0.95);
        opacity: 0;
    }
    60% {
        transform: translateY(5px) scale(1.02);
    }
    100% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

/* Spin Wheel */
.dv-spin-wheel-placeholder {
    width: 140px;
    height: 140px;
    border-radius: 999px;
    margin: 0 auto;
    background: conic-gradient(from 0deg, #facc15, #f97316, #a855f7, #22c55e, #3b82f6, #facc15);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 30px rgba(250, 204, 21, 0.6), 0 0 60px rgba(139, 92, 246, 0.4);
    animation: dvSpinGlow 3s ease-in-out infinite;
}

@keyframes dvSpinGlow {
    0%, 100% {
        box-shadow: 0 0 30px rgba(250, 204, 21, 0.6), 0 0 60px rgba(139, 92, 246, 0.4);
    }
    50% {
        box-shadow: 0 0 50px rgba(250, 204, 21, 0.9), 0 0 90px rgba(139, 92, 246, 0.6);
    }
}

.dv-spin-wheel-inner {
    width: 70%;
    height: 70%;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.96);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
}

/* Referral Link */
.dv-ref-link {
    padding: 8px 10px;
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.95);
    font-size: 0.8rem;
    word-break: break-all;
    border: 1px dashed rgba(250, 204, 21, 0.4);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    body .dv-wrapper {
        padding: 12px 8px;
    }
    
    body .dv-wrapper::before {
        width: 250px;
        height: 250px;
        animation-duration: 30s;
    }
    
    body .dv-wrapper::after {
        width: 280px;
        height: 280px;
        animation-duration: 35s;
    }
    
    .dv-card::before {
        animation-duration: 15s;
    }
    
    .dv-card-hero {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .dv-messages-layout {
        grid-template-columns: 1fr;
    }
}

/* Accessibility - Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
