/* Light Theme */
:root {
  --cloqk-primary: #EC7730;
  --cloqk-primary-rgb: 236, 119, 48;
  --cloqk-primary-hover: #d1631e;
  --cloqk-primary-muted: #ec783017;
  --cloqk-secondary: #0074BA;
  --cloqk-error: #D32F2F;
  --cloqk-error-muted: #ffd0d0;
  --cloqk-success: #22C55E;
  --cloqk-success-muted: #c8ffdc;
  --cloqk-info: #15CCF1;
  --cloqk-info-muted: #dbf9ff;
  --cloqk-warning: #FEC107;
  --cloqk-warning-muted: #fff4d1;
  --cloqk-foreground: #F8FAFB;
  --cloqk-background: #eef2f6;
  --cloqk-text: #2C3E50;
  --cloqk-text-muted: #64748B;
  --cloqk-border-color: #D7D9DD;

  --breakpoint-sm: 640px;
  --breakpoint-md: 768px;
  --breakpoint-lg: 1024px;
  --breakpoint-xl: 1280px;
  --breakpoint-xxl: 1536px;
}

/* Dark Theme */
[data-theme='dark'] {
  --cloqk-primary: #EC7730;
  --cloqk-primary-rgb: 236, 119, 48;
  --cloqk-primary-hover: #d1631e;
  --cloqk-primary-muted: #ec783018;
  --cloqk-secondary: #0074BA;
  --cloqk-error: #ed3434;
  --cloqk-error-muted: #4E1E2C;
  --cloqk-success: #20C55E;
  --cloqk-success-muted: #11363B;
  --cloqk-info: #0DC4EB;
  --cloqk-info-muted: #19364F;
  --cloqk-warning: #ffcc13;
  --cloqk-warning-muted: #4a3d25;
  --cloqk-foreground: #1c1e3b;
  --cloqk-background: #11112B;
  --cloqk-text: #FFFFFF;
  --cloqk-text-muted: #9798A2;
  --cloqk-border-color: #334155;
}

.text-color-default {
  color: var(--cloqk-text);
}

.text-color-muted {
  color: var(--cloqk-text-muted);
}

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

.text-color-secondary {
  color: var(--cloqk-secondary);
}

.text-color-error {
  color: var(--cloqk-error);
}

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

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

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

.bg-color-primary {
  background-color: var(--cloqk-primary);
}

.bg-color-primary-muted {
  background-color: var(--cloqk-primary-muted);
}

.bg-color-primary-hover:hover {
  background-color: var(--cloqk-primary-hover);
}

.bg-color-primary-active:active {
  background-color: var(--cloqk-primary-hover);
}

.bg-color-primary-outlined-hover:hover {
  background-color: rgba(var(--cloqk-primary-rgb), 0.1);
}

.bg-color-secondary {
  background-color: var(--cloqk-secondary);
}

.bg-color-foreground {
  background-color: var(--cloqk-foreground);
}

.bg-color-background {
  background-color: var(--cloqk-background);
}

.bg-color-error {
  background-color: var(--cloqk-error);
}

.bg-color-error-muted {
  background-color: var(--cloqk-error-muted);
}

.bg-color-success {
  background-color: var(--cloqk-success);
}

.bg-color-success-muted {
  background-color: var(--cloqk-success-muted);
}

.bg-color-info {
  background-color: var(--cloqk-info);
}

.bg-color-info-muted {
  background-color: var(--cloqk-info-muted);
}

.bg-color-warning {
  background-color: var(--cloqk-warning);
}

.bg-color-warning-muted {
  background-color: var(--cloqk-warning-muted);
}

.border-color-default {
  border-color: var(--cloqk-border-color);
}

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

.border-color-error {
  border-color: var(--cloqk-error);
}

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

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

.divider {
  border-top: 1px solid var(--cloqk-border-color) !important;
}

