/* 
 * ALLANTECH Core Design System
 * Modern, Premium, and Responsive
 */

:root {
    /* Color Palette */
    --primary: #00f5ff;
    --primary-glow: rgba(0, 245, 255, 0.4);
    --secondary: #00d4ff;
    --accent: #f43f5e;
    --bg: #010409;
    --sidebar: #0d1117;
    --glass: rgba(0, 245, 255, 0.03);
    --glass-hover: rgba(0, 245, 255, 0.08);
    --glass-border: rgba(0, 245, 255, 0.15);
    --text: #f0f6fc;
    --text-muted: #8b949e;
    --success: #3fb950;
    --warning: #d29922;
    --info: #38bdf8;
    --card-bg: rgba(13, 17, 23, 0.6);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-premium: 0 10px 40px rgba(0, 0, 0, 0.4);

    /* Responsive Spacing (Fluid) */
    --space-xs: clamp(0.5rem, 1vw, 0.75rem);
    --space-sm: clamp(0.75rem, 1.5vw, 1rem);
    --space-md: clamp(1rem, 2vw, 1.5rem);
    --space-lg: clamp(1.5rem, 3vw, 2.5rem);
    --space-xl: clamp(2rem, 5vw, 4rem);

    /* Responsive Typography (clamp(min, preferred, max)) */
    --font-xs: clamp(0.7rem, 0.9vw, 0.8rem);
    --font-sm: clamp(0.8rem, 1vw, 0.95rem);
    --font-base: clamp(0.95rem, 1.2vw, 1.1rem);
    --font-md: clamp(1.1rem, 1.5vw, 1.3rem);
    --font-lg: clamp(1.3rem, 2vw, 1.8rem);
    --font-xl: clamp(1.8rem, 3vw, 2.5rem);
    --font-xxl: clamp(2.2rem, 4vw, 3.5rem);

    /* Breakpoints */
    --bp-sm: 480px;
    --bp-md: 1024px;
    --bp-lg: 1025px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--bg);
    background-image:
        radial-gradient(at 0% 0%, rgba(0, 245, 255, 0.1) 0, transparent 50%),
        radial-gradient(at 100% 100%, rgba(0, 212, 255, 0.1) 0, transparent 50%);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    font-size: var(--font-base);
    overflow-x: hidden;
    /* Prevent horizontal overflow */
}

/* Scrollbar Style */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--glass-border);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* Typography */
h1 {
    font-size: var(--font-xxl);
}

h2 {
    font-size: var(--font-xl);
}

h3 {
    font-size: var(--font-lg);
}

h4 {
    font-size: var(--font-md);
}

h5 {
    font-size: var(--font-sm);
}

h6 {
    font-size: var(--font-xs);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

/* Utility Classes */
.hidden {
    display: none !important;
}

.color-primary {
    color: var(--primary);
}

.color-success {
    color: var(--success);
}

.color-accent {
    color: var(--accent);
}

.color-warning {
    color: var(--warning);
}

.color-info {
    color: var(--info);
}

/* Glass Button Base */
.btn-premium {
    background: transparent;
    color: var(--primary);
    border: 1px solid var(--primary);
    padding: var(--space-sm) var(--space-lg);
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
    font-size: var(--font-sm);
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    outline: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    white-space: nowrap;
}

.btn-premium:hover:not(:disabled) {
    background: var(--primary);
    color: #000;
    box-shadow: 0 0 25px var(--primary-glow);
    transform: translateY(-2px);
}

.btn-premium:active:not(:disabled) {
    transform: translateY(0);
}

.btn-premium:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    border-color: var(--text-muted);
    color: var(--text-muted);
}

.btn-premium.btn-small {
    padding: 0.4rem 0.8rem;
    font-size: 0.75rem;
    border-radius: 8px;
}

/* Glass Card */
.glass-card {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: var(--space-lg);
    transition: var(--transition);
    box-shadow: var(--shadow-premium);
    width: 100%;
    max-width: 100%;
}

.glass-card:hover {
    border-color: var(--primary);
    box-shadow: 0 0 40px rgba(0, 245, 255, 0.08);
}

/* Inputs */
.form-input {
    width: 100%;
    padding: var(--space-sm) var(--space-md);
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: white;
    outline: none;
    transition: var(--transition);
    font-size: var(--font-base);
}

