/* Reset i ogólne */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background: #f4f7fc;
    color: #333;
    min-height: 100vh;
    padding-top: 60px; /* miejsce na pasek górny */
}

/* Pasek górny */
.top-bar {
    background-color: #4A90E2;
    padding: 10px 20px;
    display: flex;
    justify-content: space-between; /* ← zmiana */
    align-items: center;
    height: 70px;
    position: fixed;
    top: 0;
    left: 300px;
    width: calc(100% - 300px);
    z-index: 999;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.user-info {
    display: flex;
    gap: 30px;
    font-size: 14px;
    color: #333;
    font-weight: bold;
}

.right-buttons {
    display: flex;
    gap: 10px;
}

.admin-button,
.logout-button {
    padding: 8px 14px;
    background-color: #4A90E2;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: bold;
    transition: background-color 0.2s;
}

.admin-button:hover,
.logout-button:hover {
    background-color: #357ab7;
}

/* Kontener główny */
.container {
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    padding: 30px;
    width: 100%;
    max-width: 530px;
    text-align: center;
    margin: 30px auto;
}

/* Nagłówek */
h1 {
    font-size: 24px;
    margin-bottom: 20px;
    color: #4a90e2;
}

p {
    font-size: 16px;
    margin-bottom: 20px;
    color: #777;
}

.info-text2 {
    font-size: 12px;
    color: #666;
    margin-top: -15px;
}

/* Pola i przyciski */
input,
button,
textarea {
    width: 100%;
    padding: 12px;
    margin: 10px 0;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s;
}

input:focus,
textarea:focus,
button:hover {
    border-color: #4a90e2;
    outline: none;
    box-shadow: 0 0 5px rgba(74, 144, 226, 0.5);
}

button {
    background-color: #4a90e2;
    color: white;
    cursor: pointer;
    font-weight: bold;
}

button:active {
    background-color: #357ab7;
}

/* Strefa drag&drop */
.drop-zone {
    border: 2px dashed #4a90e2;
    border-radius: 10px;
    padding: 20px 20px 4px;
    text-align: center;
    cursor: pointer;
    background-color: #f4f7fc;
    color: #4a90e2;
    transition: all 0.3s;
    margin-bottom: 10px;
}

.drop-zone.drag-over-green {
    background-color: #e9f7ef !important;
    border-color: #28a745 !important;
    color: #28a745 !important;
}

.file-count {
    font-size: 12px;
    color: #4a90e2;
    margin-top: 8px;
    font-weight: bold;
}

/* Tytuł i treść wiadomości */
.toggle-buttons-row {
    display: flex;
    gap: 10px;
    margin-top: -10px;
    margin-bottom: 10px;
}

.toggle-message-btn {
    flex: 1;
    padding: 12px;
    font-size: 14px;
    font-weight: bold;
    border-radius: 8px;
    border: 1px solid #4a90e2;
    background-color: white;
    color: #4a90e2;
    cursor: pointer;
    transition: all 0.3s;
}

.toggle-message-btn:hover {
    background-color: #4a90e2;
    color: white;
}

#subjectContainer input,
#messageContainer textarea {
    margin-top: 1px;
    font-size: 14px;
}

#messageContainer textarea::placeholder {
    color: #777;
}

/* Loader */
.loader {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #4a90e2;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 2s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Komunikaty */
.output-success, .output-error {
    color: #fff;
    font-size: 12px;
    font-weight: bold;
    padding: 12px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
    display: block;
    max-width: 80%;
    margin: 20px auto;
}

.output-success { background-color: #4CAF50; }
.output-error { background-color: #e74c3c; }

/* Przycisk odśwież */
.refresh-button {
    margin: -10px;
    width: 40px;
    height: 40px;
    background: transparent url('images/refresh.png') center/contain no-repeat;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.3s;
}

.refresh-button:hover { transform: scale(1.1); }
.refresh-button.rotate { transform: rotate(180deg); }

/* Pasek boczny */
.sidebar {
    position: fixed;
    top: 0; /* ← tu zmiana */
    left: 0;
    width: 300px;
    height: 100vh; /* ← pełna wysokość */
    background-color: #4A90E2;
    padding: 20px;
    box-shadow: 2px 0 4px rgba(0, 0, 0, 0.05);
    z-index: 1001; /* nad top-barem */
}


.sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar li {
    margin-bottom: 15px;
}

.sidebar a {
    text-decoration: none;
    color: #333;
    font-weight: bold;
    display: block;
    padding: 10px;
    border-radius: 6px;
    transition: background-color 0.2s;
}

.sidebar a:hover {
    background-color: #bdd4f3;
}

.container {
    position: relative;
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    padding: 30px;
    width: 100%;
    max-width: 530px;
    text-align: center;
    margin: 30px auto; /* ← automatyczne wyśrodkowanie */
}


