/* ============================================
   VISUAL ENHANCEMENTS - Pharmdata Design System
   Adiciona vida visual mantendo elegância
   ============================================ */

/* ========== BODY BACKGROUND ========== */

body {
    background: linear-gradient(180deg,
        var(--cloud, #F5F8FA) 0%,
        var(--cloud, #F5F8FA) 50%,
        rgba(183, 228, 213, 0.02) 100%);
    background-attachment: fixed;
}

/* ========== CARDS & CONTAINERS ========== */

.section,
[class*="card"],
[class*="container"],
main > div {
    box-shadow: var(--shadow-md, 0 4px 6px -1px rgba(11, 45, 42, 0.1));
    border: 1px solid rgba(183, 228, 213, 0.15);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.section:hover,
[class*="card"]:hover {
    box-shadow: var(--shadow-lg, 0 10px 15px -3px rgba(11, 45, 42, 0.15));
    border-color: rgba(183, 228, 213, 0.3);
}

/* ========== HEADERS ========== */

header {
    box-shadow: var(--shadow-lg, 0 10px 15px -3px rgba(11, 45, 42, 0.15));
    border-bottom: 1px solid rgba(183, 228, 213, 0.2);
    background: linear-gradient(135deg,
        var(--emerald-abyss, #0B2D2A) 0%,
        rgba(11, 45, 42, 0.95) 100%);
}

/* ========== BUTTONS ========== */

button[class*="bg-forest"],
button[class*="bg-emerald"],
input[type="submit"],
input[type="button"] {
    box-shadow: 0 2px 4px rgba(11, 45, 42, 0.15);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

button[class*="bg-forest"]:hover,
button[class*="bg-emerald"]:hover,
input[type="submit"]:hover,
input[type="button"]:hover {
    box-shadow: var(--shadow-lg, 0 10px 15px -3px rgba(11, 45, 42, 0.15));
    transform: translateY(-2px);
}

button[class*="bg-forest"]:active,
button[class*="bg-emerald"]:active,
input[type="submit"]:active,
input[type="button"]:active {
    transform: translateY(0);
    box-shadow: 0 1px 3px rgba(11, 45, 42, 0.1);
}

/* ========== TABLES ========== */

table {
    box-shadow: var(--shadow-md, 0 4px 6px -1px rgba(11, 45, 42, 0.1));
    border-collapse: separate;
    border-spacing: 0;
}

thead {
    background: linear-gradient(180deg,
        rgba(183, 228, 213, 0.08) 0%,
        rgba(183, 228, 213, 0.04) 100%);
}

tbody tr:hover {
    background: rgba(183, 228, 213, 0.05);
    transition: background-color 0.15s ease;
}

/* ========== INPUTS & FORMS ========== */

input,
textarea,
select {
    border: 1px solid rgba(183, 228, 213, 0.3);
    box-shadow: inset 0 1px 2px rgba(11, 45, 42, 0.04);
    transition: all 0.2s ease;
}

input:focus,
textarea:focus,
select:focus {
    border-color: var(--mint-signal, #B7E4D5);
    box-shadow: 0 0 0 3px rgba(183, 228, 213, 0.1),
                inset 0 1px 2px rgba(11, 45, 42, 0.04);
    outline: none;
}

/* ========== BADGES & PILLS ========== */

[class*="badge"],
[class*="pill"],
[class*="drop"] {
    box-shadow: 0 1px 3px rgba(11, 45, 42, 0.08);
    transition: all 0.2s ease;
}

[class*="badge"]:hover,
[class*="pill"]:hover,
[class*="drop"]:hover {
    box-shadow: 0 2px 6px rgba(11, 45, 42, 0.12);
}

/* ========== LINKS ========== */

a[class*="link"],
a:not([class]) {
    transition: all 0.2s ease;
    position: relative;
}

a[class*="link"]:hover,
a:not([class]):hover {
    color: var(--teal-intense, #1a8b7d);
}

/* ========== ACCENT BORDERS ========== */

.section-title,
h1, h2, h3, h4, h5, h6 {
    position: relative;
}

h2:before,
h1:before {
    content: '';
    position: absolute;
    left: 0;
    bottom: -8px;
    width: 40px;
    height: 3px;
    background: linear-gradient(90deg,
        var(--mint-signal, #B7E4D5) 0%,
        rgba(183, 228, 213, 0.3) 100%);
    border-radius: 2px;
}

/* ========== DIVIDERS ========== */

hr,
[class*="divider"] {
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(183, 228, 213, 0.3) 50%,
        transparent 100%);
    border: none;
    height: 1px;
}

/* ========== LOADING STATES ========== */

@keyframes subtle-pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.85;
    }
}

[class*="loading"],
[class*="skeleton"] {
    animation: subtle-pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* ========== TRANSITIONS & INTERACTIONS ========== */

* {
    --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========== ACCESSIBILITY ========== */

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ========== DARK MODE ENHANCEMENTS ========== */

:root.dark-mode body,
[data-theme="dark"] body {
    background: linear-gradient(180deg,
        var(--cloud, #0d1117) 0%,
        var(--cloud, #0d1117) 50%,
        rgba(26, 61, 58, 0.05) 100%);
    background-attachment: fixed;
}

:root.dark-mode .section,
:root.dark-mode [class*="card"],
:root.dark-mode [class*="container"],
:root.dark-mode main > div,
[data-theme="dark"] .section,
[data-theme="dark"] [class*="card"],
[data-theme="dark"] [class*="container"],
[data-theme="dark"] main > div {
    background: var(--arctic-mist);
    border: 1px solid rgba(183, 228, 213, 0.15);
    box-shadow: var(--shadow-md);
}

:root.dark-mode header,
[data-theme="dark"] header {
    background: linear-gradient(135deg,
        #0d1117 0%,
        rgba(13, 17, 23, 0.95) 100%);
    border-bottom-color: rgba(183, 228, 213, 0.1);
}

:root.dark-mode thead,
[data-theme="dark"] thead {
    background: linear-gradient(180deg,
        rgba(183, 228, 213, 0.05) 0%,
        rgba(183, 228, 213, 0.02) 100%);
}

:root.dark-mode tbody tr:hover,
[data-theme="dark"] tbody tr:hover {
    background: rgba(183, 228, 213, 0.03);
}

:root.dark-mode input,
:root.dark-mode textarea,
:root.dark-mode select,
[data-theme="dark"] input,
[data-theme="dark"] textarea,
[data-theme="dark"] select {
    background: var(--arctic-mist);
    color: var(--graphite-depth);
    border-color: rgba(183, 228, 213, 0.15);
}

:root.dark-mode input:focus,
:root.dark-mode textarea:focus,
:root.dark-mode select:focus,
[data-theme="dark"] input:focus,
[data-theme="dark"] textarea:focus,
[data-theme="dark"] select:focus {
    border-color: var(--teal-intense);
    box-shadow: 0 0 0 3px rgba(61, 201, 189, 0.15);
}

:root.dark-mode hr,
:root.dark-mode [class*="divider"],
[data-theme="dark"] hr,
[data-theme="dark"] [class*="divider"] {
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(183, 228, 213, 0.15) 50%,
        transparent 100%);
}

:root.dark-mode h2:before,
:root.dark-mode h1:before,
[data-theme="dark"] h2:before,
[data-theme="dark"] h1:before {
    background: linear-gradient(90deg,
        var(--teal-intense, #1a8b7d) 0%,
        rgba(61, 201, 189, 0.3) 100%);
}

/* Auto dark mode - comentado por padrão, descomente para ativar detecção automática */
/*
@media (prefers-color-scheme: dark) {
    :root:not(.light-mode) {
        --cloud: #0d1117;
        --arctic-mist: #161b22;
        --soft-arctic: #21262d;
        --graphite-depth: #e6edf3;
        --soft-steel: #8b949e;
    }
}
*/
