/* ===========================
   CarreiraMais — Global Styles
   =========================== */

:root {
  --primary:       #2563EB;
  --primary-dark:  #1d4ed8;
  --primary-light: #dbeafe;
  --secondary:     #10B981;
  --secondary-dark:#059669;
  --accent:        #F59E0B;
  --danger:        #EF4444;
  --bg:            #F8FAFC;
  --bg-card:       #ffffff;
  --bg-input:      #ffffff;
  --text:          #1E293B;
  --text-muted:    #64748B;
  --text-light:    #94A3B8;
  --border:        #E2E8F0;
  --shadow:        0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.05);
  --shadow-md:     0 4px 6px -1px rgba(0,0,0,.1), 0 2px 4px -1px rgba(0,0,0,.06);
  --shadow-lg:     0 10px 15px -3px rgba(0,0,0,.1), 0 4px 6px -2px rgba(0,0,0,.05);
  --radius:        12px;
  --radius-sm:     8px;
  --radius-lg:     20px;
  --nav-h:         64px;
  --transition:    .2s ease;
}

[data-theme="dark"] {
  --bg:        #0F172A;
  --bg-card:   #1E293B;
  --bg-input:  #1E293B;
  --text:      #F1F5F9;
  --text-muted:#94A3B8;
  --text-light:#64748B;
  --border:    #334155;
  --shadow:    0 1px 3px rgba(0,0,0,.4);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,.5);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,.5);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  transition: background var(--transition), color var(--transition);
}

