/* =========================================
   1. VARIABLES & TYPOGRAPHY
   ========================================= */
:root {
    --border-radius-main: 8px;
}

@font-face {
    font-display: swap;
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400;
    src: url('/assets/fonts/inter-v20-latin_latin-ext-regular.woff2') format('woff2');
}

@font-face {
    font-display: swap;
    font-family: 'Inter';
    font-style: normal;
    font-weight: 600;
    src: url('/assets/fonts/inter-v20-latin_latin-ext-600.woff2') format('woff2');
}

@font-face {
    font-display: swap;
    font-family: 'Inter';
    font-style: normal;
    font-weight: 800;
    src: url('/assets/fonts/inter-v20-latin_latin-ext-800.woff2') format('woff2');
}

/* =========================================
   2. BASE STYLES
   ========================================= */
body {
    background-color: rgb(250, 250, 250);
    padding: 1rem 1rem;
    max-width: 1240px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-height: 100dvh;
    margin: 0 auto;
}

a {
    color: inherit;
    text-decoration: none;
}

/* =========================================
   3. LAYOUT & CONTAINERS
   ========================================= */
.container {
    background-color: rgb(255, 255, 255);
    border-radius: var(--border-radius-main);
    box-shadow: 0px 0px 0px 1px rgba(9, 9, 11, .07), 0px 2px 2px 0px rgba(9, 9, 11, .05);
    padding: 1rem;
}

.inner-container {
    background-color: rgb(250, 250, 250);
    border-radius: var(--border-radius-main);
    padding: 1rem;
}

.small-container {
    padding: .5rem 1rem;
}

.big-container {
    padding: 2rem 2rem;
}

header {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    justify-content: space-between;
    padding: 1rem;
    align-items: center;
    background-color: rgb(255, 255, 255);
    border-radius: var(--border-radius-main);
    box-shadow: 0px 0px 0px 1px rgba(9, 9, 11, .07), 0px 2px 2px 0px rgba(9, 9, 11, .05);
    gap: 8px;
}

header > *:first-child {
    justify-self: start;
}

header > *:last-child {
    justify-self: end;
}

header .vsg-btn {
    width: fit-content;
}

/* =========================================
   4. BUTTONS
   ========================================= */
.vsg-btn,
button {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 2px;
    font-family: "Inter", sans-serif;
    font-size: 14px;
    font-weight: 600;
    background-color: rgba(9, 9, 11, 0.9);
    color: rgb(255, 255, 255);
    padding: 6px 11px;
    min-height: 40px;
    outline: none;
    border: 1px solid rgba(9, 9, 11, 0.9);
    box-shadow: inset 0 1px hsla(0, 0%, 100%, .15);
    border-radius: var(--border-radius-main);
    isolation: isolate;
    cursor: pointer;
    user-select: none;
}

.vsg-btn:hover { background-color: rgba(9, 9, 11, 0.85); }
.vsg-btn.huge { height: 100px; }

.vsg-btn-light {
    background-color: rgb(255, 255, 255);
    border-color: rgba(9, 9, 11, .1);
    color: rgb(9, 9, 11);
}
.vsg-btn-light:hover { background-color: rgba(9, 9, 11, .1); }

.vsg-btn-danger {
    background-color: rgb(224, 60, 60);
    border-color: rgba(190, 32, 32, .8);
}
.vsg-btn-danger:hover { background-color: rgba(224, 60, 60, 0.9); }

.vsg-btn-warning {
    background-color: rgba(245, 158, 11, .8);
    border-color: rgba(245, 158, 11, .8);
    color: rgb(69, 26, 3);
}
.vsg-btn-warning:hover { background-color: rgba(245, 158, 11, .7); }

.vsg-btn-success {
    background-color: rgba(21, 128, 61, .9);
    border-color: rgba(21, 128, 61, .9);
}
.vsg-btn-success:hover { background-color: rgba(21, 128, 61, .8); }

.vsg-btn-info {
    background-color: rgba(21, 48, 128, 0.9);
    border-color: rgba(21, 48, 128, 0.9);
}

.vsg-btn-soft {
    background-color: rgba(59, 130, 246, 0.1);
    color: rgb(29, 78, 216);
    border-color: rgba(59, 130, 246, 0.2);
    box-shadow: none;
}
.vsg-btn-soft:hover { background-color: rgba(59, 130, 246, 0.2); }

