/**
 * TextRad Admin Dashboard - Custom Styles
 */

:root {
    --color-bg-primary: #111827;
    --color-bg-secondary: #1f2937;
    --color-bg-tertiary: #374151;
    --color-text-primary: #f9fafb;
    --color-text-secondary: #9ca3af;
    --color-blue: #3b82f6;
    --color-blue-hover: #2563eb;
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    margin: 0;
    padding: 0;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--color-bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--color-bg-tertiary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #4b5563;
}

/* Animation for toast notifications */
@keyframes slide-in {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.animate-slide-in {
    animation: slide-in 0.3s ease-out;
}

/* Tab styles */
.admin-tab {
    transition: all 0.2s;
}

.admin-tab:hover {
    border-color: #6b7280;
}

.admin-tab.active {
    border-color: var(--color-blue);
    color: var(--color-blue);
}

/* Form input focus styles */
input:focus,
select:focus,
textarea:focus {
    outline: none;
    ring: 2px;
    ring-color: var(--color-blue);
}

/* Button hover effects */
button {
    transition: all 0.2s;
}

button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

button:active {
    transform: translateY(0);
}

/* Card hover effects */
.bg-gray-800:hover {
    background-color: #1f2937;
    transition: background-color 0.2s;
}

.bg-gray-700:hover {
    background-color: #374151;
}

/* Stat cards */
.stat-card {
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--color-blue), #8b5cf6);
    opacity: 0;
    transition: opacity 0.3s;
}

.stat-card:hover::before {
    opacity: 1;
}

/* Loading spinner */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.animate-spin {
    animation: spin 1s linear infinite;
}

/* Smooth transitions */
.transition {
    transition-property: all;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

/* Activity feed items */
#activity-feed > div {
    transition: all 0.2s;
}

/* Toast container */
#toast-container > div {
    transition: opacity 0.3s;
}

/* User info card gradient border */
#user-info-card {
    position: relative;
    border: 1px solid transparent;
    background: linear-gradient(var(--color-bg-secondary), var(--color-bg-secondary)) padding-box,
                linear-gradient(135deg, var(--color-blue), #8b5cf6) border-box;
}

/* Responsive tweaks */
@media (max-width: 768px) {
    .admin-tab {
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
    }

    h1 {
        font-size: 1.5rem;
    }

    h2 {
        font-size: 1.25rem;
    }
}

/* Disable button state */
button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* Confirmation modal styles (if needed) */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
}

.modal-content {
    background-color: var(--color-bg-secondary);
    border-radius: 0.5rem;
    padding: 2rem;
    max-width: 32rem;
    margin: 1rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Status badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 9999px;
}

.status-badge.active {
    background-color: #10b981;
    color: white;
}

.status-badge.disabled {
    background-color: #ef4444;
    color: white;
}

.status-badge.trial {
    background-color: #f59e0b;
    color: white;
}

/* Custom checkbox and radio styles */
input[type="checkbox"],
input[type="radio"] {
    cursor: pointer;
}

/* Gradient text */
.gradient-text {
    background: linear-gradient(135deg, var(--color-blue), #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Loading skeleton */
.skeleton {
    background: linear-gradient(90deg, #374151 25%, #4b5563 50%, #374151 75%);
    background-size: 200% 100%;
    animation: loading 1.5s ease-in-out infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
    color: var(--color-text-secondary);
}

.empty-state svg {
    width: 4rem;
    height: 4rem;
    margin: 0 auto 1rem;
    opacity: 0.5;
}