h1,h2,h3,h4,h5 { font-family: 'Poppins', sans-serif; line-height: 1.3; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
ul { list-style: none; }

/* ---- Layout ---- */
.container  { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.section    { padding: 80px 0; }
.section-sm { padding: 40px 0; }
.section-header       { text-align: center; margin-bottom: 48px; }
.section-title        { font-size: 2rem; font-weight: 700; margin-bottom: 12px; }
.section-subtitle     { font-size: 1.05rem; color: var(--text-muted); max-width: 600px; }
.section-header .section-subtitle { margin: 0 auto; }

/* ---- Grid ---- */
.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.grid-2     { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.grid-3     { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 20px; border-radius: var(--radius-sm);
  border: none; font-size: .9rem; font-weight: 600;
  cursor: pointer; transition: all var(--transition);
  text-decoration: none; white-space: nowrap; font-family: inherit;
}
.btn:hover { text-decoration: none; }
.btn-primary  { background: var(--primary); color: #fff; }
.btn-primary:hover  { background: var(--primary-dark); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-secondary{ background: var(--secondary); color: #fff; }
.btn-secondary:hover{ background: var(--secondary-dark); transform: translateY(-1px); }
.btn-outline  { background: transparent; color: var(--primary); border: 2px solid var(--primary); }
.btn-outline:hover  { background: var(--primary); color: #fff; }
.btn-ghost    { background: transparent; color: var(--text); border: 2px solid var(--border); }
.btn-ghost:hover    { background: var(--border); }
.btn-accent   { background: var(--accent); color: #fff; }
.btn-accent:hover   { filter: brightness(1.1); }
.btn-danger   { background: var(--danger); color: #fff; }
.btn-lg  { padding: 14px 28px; font-size: 1rem; }
.btn-sm  { padding: 6px 14px; font-size: .8rem; }
.btn-block { width: 100%; justify-content: center; }

/* ---- Badges ---- */
.badge { display: inline-block; padding: 2px 10px; border-radius: 20px; font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.badge-green  { background: #d1fae5; color: #065f46; }
.badge-blue   { background: var(--primary-light); color: var(--primary-dark); }
.badge-yellow { background: #fef3c7; color: #92400e; }
.badge-gray   { background: #f1f5f9; color: #475569; }
.badge-red    { background: #fee2e2; color: #991b1b; }
.badge-purple { background: #ede9fe; color: #5b21b6; }

/* ---- Tags / Skills ---- */
.tag {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 12px; border-radius: 20px;
  font-size: .78rem; font-weight: 500;
  background: var(--primary-light); color: var(--primary-dark);
  border: 1px solid transparent; cursor: pointer;
  transition: all var(--transition); user-select: none;
}
.tag:hover             { background: var(--primary); color: #fff; }
.tag.selected          { background: var(--primary); color: #fff; }
.tag .remove-btn       { background: none; border: none; color: inherit; cursor: pointer; font-size: .9rem; line-height: 1; padding: 0 2px; opacity: .7; }
.tag .remove-btn:hover { opacity: 1; }

/* ---- Cards ---- */
.card {
  background: var(--bg-card); border-radius: var(--radius);
  border: 1px solid var(--border); box-shadow: var(--shadow);
  transition: box-shadow var(--transition), transform var(--transition);
}
.card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.card-body  { padding: 20px; }
.card-footer{ padding: 16px 20px; border-top: 1px solid var(--border); }

/* ---- Forms ---- */
.form-group  { margin-bottom: 18px; }
.form-row    { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-label  { display: block; font-size: .875rem; font-weight: 600; margin-bottom: 6px; }
.form-input  {
  width: 100%; padding: 10px 14px;
  border: 2px solid var(--border); border-radius: var(--radius-sm);
  background: var(--bg-input); color: var(--text);
  font-size: .9rem; font-family: inherit;
  transition: border-color var(--transition);
}
.form-input:focus   { outline: none; border-color: var(--primary); }
.form-input.valid   { border-color: var(--secondary); }
.form-input.invalid { border-color: var(--danger); }
.form-input::placeholder { color: var(--text-light); }
.form-select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748B' d='M6 8L1 3h10z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px; }
.form-error { font-size: .75rem; color: var(--danger); margin-top: 4px; display: none; }
.form-error.show { display: block; }
.form-hint  { font-size: .75rem; color: var(--text-muted); margin-top: 4px; }

/* ---- Progress ---- */
.progress     { height: 8px; background: var(--border); border-radius: 4px; overflow: hidden; }
.progress-bar { height: 100%; background: var(--primary); border-radius: 4px; transition: width .5s ease; }

/* ---- Alert ---- */
.alert         { padding: 12px 16px; border-radius: var(--radius-sm); font-size: .875rem; margin-bottom: 16px; }
.alert-success { background: #d1fae5; color: #065f46; border: 1px solid #6ee7b7; }
.alert-error   { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }
.alert-info    { background: var(--primary-light); color: var(--primary-dark); border: 1px solid #93c5fd; }

/* ---- Spinner ---- */
.spinner { display: inline-block; width: 20px; height: 20px; border: 2px solid var(--border); border-top-color: var(--primary); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- Divider ---- */
.divider { height: 1px; background: var(--border); margin: 24px 0; }

/* ---- Empty state ---- */
.empty-state   { text-align: center; padding: 60px 20px; color: var(--text-muted); }
.empty-state i { font-size: 3rem; margin-bottom: 16px; color: var(--border); display: block; }
.empty-state h3{ font-size: 1.1rem; margin-bottom: 8px; color: var(--text); }

/* ---- Toast ---- */
#toast-container { position: fixed; bottom: 24px; right: 24px; z-index: 9999; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast {
  background: var(--bg-card); border: 1px solid var(--border);
  border-left: 4px solid var(--primary); padding: 12px 20px;
  border-radius: var(--radius-sm); box-shadow: var(--shadow-lg);
  font-size: .875rem; max-width: 320px;
  animation: slideInRight .3s ease; pointer-events: all;
}
.toast.success { border-left-color: var(--secondary); }
.toast.error   { border-left-color: var(--danger); }
@keyframes slideInRight { from { transform: translateX(100%); opacity: 0; } }

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .form-row        { grid-template-columns: 1fr; }
  .section         { padding: 48px 0; }
  .section-title   { font-size: 1.5rem; }
  .hide-mobile     { display: none !important; }
}
@media (min-width: 769px) {
  .hide-desktop { display: none !important; }
}