.vsg-btn-soft-success {
    background-color: rgba(34, 197, 94, 0.1);
    color: rgb(21, 128, 61);
    border-color: rgba(34, 197, 94, 0.2);
    box-shadow: none;
}
.vsg-btn-soft-success:hover { background-color: rgba(34, 197, 94, 0.2); }

.vsg-btn-soft-warning {
    background-color: rgba(245, 158, 11, 0.1);
    color: rgb(180, 83, 9);
    border-color: rgba(245, 158, 11, 0.2);
    box-shadow: none;
}

.vsg-btn-soft-warning:hover {
    background-color: rgba(245, 158, 11, 0.2);
}

.vsg-btn-soft-danger {
    background-color: rgba(239, 68, 68, 0.1);
    color: rgb(185, 28, 28);
    border-color: rgba(239, 68, 68, 0.2);
    box-shadow: none;
}
.vsg-btn-soft-danger:hover { background-color: rgba(239, 68, 68, 0.2); }

.vsg-btn-soft-purple {
    background-color: rgba(168, 85, 247, 0.1);
    color: rgb(126, 34, 206);
    border-color: rgba(168, 85, 247, 0.2);
    box-shadow: none;
}
.vsg-btn-soft-purple:hover { background-color: rgba(168, 85, 247, 0.2); }

.vsg-btn-soft-info {
    background-color: rgba(59, 130, 246, 0.1);
    color: rgb(29, 78, 216);
    border-color: rgba(59, 130, 246, 0.2);
    box-shadow: none;
}
.vsg-btn-soft-info:hover { background-color: rgba(59, 130, 246, 0.2); }

/* Gri/Neutru (Secundar) */
.vsg-btn-soft-secondary {
    background-color: rgba(107, 114, 128, 0.1);
    color: rgb(55, 65, 81);
    border-color: rgba(107, 114, 128, 0.2);
    box-shadow: none;
}
.vsg-btn-soft-secondary:hover { background-color: rgba(107, 114, 128, 0.2); }

/* Roz (Accent / Special) */
.vsg-btn-soft-pink {
    background-color: rgba(236, 72, 153, 0.1);
    color: rgb(190, 24, 93);
    border-color: rgba(236, 72, 153, 0.2);
    box-shadow: none;
}
.vsg-btn-soft-pink:hover { background-color: rgba(236, 72, 153, 0.2); }

/* Indigo (Alternativă la Purple / Profesional) */
.vsg-btn-soft-indigo {
    background-color: rgba(99, 102, 241, 0.1);
    color: rgb(67, 56, 202);
    border-color: rgba(99, 102, 241, 0.2);
    box-shadow: none;
}
.vsg-btn-soft-indigo:hover { background-color: rgba(99, 102, 241, 0.2); }

/* =========================================
   5. FORMS & INPUTS
   ========================================= */
label {
    font-weight: 600;
}

input:not([type='checkbox']):not([type='radio']), select, textarea, .fake-input {
    font-family: "Inter", sans-serif;
    font-size: 14px;
    font-weight: 400;
    border: 1px solid rgba(9, 9, 11, .1);
    border-radius: var(--border-radius-main);
    width: 100%;
    min-height: 40px;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-color: rgb(255, 255, 255);
    padding: 8px 11px;
}


select {
    padding: 6px 32px 6px 11px;
    color: rgb(9, 9, 11);
    background-color: rgb(250, 250, 250);
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="6 9 12 15 18 9"></polyline></svg>');
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 16px;
}

select:hover {
    border-color: rgba(9, 9, 11, .2);
}

input:not([type='checkbox']):not([type='radio']):not(.fake-input):focus, 
select:focus, 
textarea:focus {
    outline: none !important;
    border-color: rgba(9, 9, 11, 0.9) !important;
    box-shadow: inset 0 0 0 1px rgba(9, 9, 11, 0.9) !important;
}

input:disabled,
.fake-input {
    background-color: rgb(250, 250, 250);
    cursor: not-allowed;
    color: rgba(9, 9, 11, .5);
    caret-color: transparent;
    user-select: none;
}

input:disabled:focus,
.fake-input:focus {
    outline: none;
    border-color: rgba(9, 9, 11, .1);
    box-shadow: none !important;
}

input.is-invalid,
textarea.is-invalid {
    border-color: rgba(245, 101, 101, 1);
}

input:focus::placeholder {
    color: transparent;
}

input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type=number] {
    -moz-appearance: textfield;
}

