* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #000;
    background-color: #f5f7fa;
    overflow-x: hidden;
}

html {
    scroll-behavior: smooth;
}

/* ============================================
   LOGIN PAGE STYLES
   ============================================ */

.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
}

.login-container {
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 50px 40px;
    max-width: 450px;
    width: 100%;
    text-align: center;
    animation: fadeInUp 0.6s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.logo-container {
    margin-bottom: 30px;
}

.logo-container img {
    height: 60px;
    width: auto;
}

.login-header h2 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 10px;
    color: #000;
    letter-spacing: -0.02em;
}

.login-header p {
    font-size: 16px;
    color: #666;
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 25px;
    text-align: left;
}

.form-label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
    font-size: 14px;
}

.form-control {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #eee;
    border-radius: 10px;
    font-size: 15px;
    transition: all 0.3s ease;
    font-family: inherit;
}

.form-control:focus {
    outline: none;
    border-color: #000;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.05);
}

/* Fix for select dropdown visibility */
select.form-control {
    color: #000;
    background-color: #fff;
}

select.form-control option {
    color: #000;
    background-color: #fff;
}

.btn-login {
    background: #000;
    color: #fff;
    padding: 16px 32px;
    border: none;
    border-radius: 30px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    margin-top: 10px;
}

.btn-login:hover {
    background: #333;
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.login-footer {
    margin-top: 30px;
    font-size: 14px;
    color: #666;
}

.login-footer a {
    color: #000;
    text-decoration: none;
    font-weight: 600;
    transition: opacity 0.2s ease;
}

.login-footer a:hover {
    opacity: 0.7;
    text-decoration: underline;
}

/* ============================================
   MAIN CONTENT STYLES
   ============================================ */

#main-content {
    padding: 0;
    background: #f5f7fa;
    min-height: 100vh;
}

