body {
    margin: 0;
    padding: 10px;
    min-height: 100vh; /* Wsparcie */
    min-height: 100dvh; /* dynamiczna wysokość minimalna */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    box-sizing: border-box;
    /* Automatyczne przewijanie pionowe pojawia się tylko wtedy, gdy treść nie mieści się w oknie */
    overflow-y: auto; 
    overflow-x: hidden;
    background-color: #111;
    background-image: url('../_image/SysIQ_Tlo_1920x1080.jpg');
    background-position: center;
    background-attachment: fixed;
    background-size: cover;
} 

#starCanvas {
    position: fixed; 
    top: 0;
    left: 0;
    width: 100vw;    
    height: 100vh;   
    height: 100dvh;
    z-index: 1;      
    pointer-events: none; 
}

.container1 {
    z-index: 5;
    width: 100%;
    max-width: 450px;
    /* Pozwalamy kontenerowi dopasować się do zawartości na mniejszych ekranach */
    margin: auto 0; 
    padding: 15px;
    background-color: #ffffff;
    box-shadow: rgba(50, 50, 93, 0.25) 0px 50px 100px -20px, 
                rgba(0, 0, 0, 0.3) 0px 30px 60px -30px, 
                rgba(10, 37, 64, 0.35) 0px -2px 6px 0px inset;
    border-radius: 8px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    flex-shrink: 0; /* Zapobiega zgniataniu kontenera w pionie */
}

.footer {
    z-index: 5;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 15px;
    margin-bottom: 5px; 
    height: 24px;
    flex-shrink: 0; /* Zapobiega zgniataniu stopki */
}

.footer p {
    margin: 0;
}

.footer a {
    color: #fff;
    text-decoration: none;
    font-family: sans-serif;
    font-size: 13px;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.footer a:hover {
    opacity: 1;
}

.chat-container { 
    max-width: 500px; 
    margin: 30px auto; 
    background: #fff; 
    border-radius: 8px; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.1); 
    overflow: hidden; 
    position: relative; 
}

/* Elastyczny nagłówek */
.chat-header { 
    background: #0088cc; 
    color: #fff; 
    padding: 8px 15px; 
    font-weight: bold; 
    position: relative; 
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 42px; 
    box-sizing: border-box;
    gap: 10px;
}

.header-left {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    min-width: 30px;
}

.chat-logo {
    height: 26px; 
    width: auto;  
    display: block;
    object-fit: contain;
}

.header-center {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.chat-title {
    font-size: 13px;
    line-height: 1.2;
    text-align: center;
    user-select: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    justify-content: flex-end;
    min-width: 30px;
}

.btn-mute {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.3);
    width: 26px;
    height: 26px;
    font-size: 14px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, border-color 0.2s;
    user-select: none;
}

.btn-mute:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: #fff;
}

.btn-logout {
    background: #e05d5d;
    color: #fff;
    border: 1px solid #d94b4b;
    padding: 5px 10px;
    font-size: 11px;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s, border-color 0.2s;
    font-weight: normal;
    height: 26px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
}

.btn-logout:hover {
    background: #c94a4a;
    border-color: #b83b3b;
}