input[type="date"] {
    line-height: normal;
    height: 40px;
    padding: 0 10px;
    display: block;
    align-content: center;
}



.input-icon {
    position: absolute;
    display: block;
    right: 8px;
    top: 0;
    font-size: 14px;
    height: 100%;
    transform: translateY(50%);
}

.invalid-feedback {
    color: rgba(245, 101, 101, 1);
    font-size: 14px;
    font-style: italic;
}

.checkbox-chip {
    display: flex;
    gap: 8px;
    justify-content: center;
    align-items: center;
}

.toggle {
  position: relative;
  border-radius: var(--border-radius-main);
  overflow: hidden;
  width: 60px;
}
.toggle input[type="checkbox"] {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 10;
  width: 60px;
  height: 40px;
  cursor: pointer;
  opacity: 0;
}
.toggle label {
  position: relative;
  display: flex;
  align-items: center;
}
.toggle label:before {
  content: '';
  width: 60px;
  height: 40px;
  background: #EF5350;
  position: relative;
  display: inline-block;
  box-shadow: 
    0 0 2em rgb(255 255 255 / 60%), 
    inset 0 0 #66BB6A;
  transition: 0.2s ease-in;
}
.toggle label:after {
  content: '';
  position: absolute;
  width: 20px;
  height: 34px;
  left: 3px;
  top: 3px;
  z-index: 2;
  background: #fefefe;
  box-shadow: 0 2px 5px #0002;
  transition: 0.2s ease-in;
  border-radius: calc(var(--border-radius-main) - 3px);
}
.toggle input[type="checkbox"]:hover + label:after  {
    box-shadow: 0 2px 15px 0 #0002, 0 3px 8px 0 #0001;
}
.toggle input[type="checkbox"]:checked + label:before {
  box-shadow: 
    0 0 2em rgb(255 255 255 / 60%), 
    inset 84px 0 #66BB6A;
}
.toggle input[type="checkbox"]:checked + label:after {
  transform: translatex(34px);
}


/* =========================================
   6. TABLES
   ========================================= */
table {
    border-collapse: collapse;
    width: 100%;
}

th, td {
    font-size: 14px;
    border-bottom: 1px solid rgba(9, 9, 11, 0.1);
    padding: 12px 8px;
    text-align: left;
}

th {
    color: rgb(113, 113, 122);
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding-bottom: 8px;
}

td {
    color: rgb(39, 39, 42);
}

tbody tr {
    transition: background-color 0.2s ease;
}

tbody tr:hover {
    background-color: rgba(9, 9, 11, 0.02);
}

tr:last-child > td {
    border-bottom: none;
}

/* =========================================
   7. BADGES & ALERTS
   ========================================= */
.badge {
    width: fit-content;
    padding: 5px 11px;
    border-radius: var(--border-radius-main);
    font-weight: 600;
    text-align: center;
    background-color: rgb(250, 250, 250);
    border: 1px solid rgba(9, 9, 11, .1);
}

.badge.small {
    font-size: 11px;
    padding: 2px 8px;
}

.badge.green {
    background-color: #ecfdf5;
    color: #065f46;
    border-color: #a7f3d0;
}

.badge.yellow {
    background-color: #fffbeb;
    color: #92400e;
    border-color: #fde68a;
}

.badge.blue {
    background-color: #eff6ff;
    color: #1e40af;
    border-color: #bfdbfe;
}

.badge.red {
    background-color: #fef2f2;
    color: #991b1b;
    border-color: #fecaca;
}

.successAlert,
.failedAlert {
    display: flex;
    font-weight: 600;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    border-radius: var(--border-radius-main);
    padding: 1.3rem 2rem;
}

.successAlert {
    background-color: #d1e7dd;
    color: #0a3622;
    border: 1px solid rgb(163, 207, 187);
}

.failedAlert {
    background-color: #e7d5d1;
    color: #36140a;
    border: 1px solid rgb(207, 172, 163);
}

.successAlert #closeIcon {
    cursor: pointer;
}

/* =========================================
   8. COMPONENTS (Menu, Hatch, Dot)
   ========================================= */
.clickMenu {
    position: relative;
    width: fit-content;
}

