/* ============================================================
   MarketMate — Design System CSS
   Importado por index.html, admin.html, manager.html
   ============================================================ */

/* ---------- Login page ---------- */
.mm-login-wrapper {
    display: flex; min-height: 100vh; background: #0f172a;
}
.mm-login-hero {
    flex: 1.1;
    background: linear-gradient(145deg, #0d4222 0%, #16a34a 50%, #15803d 100%);
    display: flex; align-items: center; justify-content: center;
    position: relative; overflow: hidden;
}
.mm-login-hero::before {
    content: '';
    position: absolute; inset: 0;
    background: radial-gradient(ellipse at 30% 70%, rgba(255,255,255,.07) 0%, transparent 60%);
}
.mm-login-hero-inner {
    position: relative; z-index: 1; max-width: 420px; padding: 2rem;
}
.mm-login-logo {
    width: 72px; height: 72px;
    background: rgba(255,255,255,.15);
    backdrop-filter: blur(8px);
    border-radius: 20px;
    display: flex; align-items: center; justify-content: center;
    font-size: 2rem; color: #fff; margin-bottom: 1.5rem;
    box-shadow: 0 4px 24px rgba(0,0,0,.2);
}
.mm-login-brand {
    font-size: 2.5rem; font-weight: 800; color: #fff;
    margin: 0 0 .5rem;
    text-shadow: 0 2px 12px rgba(0,0,0,.3);
}
.mm-login-tagline {
    color: rgba(255,255,255,.8); font-size: 1rem; margin-bottom: 2.5rem; line-height: 1.5;
}
.mm-login-features { display: flex; flex-direction: column; gap: .75rem; }
.mm-feature-item {
    color: rgba(255,255,255,.85); font-size: .875rem;
    display: flex; align-items: center; gap: .6rem;
}
.mm-feature-item i { color: #86efac; font-size: .9rem; }

.mm-login-form-panel {
    width: 440px; flex-shrink: 0; display: flex; align-items: center;
    justify-content: center; background: #0f172a; padding: 2rem;
}
.mm-login-form-inner { width: 100%; max-width: 380px; }
.mm-login-form-header { margin-bottom: 2rem; }
.mm-login-form-header h2 { font-size: 1.75rem; font-weight: 700; color: #f8fafc; margin: 0 0 .4rem; }
.mm-login-form-header p  { color: #94a3b8; font-size: .9rem; margin: 0; }

.mm-alert {
    padding: .75rem 1rem; border-radius: 8px; font-size: .875rem;
    display: flex; align-items: center; gap: .5rem; margin-bottom: 1.25rem;
}
.mm-alert-error {
    background: rgba(239,68,68,.15); color: #fca5a5;
    border: 1px solid rgba(239,68,68,.3);
}
.mm-alert-success {
    background: rgba(22,163,74,.15); color: #86efac;
    border: 1px solid rgba(22,163,74,.3);
}
.mm-form-group { display: flex; flex-direction: column; gap: .45rem; }
.mm-form-label { font-size: .8rem; font-weight: 600; color: #94a3b8; display: flex; align-items: center; gap: .4rem; }

.mm-input {
    background: #1e293b; border: 1px solid rgba(255,255,255,.08);
    border-radius: 10px; color: #f8fafc; padding: .75rem 1rem;
    font-size: .9rem; width: 100%; outline: none;
    transition: border-color .15s, box-shadow .15s;
    font-family: 'Inter', sans-serif;
}
.mm-input:focus { border-color: #16a34a; box-shadow: 0 0 0 3px rgba(22,163,74,.15); }
.mm-input::placeholder { color: #475569; }
.mm-input-error { border-color: #ef4444 !important; }

.mm-input-wrapper { position: relative; }
.mm-input-wrapper .mm-input { padding-right: 2.75rem; }
.mm-input-eye {
    position: absolute; right: .75rem; top: 50%; transform: translateY(-50%);
    background: none; border: none; color: #64748b; cursor: pointer; padding: 0;
    font-size: .95rem; transition: color .15s;
}
.mm-input-eye:hover { color: #94a3b8; }
.mm-field-error { font-size: .75rem; color: #fca5a5; }

.mm-btn-login {
    width: 100%; padding: .85rem; border-radius: 10px; border: none;
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
    color: #fff; font-size: .95rem; font-weight: 700; cursor: pointer;
    display: flex; align-items: center; justify-content: center; gap: .6rem;
    transition: all .2s; font-family: 'Inter', sans-serif;
    box-shadow: 0 4px 16px rgba(22,163,74,.35);
}
.mm-btn-login:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 6px 24px rgba(22,163,74,.45);
}
.mm-btn-login:disabled { opacity: .6; cursor: not-allowed; }
.mm-spinner {
    width: 16px; height: 16px; border: 2px solid rgba(255,255,255,.3);
    border-top-color: #fff; border-radius: 50%;
    animation: mm-spin .6s linear infinite; display: inline-block;
}
@keyframes mm-spin { to { transform: rotate(360deg); } }

.mm-login-footer { margin-top: 1.75rem; text-align: center; }

@media (max-width: 768px) {
    .mm-login-hero { display: none; }
    .mm-login-form-panel { width: 100%; padding: 1.5rem; }
}

/* ---------- Sidebar Layout ---------- */
.mm-app-layout { display: flex; min-height: 100vh; }
.mm-sidebar {
    width: 240px; min-height: 100vh; background: var(--mm-surface);
    border-right: 1px solid var(--mm-border); flex-shrink: 0;
    display: flex; flex-direction: column;
    position: fixed; top: 0; left: 0; z-index: 100;
}
.mm-main { margin-left: 240px; flex: 1; min-height: 100vh; overflow-x: hidden; }
.mm-topbar {
    height: 60px; background: var(--mm-surface);
    border-bottom: 1px solid var(--mm-border);
    display: flex; align-items: center; padding: 0 1.5rem; gap: 1rem;
    position: sticky; top: 0; z-index: 90;
}
.mm-content { padding: 1.5rem; }

.sidebar-logo { padding: 1.25rem 1.25rem .75rem; border-bottom: 1px solid var(--mm-border); }
.sidebar-logo-mark {
    display: flex; align-items: center; gap: .65rem;
}
.sidebar-logo-icon {
    width: 36px; height: 36px; border-radius: 10px;
    background: linear-gradient(135deg, #16a34a, #15803d);
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 1.05rem;
}
.sidebar-logo-text { font-size: 1.1rem; font-weight: 700; color: #f8fafc; }
.sidebar-role-badge { font-size: .7rem; font-weight: 600; padding: .15rem .55rem; border-radius: 20px; }

.sidebar-nav  { flex: 1; padding: .75rem 0; }
.sidebar-section-title {
    font-size: .65rem; font-weight: 700; color: #475569;
    text-transform: uppercase; letter-spacing: .08em;
    padding: .8rem 1.25rem .3rem;
}
.sidebar-item {
    display: flex; align-items: center; gap: .75rem;
    padding: .7rem 1.25rem; color: #94a3b8;
    font-size: .875rem; font-weight: 500; cursor: pointer;
    transition: all .15s; border-left: 3px solid transparent;
    text-decoration: none !important;
}
.sidebar-item:hover, .sidebar-item.router-link-active {
    color: #f8fafc; background: #273549; border-left-color: #16a34a;
}
.sidebar-item i { width: 18px; text-align: center; font-size: .9rem; }

.sidebar-footer {
    padding: 1rem; border-top: 1px solid var(--mm-border);
}
.sidebar-user {
    display: flex; align-items: center; gap: .75rem;
    padding: .65rem .75rem; border-radius: 10px;
    background: #273549; margin-bottom: .75rem;
}
.sidebar-avatar {
    width: 34px; height: 34px; border-radius: 50%;
    background: linear-gradient(135deg, #16a34a, #0d9488);
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: .85rem; font-weight: 700; flex-shrink: 0;
}
.sidebar-user-name { font-size: .825rem; font-weight: 600; color: #f8fafc; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user-role { font-size: .7rem; color: #64748b; }

.mm-btn-logout {
    width: 100%; padding: .55rem; border-radius: 8px; border: 1px solid rgba(239,68,68,.3);
    background: transparent; color: #fca5a5; font-size: .825rem; font-weight: 600;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    gap: .5rem; transition: all .15s; font-family: 'Inter', sans-serif;
}
.mm-btn-logout:hover { background: rgba(239,68,68,.1); }

/* ---------- Stat cards ---------- */
.mm-stats-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem;
    margin-bottom: 1.5rem;
}
.mm-stat-card {
    background: linear-gradient(135deg, #1e293b 0%, #273549 100%);
    border: 1px solid rgba(255,255,255,.08); border-radius: 12px;
    padding: 1.25rem 1.5rem; box-shadow: 0 4px 24px rgba(0,0,0,.3);
    transition: transform .2s, box-shadow .2s;
}
.mm-stat-card:hover { transform: translateY(-2px); box-shadow: 0 8px 48px rgba(0,0,0,.4); }
.mm-stat-icon {
    width: 42px; height: 42px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.1rem; margin-bottom: .9rem;
}
.mm-stat-icon.green { background: rgba(22,163,74,.2); color: #22c55e; }
.mm-stat-icon.amber { background: rgba(245,158,11,.2); color: #fcd34d; }
.mm-stat-icon.blue  { background: rgba(59,130,246,.2); color: #93c5fd; }
.mm-stat-icon.red   { background: rgba(239,68,68,.2);  color: #fca5a5; }
.mm-stat-icon.purple{ background: rgba(168,85,247,.2); color: #d8b4fe; }
.mm-stat-value { font-size: 1.75rem; font-weight: 800; color: #f8fafc; line-height: 1; margin-bottom: .3rem; }
.mm-stat-label { font-size: .8rem; font-weight: 500; color: #64748b; }

/* ---------- Panel cards ---------- */
.mm-panel-card {
    background: #1e293b; border: 1px solid rgba(255,255,255,.08);
    border-radius: 12px; padding: 1.25rem; box-shadow: 0 4px 24px rgba(0,0,0,.3);
}
.mm-panel-title {
    font-size: .875rem; font-weight: 700; color: #94a3b8;
    text-transform: uppercase; letter-spacing: .06em;
    margin-bottom: 1rem; display: flex; align-items: center; gap: .5rem;
}

/* ---------- Topbar search ---------- */
.mm-search-bar {
    display: flex; align-items: center; gap: .5rem;
    background: #273549; border: 1px solid rgba(255,255,255,.08);
    border-radius: 8px; padding: .4rem .85rem; flex: 1; max-width: 320px;
}
.mm-search-bar i   { color: #475569; font-size: .9rem; }
.mm-search-bar input {
    background: none; border: none; outline: none;
    color: #f8fafc; font-size: .875rem; font-family: 'Inter', sans-serif; width: 100%;
}
.mm-search-bar input::placeholder { color: #475569; }

/* ---------- Tables ---------- */
.mm-table { width: 100%; border-collapse: collapse; font-size: .875rem; }
.mm-table th {
    padding: .65rem 1rem; text-align: left;
    font-size: .7rem; font-weight: 700; color: #475569;
    text-transform: uppercase; letter-spacing: .06em;
    border-bottom: 1px solid rgba(255,255,255,.06);
}
.mm-table td {
    padding: .75rem 1rem; color: #cbd5e1;
    border-bottom: 1px solid rgba(255,255,255,.04);
}
.mm-table tr:last-child td { border-bottom: none; }
.mm-table tr:hover td { background: rgba(255,255,255,.02); }

/* ---------- Badge ---------- */
.mm-badge { display: inline-block; padding: .25rem .65rem; border-radius: 20px; font-size: .75rem; font-weight: 600; }
.mm-badge-green  { background: rgba(22,163,74,.2);  color: #22c55e; }
.mm-badge-amber  { background: rgba(245,158,11,.2); color: #fcd34d; }
.mm-badge-red    { background: rgba(239,68,68,.2);  color: #fca5a5; }
.mm-badge-blue   { background: rgba(59,130,246,.2); color: #93c5fd; }
.mm-badge-purple { background: rgba(168,85,247,.2); color: #d8b4fe; }

/* ---------- General buttons ---------- */
.mm-btn {
    display: inline-flex; align-items: center; gap: .4rem;
    padding: .55rem 1.2rem; border-radius: 8px;
    font-weight: 600; font-size: .875rem; border: none;
    cursor: pointer; transition: all .18s; font-family: 'Inter', sans-serif;
    text-decoration: none !important;
}
.mm-btn-primary { background: #16a34a; color: #fff; }
.mm-btn-primary:hover { background: #15803d; color: #fff; transform: translateY(-1px); }
.mm-btn-secondary { background: #273549; color: #f8fafc; }
.mm-btn-secondary:hover { background: #334155; }
.mm-btn-danger { background: rgba(239,68,68,.15); color: #fca5a5; border: 1px solid rgba(239,68,68,.3); }
.mm-btn-danger:hover { background: rgba(239,68,68,.25); }
.mm-btn-sm { padding: .35rem .75rem; font-size: .78rem; }

/* ---------- Transitions ---------- */
.fade-enter-active, .fade-leave-active { transition: opacity .2s; }
.fade-enter, .fade-leave-to { opacity: 0; }
.slide-up-enter-active { transition: all .25s cubic-bezier(.25,.8,.25,1); }
.slide-up-enter { transform: translateY(12px); opacity: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
    .mm-sidebar { transform: translateX(-100%); }
    .mm-main { margin-left: 0; }
}
