/* Plik: style.css - styl ogólny i nawigacja */
body {
    font-family: Arial, sans-serif;
    margin: 40px;
    background-color: #f4f4f4;
}

.wrapper {
    max-width: 90%;
    margin: 0 auto;
    padding: 20px;
    background: #fff;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

h2 {
    text-align: center;
    margin: 20px 0;
}

/* Style dla logo na stronie logowania */
.login-logo {
    text-align: center;
    margin-bottom: 20px;
}
.login-logo img {
    max-width: 200px; /* Maksymalna szerokość logo */
    height: auto; /* Zachowaj proporcje */
}

.nav-link {
    display: inline-block;
    margin: 20px 5px 20px 0;
    padding: 10px 15px;
    color: white;
    text-decoration: none;
    transition: background-color 0.2s, color 0.2s;
    border-radius: 5px;
    background-color: #6c757d;
}

.nav-link:hover {
    background-color: #555a5f;
}

.add-link {
    float: right;
    display: inline-block;
    margin: 20px 5px 20px 0;
    padding: 10px 15px;
    color: white;
    text-decoration: none;
    transition: background-color 0.2s, color 0.2s;
    border-radius: 5px;
    background-color: #28a745;
}

.add-link:hover {
    background-color: #218838;
}


/* Formularze (logowanie, dodawanie klienta, domeny, etc.) */
form {
    max-width: 600px;
    margin: auto;
}

label {
    display: block;
    margin-top: 10px;
}

/* NOWE, POPRAWIONE style dla formularza logowania */
.input-group {
    display: flex;
    align-items: center;
    border: 1px solid #ccc;
    border-radius: 4px;
    margin-bottom: 15px;
    background-color: #fff;
    transition: border-color 0.2s ease-in-out;
}

.input-group:focus-within {
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.input-group-addon {
    padding: 10px 12px;
    background-color: #e9ecef;
}

.input-group-addon i {
    color: #495057;
    font-size: 16px;
    transition: color 0.2s;
}

.input-group:focus-within .input-group-addon i {
    color: #007bff;
}

.input-group input {
    flex-grow: 1;
    border: none!important;
    margin-top: 2px!important;
    padding: 10px;
    outline: none;
    background: transparent;
    width: 100%;
}

.remember-me {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    font-size: 14px;
}
.remember-me input[type="checkbox"] {
    width: auto;
    margin: 0 10px 0 0;
}
.remember-me label {
    margin: 0;
    color: #555;
    cursor: pointer;
}

input[type="text"],
input[type="password"],
input[type="email"],
input[type="number"],
input[type="date"],
textarea,
select {
    width: 100%;
    padding: 8px;
    margin-top: 5px;
    box-sizing: border-box;
    border-radius: 4px;
    border: 1px solid #ccc;
}

button[type="submit"],
.btn {
    margin-top: 20px;
    padding: 10px 20px;
    cursor: pointer;
    background-color: #007bff;
    color: white;
    border: none;
    transition: background-color 0.2s, color 0.2s;
    border-radius: 4px;
    width: 100%;
}

button:hover,
.btn:hover {
    background-color: #0056b3;
}

.alert {
    padding: 10px;
    color: #721c24;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    margin-bottom: 15px;
}

/* Tabele (listy klientów, domen, hostingów) */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

th,
td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: left;
}

th {
    background-color: #f2f2f2;
}

tr:nth-child(even) {
    background-color: #f9f9f9;
}

tr:hover {
    background-color: #f1f1f1;
}

thead th a {
    color: inherit; 
    text-decoration: none;
    white-space: nowrap;
}

thead th a:hover {
    color: #007bff;
}

.no-data {
    text-align: center;
    padding: 20px;
    font-size: 18px;
}

/* Zapobiega zawijaniu się przycisków akcji w tabelach */
.col-actions {
    white-space: nowrap;
    width: 1%; /* Mały trik, aby kolumna była tak wąska, jak to możliwe, zostawiając miejsce innym */
}

/* Podświetlenie wygasających usług */
.expiring-soon {
    background-color: #f8d7da !important; /* Important, aby nadpisać inne style tła */
    color: #721c24;
    font-weight: bold;
}


/* Linki akcji w tabelach */
.action-links a {
    margin-right: 10px;
    text-decoration: none;
    padding: 5px 10px;
    border-radius: 3px;
    border: 1px solid transparent;
    transition: background-color 0.2s, color 0.2s;
}

.view-link { color: #007bff; border-color: #007bff; }
.edit-link { color: #28a745; border-color: #28a745; }
.delete-link { color: #dc3545; border-color: #dc3545; }

/* Panel główny (Dashboard) */
.dashboard {
    max-width: 800px;
    margin: auto;
}

.welcome {
    font-size: 24px;
    margin-bottom: 20px;
    border-bottom: 1px solid #ccc;
    padding-bottom: 10px;
}

.welcome a {
    float: right;
    font-size: 16px;
    text-decoration: none;
}

.welcome .logout-link {
    float: right;
    font-size: 16px;
    text-decoration: none;
    color: #6c757d; /* Ustawia stały, szary kolor */
    transition: color 0.2s;
}

.welcome .logout-link:hover {
    color: #dc3545; /* Czerwony kolor przy najechaniu, spójny z przyciskami 'usuń' */
}

/* Styl dla ikony odświeżania w powitaniu */
.refresh-icon {
    margin-left: 15px;
    font-size: 16px;
    color: #6c757d;
    text-decoration: none;
    transition: transform 0.3s ease;
    display: inline-block; /* Potrzebne do animacji */
}

.refresh-icon:hover {
    color: #007bff;
    transform: rotate(180deg); /* Efekt obrotu przy najechaniu */
}

/* Kontener dla menu na stronie głównej */
.menu-container {
    display: flex; /* Włącza tryb Flexbox */
    gap: 20px; /* Tworzy odstęp 20px między przyciskami */
    margin-top: 20px;
}

/* Zastąp stary styl .menu-item tym nowym */
.menu-item {
    flex: 1; /* Każdy przycisk zajmuje tyle samo miejsca */
    display: flex;
    flex-direction: column; /* Układa ikonę nad tekstem */
    align-items: center; /* Wyśrodkowuje zawartość w poziomie */
    justify-content: center; /* Wyśrodkowuje zawartość w pionie */
    padding: 30px 20px;
    text-decoration: none;
    color: white;
    text-align: center;
    border-radius: 8px;
    font-size: 18px;
    transition: transform 0.2s ease;
}

.menu-item:hover {
    transform: translateY(-5px); /* Lekkie uniesienie przy najechaniu */
    color: white;
}

.menu-item i {
    font-size: 36px; /* Większa ikona */
    margin-bottom: 15px; /* Odstęp między ikoną a tekstem */
}

/* Warianty kolorystyczne */
.menu-clients { background-color: #007bff; }
.menu-clients:hover { background-color: #0056b3; }

.menu-domains { background-color: #28a745; }
.menu-domains:hover { background-color: #218838; }

.menu-hosting { background-color: #6f42c1; }
.menu-hosting:hover { background-color: #5a32a3; }

/* Szczegóły klienta */
.client-details {
    background-color: #f9f9f9;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.client-details p {
    margin: 5px 0;
}

.client-details strong {
    display: inline-block;
    width: 120px;
}

/* Style dla boksów z podsumowaniem na listach */
.summary-box {
    background-color: #e2e3e5;
    border-left: 5px solid #007bff;
    padding: 15px 20px;
    margin-bottom: 20px;
    border-radius: 5px;
}
.summary-box h3 {
    margin: 0;
    color: #343a40;
}

/* Style dla sekcji podsumowania na stronie głównej */
.summary-section {
    margin-top: 40px;
    border-top: 2px solid #f2f2f2;
    padding-top: 20px;
}
.summary-item {
    display: flex;
    justify-content: space-between;
    padding: 12px;
    background-color: #f9f9f9;
    border-radius: 5px;
    margin-bottom: 8px;
    font-size: 18px;
}
.summary-item.total {
    background-color: #28a745;
    color: white;
    font-size: 20px;
}
.summary-item span {
    color: #6c757d;
}
.summary-item.total span {
    color: white;
}

/* Style dla formularza wyszukiwania */
.search-form {
    margin-bottom: 20px;
    max-width: 400px;
    display: flex; /* Włącza tryb Flexbox */
    align-items: center; /* Wyrównuje elementy w pionie */
}

.search-form input[type="text"] {
    flex-grow: 1; /* Pole input będzie rosło, aby wypełnić dostępną przestrzeń */
    margin-right: 10px; /* Odstęp między polem a przyciskiem */
}

.search-form button {
    flex-shrink: 0; /* Zapobiega kurczeniu się przycisku */
    width: 100px; /* Zachowujemy stałą szerokość przycisku */
    margin-top: 5px;
    padding: 9px;
}

/* Styl dla sekcji z wygasłymi usługami na stronie głównej */
.expired-section {
    background-color: #f8d7da; /* Czerwonawe tło */
    border: 1px solid #f5c6cb;
    border-radius: 5px;
    padding: 15px;
    margin-bottom: 30px;
}
.expired-section h3 {
    margin-top: 0;
    color: #721c24; /* Ciemnoczerwony tekst */
}
.expired-section h4 {
    color: #721c24;
}
/* Użyjemy tej samej listy, co dla wygasających */
.expired-section .expiring-list li {
    border-bottom: 1px solid #f5c6cb;
}
.expired-section .expiring-list li:last-child {
    border-bottom: none;
}

/* Styl dla ikony wygasłej usługi */
.expired-icon {
    color: #dc3545; /* Czerwony kolor */
    font-weight: bold;
    margin-left: 5px;
    display: inline-block;
}

        .expiring-section {
            background-color: #fff3cd;
            border: 1px solid #ffeeba;
            border-radius: 5px;
            padding: 15px;
            margin-bottom: 30px;
        }
        .expiring-section h3 {
            margin-top: 0;
            color: #856404;
        }
        .expiring-section h4 {
            margin-top: 0;
            color: #856404;
        }
        .expiring-list {
            list-style-type: none;
            padding-left: 0;
        }
        .expiring-list li {
            padding: 8px 0;
            border-bottom: 1px solid #ffeeba;
        }
        .expiring-list li:last-child {
            border-bottom: none;
        }
        .expiring-list a {
            text-decoration: none;
            color: #0056b3;
            font-weight: bold;
        }

/* Dodaj ten styl na końcu pliku style.css */
.alert-success {
    color: #155724;
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
}

/* Style dla paginacji */
.pagination {
    margin-top: 20px;
    text-align: center;
}

.pagination a,
.pagination span {
    color: #007bff;
    padding: 8px 16px;
    text-decoration: none;
    transition: background-color .3s;
    border: 1px solid #ddd;
    margin: 0 4px;
    border-radius: 4px;
}

.pagination a.active {
    background-color: #007bff;
    color: white;
    border: 1px solid #007bff;
}

.pagination a:hover:not(.active) {
    background-color: #ddd;
}

.pagination .disabled {
    color: #ccc;
    pointer-events: none;
}

/* Style dla nowej tabeli ze szczegółami klienta */
.client-details-table {
    width: 100%;
    margin: 20px 0;
    border: 1px solid #e2e3e5;
    border-radius: 8px;
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    overflow: hidden; /* Potrzebne dla zaokrąglonych rogów */
}
.client-details-table td {
    padding: 15px;
    border-bottom: 1px solid #e2e3e5;
}
.client-details-table tr:last-child td {
    border-bottom: none;
}
.client-details-table td:first-child {
    background-color: #f8f9fa;
    font-weight: bold;
    color: #495057;
    width: 25%; /* Szerokość kolumny z etykietami */
}

/* Dodaj ten styl na końcu pliku */
.btn-view-details {
    background-color: #ffc107;
    color: #212529 !important; /* Ważne, aby nadpisać biały kolor z .nav-buttons a */
}
.btn-view-details:hover {
    background-color: #e0a800;
}

/* Style dla sekcji notatek klienta */
.notes-section {
    margin-top: 40px;
}
.note-item {
    background-color: #fff;
    border: 1px solid #e2e3e5;
    border-left: 5px solid #007bff;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 15px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}
.note-header {
    font-size: 12px;
    color: #6c757d;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
}
.note-header .actions a {
    color: #6c757d;
    text-decoration: none;
    margin-left: 15px;
}
.note-content {
    font-size: 15px;
    line-height: 1.6;
    white-space: pre-wrap; /* Zachowuje entery i spacje */
}
.add-note-form textarea {
    resize: vertical;
}

/* Styl dla przycisku kopiowania */
.copy-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #6c757d; /* Neutralny szary kolor */
    margin-left: 10px;
    padding: 0 5px;
    font-size: 14px;
    transition: color 0.2s, transform 0.2s;
}

.copy-btn:hover {
    color: #007bff;
    background-color: transparent !important; /* <<< DODAJ TĘ LINIĘ */
}

/* Styl dla dymka "Skopiowano!" */
.copy-tooltip {
    position: absolute;
    background-color: #28a745; /* Zielony kolor sukcesu */
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    z-index: 10;
    opacity: 0; /* Domyślnie niewidoczny */
    transition: opacity 0.3s ease;
    pointer-events: none; /* Aby nie blokował myszki */
}

/* Styl dla ikony ostrzegawczej (wygasa w ciągu 7 dni) */
.warning-icon {
    color: #ff9900; /* Wyraźny pomarańczowy kolor */
    font-weight: bold;
    margin-left: 5px;
}