/* Header matching dashboard */
.top-header {
    background: #fff;
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-logo {
    height: 40px;
    width: auto;
}

.header-title {
    font-size: 20px;
    font-weight: 700;
    color: #000;
    margin: 0;
}

.header-right {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* Button Styles */
.btn {
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s ease;
    padding: 10px 24px;
    border: none;
    cursor: pointer;
    font-size: 14px;
}

.btn-add {
    background: #4a4a4a;
    color: #fff;
}

.btn-add:hover {
    background: #333;
    color: #fff;
    transform: translateY(-1px);
}

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

.btn-logout:hover {
    background: #c82333;
    color: #fff;
    transform: translateY(-1px);
}

.btn-black {
    background: #000;
    color: #fff;
}

.btn-black:hover {
    background: #333;
    color: #fff;
}

/* Icon Buttons - All Grey Like Download Button */
.btn-icon {
    border-radius: 50%;
    width: 50px;
    height: 50px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    font-size: 18px;
    transition: all 0.3s ease;
    position: relative;
}

/* Remove default tooltip on hover */
.btn-icon[title]:hover::after {
    display: none;
}

.btn-grey-icon {
    background: #4a4a4a;
    color: #fff;
}

.btn-grey-icon:hover {
    background: #333;
    transform: scale(1.05);
    color: #fff;
}

.btn-red {
    background: #ef4444;
    color: #fff;
}

.btn-red:hover {
    background: #dc2626;
    transform: scale(1.05);
}

/* Card Styles */
.card {
    background: #fff;
    border-radius: 15px;
    border: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin: 0 20px 20px 20px;
}

.card-body {
    padding: 25px;
}

/* Pagination Controls */
.pagination-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px 15px 20px;
}

.left-controls {
    display: flex;
    align-items: center;
    gap: 30px;
}

.items-per-page,
.filter-by-status,
.search-box {
    display: flex;
    align-items: center;
    gap: 10px;
}

.items-per-page label,
.filter-by-status label {
    font-weight: 600;
    font-size: 14px;
    margin: 0;
    white-space: nowrap;
}

.items-per-page .form-control,
.filter-by-status .form-control {
    width: 100px;
    padding: 6px 12px;
    border: 2px solid #eee;
    border-radius: 8px;
    color: #000;
}

.pagination-info {
    font-weight: 600;
    font-size: 14px;
    color: #000;
}

/* Client List Styles */
.client-list {
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.client-item {
    background: #000;
    color: #fff;
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.client-item:hover {
    background: #222;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.client-header {
    padding: 20px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.client-info-header {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 15px;
    min-width: 0;
}

.client-text-info {
    flex: 1;
    min-width: 0;
}

.client-title-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 5px;
}

.client-name {
    font-size: 18px;
    font-weight: 700;
}

.client-website {
    font-size: 14px;
    color: #aaa;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 400px;
}

.client-header-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-shrink: 0;
}

/* Badge Styles */
.badge {
    padding: 6px 14px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    flex-shrink: 0;
}

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

.badge-pending {
    background: #ffc107;
    color: #000;
}

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

/* Accordion Body */
.client-body {
    padding: 0;
    display: none;
    background: #111;
    border-top: 1px solid #333;
}

.client-body.show {
    display: block;
}

.client-details {
    padding: 20px 25px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.detail-item {
    padding: 15px;
    background: #1a1a1a;
    border-radius: 10px;
}

.detail-label {
    font-size: 12px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
}

.detail-value {
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    word-break: break-word;
}

/* Pagination Styles */
.pagination {
    display: flex;
    list-style: none;
    padding: 0;
    gap: 5px;
}

.page-item {
    display: inline-block;
}

.page-link {
    padding: 8px 14px;
    border: 2px solid #000;
    border-radius: 8px;
    color: #000;
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 600;
    background: #fff;
}

.page-link:hover {
    background: #000;
    color: #fff;
}

.page-item.active .page-link {
    background: #000;
    color: #fff;
}

.page-item.disabled .page-link {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
}

/* Form Input Styles - Fixed padding for better visibility */
input.form-control,
select.form-control,
textarea.form-control {
    border: 2px solid #eee;
    border-radius: 10px;
    padding: 6px 16px;
    transition: all 0.3s ease;
    color: #000;
}

input.form-control:focus,
select.form-control:focus,
textarea.form-control:focus {
    border-color: #000;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.05);
    outline: none;
}

label {
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    font-size: 14px;
}

/* Alert Styles */
.alert {
    border-radius: 10px;
    padding: 15px 20px;
    margin: 0 20px 20px 20px;
    border: none;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
}

/* Modal Styles */
.modal-content {
    border-radius: 15px;
    border: none;
}

.modal-header {
    background: #000;
    color: #fff;
    border-radius: 15px 15px 0 0;
    border-bottom: none;
    padding: 20px 25px;
}

.modal-title {
    font-size: 20px;
    font-weight: 700;
}

.modal-header .close {
    color: #fff;
    opacity: 1;
    font-size: 28px;
    text-shadow: none;
}

.modal-header .close:hover {
    opacity: 0.8;
}

.modal-body {
    padding: 30px 25px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .top-header {
        flex-direction: column;
        gap: 15px;
        padding: 15px 20px;
    }

    .header-left,
    .header-right {
        width: 100%;
        justify-content: center;
    }

    .header-title {
        font-size: 18px;
    }

    .pagination-controls {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }

    .left-controls {
        flex-direction: column;
        gap: 15px;
        width: 100%;
        align-items: flex-start;
    }

    .client-header {
        flex-direction: column;
        gap: 15px;
    }

    .client-info-header {
        flex-direction: column;
        text-align: center;
        width: 100%;
    }

    .client-website {
        max-width: 100%;
    }

    .client-header-actions {
        width: 100%;
        justify-content: center;
    }

    .btn-icon {
        width: 45px;
        height: 45px;
        font-size: 16px;
    }
}

/* Search Box Styles */
.search-box label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.search-input-wrapper {
    position: relative;
    display: inline-block;
}

.search-box input {
    width: 300px;
    padding-right: 35px;
}

.btn-clear-search {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    padding: 5px;
    font-size: 14px;
    transition: color 0.2s;
}

.btn-clear-search:hover {
    color: #333;
}

@media (max-width: 1200px) {
    .left-controls {
        flex-wrap: wrap;
    }
    
    .search-box {
        margin-left: 0;
        margin-top: 15px;
        width: 100%;
    }
    
    .search-box input {
        width: 100%;
    }
}

.main-footer {
    background: #000;
    color: #fff;
    padding: 20px 0;
    margin-top: 50px;
    border-top: 3px solid #333;
}

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

.footer-left p,
.footer-right p {
    margin: 0;
    font-size: 14px;
}

.footer-left a,
.footer-right a {
    color: #fff;
    text-decoration: none;
    font-weight: bold;
}

.footer-left a:hover,
.footer-right a:hover {
    color: #ddd;
    text-decoration: underline;
}

@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
}

