/* 
 * File: public/assets/css/main.css
 * Główny arkusz stylów dla systemu fakturowania - Ciemny motyw
 */

/* Reset i podstawowe style */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
}

body {
    font-family: 'Roboto', Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: #e4e6eb;
    background-color: #1e2024;
    display: flex;
    flex-direction: column;
}

a {
    color: #4da3ff;
    text-decoration: none;
    transition: all 0.2s ease;
}

a:hover {
    color: #6fb8ff;
    text-decoration: none;
}

/* Układ strony */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
    width: 100%;
}

.row {
    display: flex;
    flex-wrap: wrap;
    margin-right: -15px;
    margin-left: -15px;
}

.col, .col-md-4, .col-md-6, .col-md-8 {
    position: relative;
    width: 100%;
    padding-right: 15px;
    padding-left: 15px;
}

@media (min-width: 768px) {
    .col-md-4 {
        flex: 0 0 33.333333%;
        max-width: 33.333333%;
    }
    
    .col-md-6 {
        flex: 0 0 50%;
        max-width: 50%;
    }
    
    .col-md-8 {
        flex: 0 0 66.666667%;
        max-width: 66.666667%;
    }
}

/* Nagłówek */
.header {
    background-color: #272b30;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    padding: 15px 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    height: 40px;
}

.nav-main {
    display: flex;
    list-style: none;
}

.nav-main li {
    margin-left: 20px;
}

.nav-main a {
    color: #e4e6eb;
    font-weight: 500;
    padding: 8px 12px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.nav-main a:hover {
    background-color: #3a3f48;
    color: #fff;
}

.user-menu {
    position: relative;
}

.user-menu-btn {
    display: flex;
    align-items: center;
    cursor: pointer;
    color: #e4e6eb;
    padding: 8px 12px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.user-menu-btn:hover {
    background-color: #3a3f48;
}

.user-menu-btn img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    margin-right: 8px;
}

.user-menu-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background-color: #272b30;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    padding: 10px 0;
    min-width: 200px;
    display: none;
    margin-top: 5px;
    z-index: 1001;
}

.user-menu-dropdown.show {
    display: block;
}

.user-menu-dropdown a {
    display: block;
    padding: 8px 15px;
    color: #e4e6eb;
}

.user-menu-dropdown a:hover {
    background-color: #3a3f48;
    color: #fff;
}

/* Treść główna */
.main-content {
    margin-top: 70px;
    padding: 30px 0;
    flex: 1 0 auto;
}

/* Stopka */
.footer {
    background-color: #272b30;
    border-top: 1px solid #3a3f48;
    padding: 20px 0;
    font-size: 13px;
    color: #a0a5ae;
    margin-top: auto;
}

/* Karty */
.card {
    background-color: #272b30;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    margin-bottom: 20px;
    border: 1px solid #383e47;
}

.card-header {
    padding: 15px 20px;
    border-bottom: 1px solid #383e47;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-header h2 {
    font-size: 18px;
    font-weight: 500;
    margin: 0;
    color: #e4e6eb;
}

.card-body {
    padding: 20px;
}

.card-footer {
    padding: 15px 20px;
    border-top: 1px solid #383e47;
    background-color: #2c3036;
}

/* Przyciski */
.btn {
    display: inline-block;
    font-weight: 500;
    text-align: center;
    vertical-align: middle;
    cursor: pointer;
    border: 1px solid transparent;
    padding: 0.375rem 0.75rem;
    font-size: 14px;
    line-height: 1.5;
    border-radius: 4px;
    transition: all 0.15s ease-in-out;
}

.btn-primary {
    color: #fff;
    background-color: #3a86ff;
    border-color: #3a86ff;
}

.btn-primary:hover {
    background-color: #2a76ef;
    border-color: #2a76ef;
}

.btn-secondary {
    color: #fff;
    background-color: #6c757d;
    border-color: #6c757d;
}

.btn-secondary:hover {
    background-color: #5c636a;
    border-color: #565e64;
}

.btn-success {
    color: #fff;
    background-color: #28a745;
    border-color: #28a745;
}

.btn-success:hover {
    background-color: #218838;
    border-color: #1e7e34;
}

.btn-danger {
    color: #fff;
    background-color: #dc3545;
    border-color: #dc3545;
}

.btn-danger:hover {
    background-color: #c82333;
    border-color: #bd2130;
}

.btn-info {
    color: #fff;
    background-color: #17a2b8;
    border-color: #17a2b8;
}

.btn-info:hover {
    background-color: #138496;
    border-color: #117a8b;
}

.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 12px;
    border-radius: 3px;
}

.btn-lg {
    padding: 0.5rem 1rem;
    font-size: 16px;
    border-radius: 5px;
}

.btn-group {
    display: inline-flex;
    vertical-align: middle;
}

.btn-group .btn {
    position: relative;
    flex: 1 1 auto;
}