.cloqk-loader {
  border: 4px solid var(--cloqk-border-color);
  border-top: 4px solid var(--cloqk-primary);
  border-radius: 50%;
  width: 48px;
  height: 48px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

body {
  background-color: var(--cloqk-background);
}

#main-wrapper {
    display: flex;
    align-items: stretch;
    flex: 1 1 auto;
    min-height: 100vh;
}

.cloqk-sidebar {
  position: fixed;
  z-index: 999;
  left: 0;
  top: 0;
  min-width: 17.5rem;
  height: 100%;
  padding: 1.5rem;
  background-color: var(--cloqk-foreground);
  display: flex;
  flex-direction: column;
  transition: all 0.5s ease;
}

.cloqk-sidebar:not([open]) {
  transform: translateX(-100%);
}

.cloqk-logo {
  width: fit-content;
  height: 3rem;
  margin-left: 0.5rem;
}

#open-sidebar-button {
  display: none;
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 1000;

  background-color: var(--cloqk-foreground);
  padding: 0.5rem;
  border-radius: 50%;
  height: 2.5rem !important;
}

.sidebar-item, .sidebar-subitem, .sidebar-item-icon {
  color: var(--cloqk-text-muted);
  transition: all 0.2s ease;
}

.sidebar-subitem {
  border-left: 0.2rem solid var(--cloqk-text-muted);
}

.sidebar-item:hover, .sidebar-subitem:hover, .sidebar-item-icon:hover {
  color: var(--cloqk-text);
  border-color: var(--cloqk-text);
  background-color: var(--cloqk-background);
  transform: translateX(0.25rem);
}

.sidebar-item-active, .sidebar-subitem-active {
  color: var(--cloqk-primary);
  border-color: var(--cloqk-primary);
  background: linear-gradient(90deg, rgba(var(--cloqk-primary-rgb), 0.1), transparent);
}

.sidebar-item-active:hover, .sidebar-subitem-active:hover {
  background: linear-gradient(90deg, rgba(var(--cloqk-primary-rgb), 0.15), transparent);
}

.sidebar-item-icon {
  font-size: 1.25rem;
}

.floating-menu-button {
  display: block;
  width: 100%;
  text-align: center;
  padding: 1rem;
  background-color: transparent;
  color: var(--cloqk-text-muted);
  transition: all 0.2s ease;
}

.floating-menu-button:hover {
  background-color: var(--cloqk-background);
  color: var(--cloqk-text);
}

.page-wrapper {
  margin-left: 17.5rem;
  padding: 2rem;
  flex: 1;
  background: var(--cloqk-background);
  transition: all 0.5s ease;
}

.body-wrapper {
  margin-top: 16px;
  margin-left: calc(30px / 2);
  margin-right: calc(30px / 2);
  margin-bottom: 30px;
  border-radius: 20px;
  min-height: calc(100% - 102px);
}

@media (min-width: 769px) {
  .user-profile-menu > button {
    width: 14.5rem;
  }
}

@media (max-width: 768px) {
  .cloqk-sidebar {
    min-width: 100vw;
    padding: 1rem;
  }

  .page-wrapper {
    margin-left: 0;
    padding: 1rem;
  }
}

.card-ocorrencia[tipo="abono"] {
  border-left: 4px solid var(--cloqk-info);
}

.card-ocorrencia[tipo="atestado"] {
  border-left: 4px solid var(--cloqk-success);
}

.card-ocorrencia[tipo="afastamento"] {
  border-left: 4px solid var(--cloqk-warning);
}

.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.tab-button-active {
  color: var(--cloqk-primary);
  border-bottom: solid 4px var(--cloqk-primary);
}

.form-control {
  display: block;
  width: 100%;
  padding: 10px 16px;
  font-size: .875rem;
  font-weight: 400;
  line-height: 1.5;
  color: var(--cloqk-text);
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-color: transparent;
  background-clip: padding-box;
  border: var(--bs-border-width) solid var(--cloqk-border-color);
  border-radius: 8px;
  box-shadow: var(--bs-box-shadow-inset);
  transition: border-color .15s ease-in-out, box-shadow .15s ease-in-out
}

