/* Plik: style.css - Wersja dla Bootstrap */

/* --- Style Globalne --- */
body {
    background-color: #f8f9fa; /* Jasnoszare tło dla spójności */
}

/* NOWE, WYRAŹNIEJSZE Style dla statusów usług */

/* Żółty: dla usług wygasających w ciągu 30 dni */
.status-expiring {
    border-left: 5px solid #ffc107 !important; /* Gruba, żółta ramka z lewej */
}

/* Czerwony: dla usług, które już wygasły */
.status-expired {
    border-left: 5px solid #dc3545 !important; /* Gruba, czerwona ramka z lewej */
    font-weight: 500;
}

/* Dostosowanie koloru ikony dla lepszej widoczności na czerwonym tle */
.status-expired .expired-icon {
    color: #dc3545; 
}


/* Kolory dla wygasających i przeterminowanych usług */
.table .expiring-soon {
    background-color: #fff3cd !important; /* Żółte tło dla wierszy */
}

.expired-icon {
    color: #dc3545; /* Czerwony */
    font-weight: bold;
    margin-left: 5px;
}

.warning-icon {
    color: #ff9900; /* Pomarańczowy */
    font-weight: bold;
    margin-left: 5px;
}

/* Styl dla etykiety "Opłacono w całości" */
.paid-in-full {
    color: #198754; /* Zielony kolor sukcesu */
    font-weight: bold;
}

.action-links {
    display: flex;
    align-items: center;
    justify-content: center; 
    gap: 8px; 
    height: 100%; 
}

/* Zostawiamy styl dla samych linków */
.action-links a {
    text-decoration: none;
    font-size: 16px;
    padding: 5px 8px;
    transition: opacity 0.2s;
}

.action-links a.view-link { color: #0d6efd; } /* Niebieski */
.action-links a.edit-link { color: #198754; } /* Zielony */
.action-links a.delete-link { color: #dc3545; } /* Czerwony */

.action-links a:hover {
    opacity: 0.7;
}

/* Zapobiega zawijaniu się przycisków akcji w tabelach */
.col-actions {
    white-space: nowrap;
    width: 1%;
}

/* Usuwa domyślny wygląd linków w nagłówkach tabel */
thead th a {
    color: inherit;
    text-decoration: none;
    white-space: nowrap;
}
thead th a:hover {
    color: #007bff;
}

/* --- Strona Główna (Dashboard) --- */

/* Kolory dla menu głównego */
.menu-clients { background-color: #0d6efd; }
.menu-domains { background-color: #198754; }
.menu-hosting { background-color: #6f42c1; }

/* Efekt hover dla kart menu */
.row a .card {
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}
.row a:hover .card {
    transform: translateY(-5px); /* Lekkie uniesienie */
    box-shadow: 0 .5rem 1rem rgba(0,0,0,.15)!important; /* Wzmocnienie cienia */
}

/* --- Formularze --- */

/* Formularz logowania z ikonami */
.input-group {
    align-items: stretch;
}
.input-group-addon {
    background-color: #e9ecef;
    border: 1px solid #ced4da;
    border-right: none;
    border-radius: .25rem 0 0 .25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
}
.input-group:focus-within .input-group-addon {
    border-color: #86b7fe;
}
.input-group:focus-within .input-group-addon i {
    color: #007bff;
}

/* --- Pozostałe niestandardowe style --- */

/* Szczegóły klienta */
.client-details-table {
    width: 100%;
    margin: 20px 0;
    border: 1px solid #dee2e6;
    border-radius: .375rem;
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    overflow: hidden;
}
.client-details-table td {
    padding: 1rem;
    border-bottom: 1px solid #dee2e6;
}
.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%;
}

/* Kopiowanie do schowka */
.copy-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #6c757d;
    margin-left: 10px;
    padding: 0 5px;
    font-size: 14px;
    transition: color 0.2s, transform 0.2s;
}
.copy-btn:hover {
    color: #007bff;
    transform: scale(1.2);
    background-color: transparent !important;
}
.copy-tooltip {
    position: absolute;
    background-color: #28a745;
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    z-index: 10;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

/* Notatki klienta */
.notes-section {
    margin-top: 40px;
}
.note-item {
    background-color: #fff;
    border: 1px solid #dee2e6;
    border-left: 5px solid #0d6efd;
    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;
}

/* Style dla podglądu oferty */
.attachment-list a {
    text-decoration: none;
}
.attachment-list a:hover {
    text-decoration: underline;
}


/* Style TYLKO dla interaktywnego statusu oferty */
.status-select {
    color: white;
    min-width: 130px;
    font-weight: 500;
    border: none;
    /* Usuwamy domyślną strzałkę, bo Bootstrap doda swoją */
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

/* Nowe nowe nowe */
/* Style dla tabeli pozycji oferty (jak w VMS) */
.offer-items-table th {
    font-size: 0.85em;
    padding: 0.5rem;
    vertical-align: middle;
}
.offer-items-table tbody td {
    padding: 0.5rem;
    vertical-align: top;
}
.offer-items-table .form-control,
.offer-items-table .form-select {
    font-size: 0.9em;
}

/* Style dla uchwytu do przeciągania */
.drag-handle {
    cursor: move;
    color: #aaa;
    padding-top: 10px !important;
    vertical-align: middle !important;
}
.drag-handle:hover { color: #333; }

/* Style dla przełącznika (suwaka) opisu */
.description-toggle {
    display: block;
    margin-top: 5px;
}
.switch {
    position: relative;
    display: inline-block;
    width: 34px;
    height: 20px;
}
.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}
.slider:before {
    position: absolute;
    content: "";
    height: 12px;
    width: 12px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}
input:checked + .slider {
    background-color: #0d6efd;
}
input:checked + .slider:before {
    transform: translateX(14px);
}
.description-toggle label {
    font-size: 0.8em;
    color: #6c757d;
    margin-left: 5px;
    vertical-align: middle;
}