.btn-group .btn:not(:first-child) {
    margin-left: -1px;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

.btn-group .btn:not(:last-child) {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

/* Formularze */
.form-group {
    margin-bottom: 1rem;
}

.form-label {
    display: inline-block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #e4e6eb;
}

.form-control {
    display: block;
    width: 100%;
    padding: 0.375rem 0.75rem;
    font-size: 14px;
    line-height: 1.5;
    color: #e4e6eb;
    background-color: #383e47;
    background-clip: padding-box;
    border: 1px solid #4b5563;
    border-radius: 4px;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus {
    color: #e4e6eb;
    background-color: #3a3f48;
    border-color: #5c92ff;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(58, 134, 255, 0.25);
}

.form-control::placeholder {
    color: #868e96;
    opacity: 1;
}

.form-select {
    display: block;
    width: 100%;
    padding: 0.375rem 0.75rem;
    font-size: 14px;
    line-height: 1.5;
    color: #e4e6eb;
    background-color: #383e47;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='4' height='5' viewBox='0 0 4 5'%3e%3cpath fill='%23e4e6eb' d='M2 0L0 2h4zm0 5L0 3h4z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 8px 10px;
    border: 1px solid #4b5563;
    border-radius: 4px;
    appearance: none;
}

.form-select:focus {
    border-color: #5c92ff;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(58, 134, 255, 0.25);
}

.form-actions {
    margin-top: 1.5rem;
}

/* Tabele */
.table-responsive {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table {
    width: 100%;
    margin-bottom: 1rem;
    color: #e4e6eb;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 0.75rem;
    vertical-align: top;
    border-top: 1px solid #383e47;
}

.table thead th {
    vertical-align: bottom;
    border-bottom: 2px solid #383e47;
    background-color: #2c3036;
    font-weight: 500;
    text-align: left;
}

.table tbody + tbody {
    border-top: 2px solid #383e47;
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: #2c3036;
}

.table-hover tbody tr:hover {
    background-color: #3a3f48;
}

/* Powiadomienia */
.alert {
    position: relative;
    padding: 0.75rem 1.25rem;
    margin-bottom: 1rem;
    border: 1px solid transparent;
    border-radius: 4px;
}

.alert-success {
    color: #d4edda;
    background-color: #1e4620;
    border-color: #1b4419;
}

.alert-danger {
    color: #f8d7da;
    background-color: #5c1a22;
    border-color: #50171e;
}

.alert-warning {
    color: #fff3cd;
    background-color: #7d6608;
    border-color: #6d5807;
}

.alert-info {
    color: #d1ecf1;
    background-color: #0a5c66;
    border-color: #095057;
}

/* Paginacja */
.pagination-container {
    display: flex;
    justify-content: center;
    margin-top: 1.5rem;
}

.pagination {
    display: flex;
    list-style: none;
    border-radius: 4px;
    margin: 20px 0;
}

.pagination li {
    margin: 0 2px;
}

.pagination a {
    display: block;
    padding: 6px 12px;
    line-height: 1.5;
    color: #e4e6eb;
    background-color: #383e47;
    border: 1px solid #4b5563;
    border-radius: 4px;
}

.pagination a:hover {
    background-color: #4b5563;
    border-color: #5c6470;
}

.pagination .active a {
    color: #fff;
    background-color: #3a86ff;
    border-color: #3a86ff;
    cursor: default;
}

.pagination .disabled a {
    color: #868e96;
    background-color: #383e47;
    border-color: #4b5563;
    cursor: not-allowed;
}

/* Widgety dashboardu */
.dashboard-widgets {
    display: flex;
    flex-wrap: wrap;
    margin: -10px;
    margin-bottom: 20px;
}

.widget {
    flex: 1 0 calc(25% - 20px);
    margin: 10px;
    padding: 20px;
    background-color: #272b30;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    text-align: center;
    border: 1px solid #383e47;
}

.widget-value {
    font-size: 28px;
    font-weight: 500;
    margin-bottom: 5px;
    color: #fff;
}

.widget-label {
    font-size: 13px;
    color: #a0a5ae;
}

.widget-icon {
    font-size: 32px;
    margin-bottom: 10px;
    color: #3a86ff;
}

/* Statusy faktur */
.status-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 500;
}

.status-draft {
    background-color: #6c757d;
    color: #fff;
}

.status-issued {
    background-color: #ffc107;
    color: #000;
}

.status-sent {
    background-color: #3a86ff;
    color: #fff;
}

.status-paid {
    background-color: #28a745;
    color: #fff;
}

.status-overdue {
    background-color: #dc3545;
    color: #fff;
}

.status-cancelled {
    background-color: #343a40;
    color: #fff;
}

/* Dropdown */
.dropdown-toggle::after {
    display: inline-block;
    margin-left: .255em;
    vertical-align: .255em;
    content: "";
    border-top: .3em solid;
    border-right: .3em solid transparent;
    border-bottom: 0;
    border-left: .3em solid transparent;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 1000;
    display: none;
    float: left;
    min-width: 10rem;
    padding: 0.5rem 0;
    margin: 0.125rem 0 0;
    font-size: 14px;
    color: #e4e6eb;
    text-align: left;
    list-style: none;
    background-color: #272b30;
    background-clip: padding-box;
    border: 1px solid #383e47;
    border-radius: 4px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.dropdown-menu.show {
    display: block;
}

.dropdown-item {
    display: block;
    width: 100%;
    padding: 0.25rem 1.5rem;
    clear: both;
    font-weight: 400;
    color: #e4e6eb;
    text-align: inherit;
    white-space: nowrap;
    background-color: transparent;
    border: 0;
}

.dropdown-item:hover, .dropdown-item:focus {
    color: #fff;
    text-decoration: none;
    background-color: #3a3f48;
}

.dropdown-divider {
    height: 0;
    margin: 0.5rem 0;
    overflow: hidden;
    border-top: 1px solid #383e47;
}

/* Modals */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1050;
    display: none;
    width: 100%;
    height: 100%;
    overflow: hidden;
    outline: 0;
}

.modal.show {
    display: block;
}

.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1040;
    width: 100vw;
    height: 100vh;
    background-color: #000;
    opacity: 0.5;
}

.modal-dialog {
    position: relative;
    width: auto;
    margin: 0.5rem;
    pointer-events: none;
    max-width: 500px;
    margin: 1.75rem auto;
}

.modal-content {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    pointer-events: auto;
    background-color: #272b30;
    background-clip: padding-box;
    border: 1px solid #383e47;
    border-radius: 0.3rem;
    outline: 0;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
}

.modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 1rem;
    border-bottom: 1px solid #383e47;
    border-top-le