.form-label {
    margin-bottom: .5rem;
    font-weight: 600;
    color: var(--cloqk-text); 
}

.textarea::placeholder {
  color: var(--cloqk-text-muted);
  opacity: 1;
}

.textarea::-webkit-input-placeholder { color: var(--cloqk-text-muted); } /* WebKit, Blink, Edge */
.textarea::-moz-placeholder { color: var(--cloqk-text-muted); opacity: 1; } /* Mozilla Firefox 19+ */
.textarea:-ms-input-placeholder { color: var(--cloqk-text-muted); } /* Internet Explorer 10-11 */
.textarea::-ms-input-placeholder { color: var(--cloqk-text-muted); } /* Microsoft Edge */

input[type="file"]::-webkit-file-upload-button {
  background-color: transparent;
}

/* Fallback for Legacy Edge and IE */
input[type="file"]::-ms-browse {
  background-color: transparent;
}

/* Standard */
input[type="file"]::file-selector-button {
  background-color: transparent;
  color: var(--cloqk-text);
}

input:-webkit-autofill,
input:-webkit-autofill:hover, 
input:-webkit-autofill:focus, 
input:-webkit-autofill:active {
  transition: background-color 5000s ease-in-out 0s;
  
  -webkit-text-fill-color: var(--cloqk-text);
}

@media (max-width: 768px) {
  #espelho-ponto-colaborador-desktop {
    display: none;
  }
  #espelho-ponto-colaborador-mobile {
    display: block;
  }
}

#month-selector-component > input {
  border: none;
  field-sizing: content;
  background-color: var(--cloqk-foreground);
  color: var(--cloqk-text-default);
}

option {
  background-color: var(--cloqk-foreground);
  color: var(--cloqk-text-default);
}

input[type="time"] {
  background-color: var(--cloqk-foreground);
  color: var(--cloqk-text);
}

input[type="time"]::-webkit-datetime-edit-hour-field:focus,
input[type="time"]::-webkit-datetime-edit-minute-field:focus,
input[type="time"]::-webkit-datetime-edit-ampm-field:focus {
  background-color: var(--cloqk-foreground);
  color: var(--cloqk-text);
}

[data-theme='dark'] input[type="time"]::-webkit-calendar-picker-indicator {
  filter: invert(1);
}

.bater-ponto-button {
    width: 190px;
    height: 190px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #ff9f66, var(--cloqk-primary));
    box-shadow: 0 20px 50px rgba(var(--cloqk-primary-rgb), 0.4),
        inset 0 4px 12px rgba(255, 255, 255, 0.4),
        inset 0 -8px 20px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.1s;
    position: relative;
    z-index: 10;
    border: 4px solid rgba(255, 255, 255, 0.1);
}

.bater-ponto-button:hover {
  transform: scale(1.05);
}

.bater-ponto-button:active {
  transform: scale(0.92);
}

.bater-ponto-button span {
  font-weight: 800;
  font-size: 1.25rem;
  text-align: center;
  line-height: 1.1;
  color: #fff;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.5rem;
}

.shift-progress {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 16px;
  align-items: center;
}

.shift-divider {
  width: 1px;
  height: 40px;
  background: var(--cloqk-border-color);
}

.timeline-line {
  height: calc(100% - 4.75rem);
}

.timeline-ponto-intervalo {
  border: solid 1px rgba(var(--cloqk-primary-rgb), 0.3);
  border-left: 3px solid var(--cloqk-primary);
}

.timeline-ponto-circle-active {
  border-color: #2fe8ed;
  background: #2fe8ed;
  box-shadow: 0 0 10px rgba(47, 232, 237, 0.4);
}

.timeline-ponto-circle-pending {
  border-color: rgba(var(--cloqk-primary-rgb), 0.6);
  background: rgba(var(--cloqk-primary-rgb), 0.6);
  box-shadow: 0 0 10px rgba(var(--cloqk-primary-rgb), 0.2);
}