.clickMenuBody {
    z-index: 25;
    display: none;
    position: absolute;
    top: 50%;
    right: calc(100% + 8px);
    background-color: rgb(255, 255, 255);
    flex-direction: column;
    padding: 6px;
    border-radius: var(--border-radius-main);
    width: fit-content;
    color: rgb(9, 9, 11);
    border: 1px solid rgba(9, 9, 11, .1);
    transform: translateY(-50%);
}

.clickMenu.active .clickMenuBody {
    display: flex;
}

.clickMenuBody .clickMenuItem {
    font-size: 14px;
    font-weight: 400;
    font-family: Inter;
    outline: none;
    border: none;
    padding: 8px 12px;
    border-radius: var(--border-radius-main);
    background-color: white;
    width: 100%;
    display: flex;
    justify-content: space-between;
    gap: 4px;
    color: black;
}

.clickMenuItem * {
    z-index: 99;
}

.clickMenuItem:hover,
.clickMenuItem:hover > i {
    background-color: #3b82f6;
    color: white;
}

.deleted-hatch {
    position: relative;
    user-select: none;

    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}

.deleted-hatch::after {
    content: "ȘTERS";
    
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    
    /* Suprapunem două straturi de fundal (separate prin virgulă) */
    background-image: 
        /* Stratul 1 (deasupra): Maschează marginile. 
           Transparent în mijloc, devine alb opac spre margini */
        radial-gradient(ellipse at center, transparent 30%, rgba(255, 255, 255, 0.95) 90%),
        
        /* Stratul 2 (dedesubt): Hașura ta originală */
        repeating-linear-gradient(-45deg,
            rgba(108, 117, 125, 0.05),
            rgba(108, 117, 125, 0.05) 10px,
            rgba(108, 117, 125, 0.1) 10px,
            rgba(108, 117, 125, 0.1) 20px);
            
    /* Fundalul de bază, ușor redus pentru că stratul de deasupra aduce deja mult alb */
    background-color: rgba(255, 255, 255, 0.5);
    
    /* Centrarea textului */
    display: flex;
    justify-content: center;
    align-items: center;
    
    
    /* Stilizarea textului */
    color: rgb(220, 38, 38);
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-shadow: 
        -1px -1px 0 rgba(255, 255, 255, 1),  
         1px -1px 0 rgba(255, 255, 255, 1),
        -1px  1px 0 rgba(255, 255, 255, 1),
         1px  1px 0 rgba(255, 255, 255, 1),
         0px 0px 8px rgba(255, 255, 255, 1),
         0px 0px 12px rgba(255, 255, 255, 1),
         0px 0px 20px rgba(255, 255, 255, 1);
    
    pointer-events: none;
    z-index: 10;
    border-radius: inherit;
}

.status-wrapper {
    display: inline-flex;
    align-items: center;
    font-size: 13px;
    color: #52525b;
    font-weight: 600;
    width: fit-content;
}

.status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 8px;
}

.status-dot.offline {
    background-color: #a1a1aa;
}

.status-dot.online {
    background-color: #22c55e;
    animation: pulse-green 2s infinite;
}

/* =========================================
   9. UTILITIES & ICONS
   ========================================= */
.sticky-top {
    background-color: white;
    position: sticky;
    top: 0;
    z-index: 1;
}

.sticky-bottom {
    background-color: white;
    position: sticky;
    bottom: 0;
    z-index: 1;
}

.text-muted { color: rgb(152, 152, 164); }
.text-red { color: #9e0c1b; }

.color-green { color: rgb(0, 130, 53); }
.color-orange { color: #B45309; }
.color-blue { color: rgb(11, 95, 180); }
.color-red { color: rgb(185, 28, 28); }

.border-radius { border-radius: var(--border-radius-main); }

#close-icon {
    width: 50px;
    height: 50px;
}

.icon {
    width: 1em;
    height: 1em;
    fill: currentColor;
    vertical-align: middle;
}

.divider {
    height: 1px;
    background-color: rgba(9, 9, 11, .1);
    margin: 0.5rem 0;
}

/* =========================================
   10. MEDIA QUERIES
   ========================================= */
@media screen and (max-width: 1080px) {
    .vsg-btn {
        min-height: 40px;
    }

    input,
    textarea,
    select {
        min-height: 40px;
        caret-color: transparent;
    }
}

/* =========================================
   11. ANIMATIONS
   ========================================= */
@keyframes pulse-green {
    0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7); }
    70% { box-shadow: 0 0 0 6px rgba(34, 197, 94, 0); }
    100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

.pulse {
    animation: pulse-opacity 1s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

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