.form-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 15px rgba(0, 245, 255, 0.15);
    background: rgba(0, 0, 0, 0.6);
}

.form-input::placeholder {
    color: var(--text-muted);
    opacity: 0.6;
}

/* Status Pills */
.status-pill {
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    display: inline-block;
}

.status-active,
.status-completed,
.status-user {
    background: rgba(63, 185, 80, 0.1);
    color: var(--success);
    border: 1px solid rgba(63, 185, 80, 0.2);
}

.status-pending,
.status-registered,
.status-warning {
    background: rgba(210, 153, 34, 0.1);
    color: var(--warning);
    border: 1px solid rgba(210, 153, 34, 0.2);
}

.status-in-progress,
.status-processing,
.status-info {
    background: rgba(56, 189, 248, 0.1);
    color: var(--info);
    border: 1px solid rgba(56, 189, 248, 0.2);
}

.status-partial {
    background: rgba(0, 245, 255, 0.1);
    color: var(--primary);
    border: 1px solid rgba(0, 245, 255, 0.2);
}

.status-cancelled,
.status-failed,
.status-admin {
    background: rgba(244, 63, 94, 0.1);
    color: var(--accent);
    border: 1px solid rgba(244, 63, 94, 0.2);
}


/* Button Loading State */
.btn-premium.loading {
    color: transparent !important;
    position: relative;
    pointer-events: none;
}

.btn-premium.loading::after {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    top: calc(50% - 12px);
    left: calc(50% - 12px);
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--primary);
    animation: spin 0.8s linear infinite;
}

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

/* Notification System */
#notification-container {
    position: fixed;
    top: 2rem;
    right: 2rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    pointer-events: none;
}

.notification-tile {
    min-width: min(320px, 100%);
    max-width: 450px;
    background: var(--sidebar);
    border: 1px solid var(--glass-border);
    border-left: 4px solid var(--primary);
    border-radius: 12px;
    padding: var(--space-md);
    box-shadow: var(--shadow-premium);
    display: flex;
    align-items: flex-start;
    gap: 12px;
    pointer-events: auto;
    animation: slideInRight 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transition: var(--transition);
    position: relative;
    backdrop-filter: blur(10px);
}

.notification-tile.closing {
    animation: slideOutRight 0.3s ease-in forwards;
}

.notification-tile.success {
    border-left-color: var(--success);
}

.notification-tile.error {
    border-left-color: var(--accent);
}

.notification-tile.warning {
    border-left-color: var(--warning);
}

.notification-icon {
    font-size: 1.2rem;
    margin-top: 2px;
}

.notification-tile.success .notification-icon {
    color: var(--success);
}

.notification-tile.error .notification-icon {
    color: var(--accent);
}

.notification-tile.warning .notification-icon {
    color: var(--warning);
}

.notification-content {
    flex: 1;
}

.notification-title {
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.notification-message {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.notification-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    font-size: 1rem;
    opacity: 0.5;
    transition: var(--transition);
}

.notification-close:hover {
    opacity: 1;
    color: var(--text);
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px) scale(0.9);
    }

    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

@keyframes slideOutRight {
    to {
        opacity: 0;
        transform: translateX(50px) scale(0.9);
    }
}

/* Responsive Utilities */
@media (max-width: 768px) {
    .glass-card {
        padding: 1.5rem;
    }

    #notification-container {
        top: 1rem;
        right: 1rem;
        left: 1rem;
    }

    .notification-tile {
        min-width: 0;
        width: 100%;
    }
}

/* Floating WhatsApp Icon */
.whatsapp-float {
    position: fixed;
    bottom: var(--space-lg);
    right: var(--space-lg);
    z-index: 1002;
    width: clamp(50px, 8vw, 60px);
    height: clamp(50px, 8vw, 60px);
    background-color: #25d366;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(24px, 4vw, 30px);
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    transition: var(--transition);
    text-decoration: none;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.whatsapp-float:hover {
    transform: scale(1.1) rotate(5deg);
    background-color: #128c7e;
    box-shadow: 0 6px 25px rgba(37, 211, 102, 0.6);
    color: white;
}

.whatsapp-float i {
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}