.chat-form, .chat-box { padding: 20px; }
.form-group { margin-bottom: 15px; }
.form-group label { display: block; margin-bottom: 5px; font-weight: bold; font-size: 14px; }
.form-group input { width: 100%; padding: 10px; border: 1px solid #ccc; border-radius: 4px; box-sizing: border-box; }
.btn { width: 100%; padding: 12px; background: #0088cc; color: #fff; border: none; border-radius: 4px; font-size: 16px; cursor: pointer; font-weight: bold; }
.btn:hover { background: #006699; }
#messages { height: 300px; overflow-y: auto; border: 1px solid #eee; padding: 10px; margin-bottom: 15px; background: #fafafa; border-radius: 4px; display: flex; flex-direction: column; gap: 10px; }

/* Dymki wiadomości */
.msg { 
    display: inline-flex;
    flex-direction: column;
    padding: 8px 12px; 
    border-radius: 12px; 
    max-width: 75%; 
    word-wrap: break-word; 
    position: relative;
}

.msg.client { 
    background: #e1ffeb; 
    margin-left: auto; 
    align-self: flex-end;
    border-bottom-right-radius: 2px;
    color: #1b4332;
}

.msg.tech { 
    background: #f1f0f0; 
    margin-right: auto; 
    align-self: flex-start;
    border-bottom-left-radius: 2px;
    color: #333;
}

.msg-time {
    font-size: 9px;
    margin-top: 4px;
    align-self: flex-end;
    user-select: none;
    white-space: nowrap;
}

.msg.client .msg-time {
    color: rgba(27, 67, 50, 0.6);
}

.msg.tech .msg-time {
    color: rgba(0, 0, 0, 0.4);
}

.input-area { display: flex; gap: 8px; align-items: center; }
.input-area input[type="text"] { flex: 1; padding: 10px; border: 1px solid #ccc; border-radius: 4px; box-sizing: border-box; height: 38px; }

/* Przycisk spinacza */
.btn-attachment {
    background: #f1f0f0;
    border: 1px solid #ccc;
    width: 38px;
    height: 38px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, border-color 0.2s;
    user-select: none;
    padding: 0;
}

.btn-attachment:hover {
    background: #e4e3e3;
    border-color: #bbb;
}

/* Ikona tła w przycisku (pobierana z wyodrębnionego pliku SVG) */
.btn-attachment-icon {
    width: 20px;
    height: 20px;
    background-image: url('../_image/attachment.svg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

/* Podgląd załącznika */
.attachment-preview {
    display: flex;
    align-items: center;
    background: #f9f9f9;
    border: 1px solid #ddd;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 10px;
    font-size: 12px;
    gap: 10px;
}

.preview-thumb {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 3px;
    background: #eee;
    border: 1px solid #ccc;
}

.preview-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    overflow: hidden;
}

.preview-filename {
    font-weight: bold;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.preview-options {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    color: #555;
    cursor: pointer;
    user-select: none;
}

.preview-remove {
    background: none;
    border: none;
    color: #ff5c5c;
    font-weight: bold;
    font-size: 20px;
    cursor: pointer;
    padding: 0 5px;
    align-self: center;
}

/* Overlay Drag & Drop */
.drag-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 136, 204, 0.9);
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.container1.drag-active .drag-overlay {
    opacity: 1;
    pointer-events: auto;
}

.drag-overlay-box {
    border: 3px dashed white;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    font-size: 18px;
    font-weight: bold;
}


.button-1 {
  align-items: center;
  background-clip: padding-box;
  background-color: #c80014;
  border: 1px solid transparent;
  border-radius: .25rem;
  box-shadow: rgba(0, 0, 0, 0.02) 0 1px 3px 0;
  box-sizing: border-box;
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  font-family: system-ui,-apple-system,system-ui,"Helvetica Neue",Helvetica,Arial,sans-serif;
  font-size: 16px;
  font-weight: 400;
  justify-content: center;
  line-height: 1.25;
  margin: 0;
  min-height: 3rem;
  padding: calc(.875rem - 1px) calc(1.5rem - 1px);
  position: relative;
  text-decoration: none;
  transition: all 250ms;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  vertical-align: baseline;
  width: 200px;
}

.button-1:hover,
.button-1:focus {
  background-color: #78000c;
  box-shadow: rgba(0, 0, 0, 0.1) 0 4px 12px;
}

.button-1:hover {
  transform: translateY(-1px);
}

.button-1:active {
  background-color: #78000c;
  box-shadow: rgba(0, 0, 0, .06) 0 2px 4px;
  transform: translateY(0);
}



.button-2 { 
  align-items: center;
  background-clip: padding-box;
  background-color: #759c64;
  border: 1px solid transparent;
  border-radius: .25rem;
  box-shadow: rgba(0, 0, 0, 0.02) 0 1px 3px 0;
  box-sizing: border-box;
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  font-family: system-ui,-apple-system,system-ui,"Helvetica Neue",Helvetica,Arial,sans-serif;
  font-size: 16px;
  font-weight: 600;
  justify-content: center;
  line-height: 1.25;
  margin: 0;
  min-height: 3rem;
  padding: calc(.875rem - 1px) calc(1.5rem - 1px);
  position: relative;
  text-decoration: none;
  transition: all 250ms;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  vertical-align: baseline;
  width: 200px;
}

.button-2:hover,
.button-2:focus {
  background-color: #516d46;
  box-shadow: rgba(0, 0, 0, 0.1) 0 4px 12px;
}

.button-2:hover {
  transform: translateY(-1px);
}

.button-2:active {
  background-color: #516d46;
  box-shadow: rgba(0, 0, 0, .06) 0 2px 4px;
  transform: translateY(0);
}

.button-3 {
  align-items: center;
  background-clip: padding-box;
  background-color: #fa0019;
  border: 1px solid transparent;
  border-radius: .25rem;
  box-shadow: rgba(0, 0, 0, 0.02) 0 1px 3px 0;
  box-sizing: border-box;
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  font-family: system-ui,-apple-system,system-ui,"Helvetica Neue",Helvetica,Arial,sans-serif;
  font-size: 16px;
  font-weight: 600;
  justify-content: center;
  line-height: 1.25;
  margin: 0;
  min-height: 3rem;
  padding: calc(.875rem - 1px) calc(1.5rem - 1px);
  position: relative;
  text-decoration: none;
  transition: all 250ms;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  vertical-align: baseline;
  width: 200px;
}

.button-3:hover,
.button-3:focus {
  background-color: #af0011;
  box-shadow: rgba(0, 0, 0, 0.1) 0 4px 12px;
}

.button-3:hover {
  transform: translateY(-1px);
}

.button-3:active {
  background-color: #af0011;
  box-shadow: rgba(0, 0, 0, .06) 0 2px 4px;
  transform: translateY(0);
}
.button-4 {
  align-items: center;
  background-clip: padding-box;
  background-color: #0096fa;
  border: 1px solid transparent;
  border-radius: .25rem;
  box-shadow: rgba(0, 0, 0, 0.02) 0 1px 3px 0;
  box-sizing: border-box;
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  font-family: system-ui,-apple-system,system-ui,"Helvetica Neue",Helvetica,Arial,sans-serif;
  font-size: 16px;
  font-weight: 600;
  justify-content: center;
  line-height: 1.25;
  margin: 0;
  min-height: 3rem;
  padding: calc(.875rem - 1px) calc(1.5rem - 1px);
  position: relative;
  text-decoration: none;
  transition: all 250ms;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  vertical-align: baseline;
  width: 200px;
}

.button-4:hover,
.button-4:focus {
  background-color: #0069af;
  box-shadow: rgba(0, 0, 0, 0.1) 0 4px 12px;
}

.button-4:hover {
  transform: translateY(-1px);
}

.button-4:active {
  background-color: #0069af;
  box-shadow: rgba(0, 0, 0, .06) 0 2px 4px;
  transform: translateY(0);
}

.input {
  max-width: 200px;
  background-color: #f5f5f5;
  color: #242424;
  padding: .15rem .5rem;
  min-height: 40px;
  border-radius: 4px;
  outline: none;
  border: none;
  line-height: 1.15;
  box-shadow: 0px 10px 20px -18px;
}

input:focus {
  border-bottom: 2px solid #759c64;
  border-radius: 4px 4px 2px 2px;
}

input:hover {
  outline: 1px solid lightgrey;
}

    .no-underline {
        text-decoration: none; /* Usunięcie podkreślenia */
        color: inherit;       /* Kolor dziedziczony od rodzica */
    }
 
    .no-underline:hover {
        font-weight: bold;    /* Pogrubienie przy najechaniu */
    }