/* styles.css */

/* Reset some default styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* General Body Styles */
body {
    font-family: Arial, sans-serif;
    background: #f4f4f4;
    margin: 0;
    padding: 0;
}

.wrapper {
    display: flex;
}

/* Sidebar Styles */
.sidebar {
    width: 250px;
    background: #2c3e50;
    color: #ecf0f1;
    min-height: 100vh;
    position: fixed;
    transition: transform 0.3s ease;
    z-index: 1000;
}

.sidebar-header {
    padding: 20px;
    background: #1a252f;
    text-align: center;
}

.sidebar-header img {
    width: 80px;
    margin-bottom: 10px;
}

.sidebar-header h2 {
    margin: 0;
    font-size: 20px;
}

.menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.menu li {
    border-bottom: 1px solid #34495e;
}

.menu li a {
    color: #ecf0f1;
    padding: 15px 20px;
    display: block;
    text-decoration: none;
    transition: background 0.3s;
}

.menu li a:hover,
.menu li.active > a {
    background: #34495e;
}

.submenu {
    list-style: none;
    padding: 0;
    display: none;
}

.submenu li a {
    padding-left: 40px;
    background: #34495e;
}

.menu li.active > .submenu {
    display: block;
}

.right {
    float: right;
}

/* Main Content Styles */
.main-content {
    margin-left: 250px;
    padding: 20px;
    width: calc(100% - 250px);
    transition: margin-left 0.3s, width 0.3s;
}

/* Header Styles */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    background: #16a085;
    color: #ecf0f1;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    position: relative;
}

header h2 {
    margin: 0;
    font-size: 24px;
    color: #ecf0f1;
}

/* Hamburger Menu */
.menu-toggle {
    display: none;
    font-size: 24px;
    color: #ecf0f1;
    cursor: pointer;
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
}

/* User Wrapper Adjustments */
.user-wrapper {
    position: relative;
    cursor: pointer;
    color: #ecf0f1;
}

.user-wrapper i {
    font-size: 30px;
    margin-right: 10px;
    color: #ecf0f1;
}

.user-wrapper div {
    display: inline-block;
}

.user-wrapper .dropdown-toggle {
    margin-left: 5px;
    color: #ecf0f1;
}

/* Dropdown Menu Styling */
.dropdown-menu {
    position: absolute;
    right: 0;
    top: 60px;
    background: #fff;
    color: #333;
    list-style: none;
    padding: 10px 0;
    border: 1px solid #ccc;
    border-radius: 4px;
    display: none;
    min-width: 150px;
    z-index: 1000;
}

/* Show dropdown on click */
.user-wrapper.active .dropdown-menu {
    display: block;
}

/* Dropdown Menu Links */
.dropdown-menu li a {
    padding: 10px 20px;
    display: block;
    color: #333;
    text-decoration: none;
}

.dropdown-menu li a:hover {
    background: #f4f4f4;
}

/* Form Container */
.form-container {
    max-width: 600px;
    margin: 40px auto;
    padding: 20px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* Form Groups */
.form-group {
    margin-bottom: 20px;
}

/* Labels */
.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #333;
}

/* Input Groups */
.input-group {
    position: relative;
}

.input-group i {
    position: absolute;
    top: 50%;
    left: 10px;
    transform: translateY(-50%);
    color: #999;
}

.input-group input,
.input-group select {
    width: 100%;
    padding: 10px 10px 10px 35px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 16px;
    box-sizing: border-box;
    transition: border-color 0.3s;
}

.input-group input:focus,
.input-group select:focus {
    border-color: #4CAF50;
    outline: none;
}

/* Submit Button */
button[type="submit"] {
    width: 100%;
    padding: 12px;
    background: #28a745;
    border: none;
    border-radius: 4px;
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    transition: background 0.3s;
}

button[type="submit"]:hover {
    background: #218838;
}

/* Feedback Messages */
.success-message,
.error-message {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
    display: flex;
    align-items: center;
}

.success-message {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.error-message {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.success-message i,
.error-message i {
    margin-right: 10px;
}

/* Back Button */
.btn-back {
    display: inline-block;
    margin-top: 15px;
    color: #28a745;
    text-decoration: none;
    font-size: 16px;
}

.btn-add {
    padding: 6px;
    border: 1px solid #28a745;
    margin-top: 20px;
    border-radius: 6px;
    float: right;
}

.btn-add a {
    text-decoration: none;
}

.btn-back:hover {
    text-decoration: underline;
}

/* Table Responsive Wrapper */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 20px;
}

/* Table Styling */
.table {
    width: 100%;
    border-collapse: collapse;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    margin-top: 10px;
}

/* Table Header */
.table thead {
    background-color: #16a085;
    color: #ecf0f1;
}

.table thead th {
    padding: 6px;
    text-align: left;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Table Body */
.table tbody tr {
    border-bottom: 1px solid #ddd;
    transition: background-color 0.3s;
}

.table tbody tr:nth-child(even) {
    background-color: #f9f9f9;
}

.table tbody tr:hover {
    background-color: #f1f1f1;
}

.table tbody td {
    padding: 5px 4px;
    font-size: 11px;
    color: #333;
    vertical-align: middle;
}

/* Action Buttons */
.btn-view, .btn-edit {
    display: inline-block;
    padding: 6px 10px;
    margin-right: 5px;
    border: none;
    border-radius: 4px;
    text-decoration: none;
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn-view {
    background-color: #3498db;
}

.btn-view:hover {
    background-color: #2980b9;
}

.btn-edit {
    background-color: #f39c12;
}

.btn-edit:hover {
    background-color: #e67e22;
}

/* Customer Information Section */
.customer-info {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #ddd;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.customer-info h3 {
    margin-bottom: 15px;
    color: #16a085;
}

.customer-info p {
    margin-bottom: 8px;
    color: #333;
}

/* Download Statement Button */
.download-btn {
    background: #2980b9;
    color: #fff;
    padding: 10px 15px;
    text-decoration: none;
    border-radius: 4px;
    transition: background 0.3s;
    display: inline-block;
    margin-bottom: 15px;
}

.download-btn:hover {
    background: #1c5980;
}

/* Messages Section */
.messages {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #ddd;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.messages h3 {
    margin-bottom: 15px;
    color: #16a085;
}

.messages .message-item {
    padding: 10px;
    border-bottom: 1px solid #eee;
}

.messages .message-item:last-child {
    border-bottom: none;
}

.messages .message-item p {
    margin-bottom: 5px;
    color: #333;
}

.messages .message-item .date-time {
    font-size: 12px;
    color: #777;
}

.cards {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.card-single {
    background: #fff;
    width: calc(20% - 20px);
    padding: 20px;
    border-radius: 5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-single div:first-child h1 {
    font-size: 24px;
    margin-bottom: 10px;
}

.card-single div:first-child span {
    color: #777;
}

.card-single div:last-child i {
    font-size: 40px;
    color: #4CAF50;
}

/* Pagination */
.pagination {
    margin-top: 10px;
    text-align: center;
}

.pagination a, .pagination span {
    display: inline-block;
    padding: 8px 12px;
    margin: 0 4px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    color: #2980b9;
    transition: background-color 0.3s, color 0.3s;
}

.pagination a:hover {
    background-color: #2980b9;
    color: #fff;
}

.pagination .current-page {
    background-color: #2980b9;
    color: #fff;
    border-color: #2980b9;
}

.pagination .disabled {
    color: #ccc;
    border-color: #ddd;
    pointer-events: none;
}

/* Search Form */
.search-form {
    margin-bottom: 10px;
    text-align: right;
}

.search-form input[type="text"] {
    padding: 6px 8px;
    width: 200px;
    border: 1px solid #ccc;
    border-radius: 4px;
    float: left;
}

.search-form button {
    padding: 4px;
    border: none;
    background-color: #2980b9;
    color: #fff;
    border-radius: 4px;
    cursor: pointer;
    width: 50px;
    float: left;
}

.search-form button:hover {
    background-color: #1f6391;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.4);
}

.modal-content {
    background-color: #fefefe;
    margin: 15% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 30%;
    border-radius: 8px;
    text-align: left;
}

.modal-content p {
    margin-top: 10px;
    margin-bottom: 10px;
}

.modal-content input {
    padding: 10px;
    margin-top: 10px;
    margin-bottom: 10px;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

.btn-submit {
    background-color: #4CAF50;
    color: white;
    padding: 10px 20px;
    border: none;
    cursor: pointer;
    border-radius: 5px;
}

.btn-submit:hover {
    background-color: #45a049;
}

/* Media Queries for Responsive Design */
@media (max-width: 1024px) {
    .card-single {
        width: calc(33.33% - 20px);
    }

    .modal-content {
        width: 50%;
    }
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    .sidebar {
        width: 200px;
        transform: translateX(-100%);
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
        width: 100%;
    }

    .form-container {
        max-width: 90%;
        margin: 20px auto;
        padding: 15px;
    }

    button[type="submit"] {
        font-size: 16px;
    }

    .btn-back {
        font-size: 14px;
    }

    .table thead {
        display: none;
    }

    .table, .table tbody, .table tr, .table td {
        display: block;
        width: 100%;
    }

    .table tr {
        margin-bottom: 15px;
    }

    .table td {
        text-align: right;
        padding-left: 50%;
        position: relative;
    }

    .table td::before {
        content: attr(data-label);
        position: absolute;
        left: 15px;
        width: 45%;
        padding-right: 10px;
        white-space: nowrap;
        text-align: left;
        font-weight: bold;
        color: #333;
    }

    .card-single {
        width: calc(50% - 20px);
    }

    .search-form input[type="text"] {
        width: 150px;
    }

    header h2 {
        font-size: 20px;
    }

    .modal-content {
        width: 80%;
    }
}

@media (max-width: 480px) {
    .sidebar {
        width: 180px;
        transform: translateX(-100%);
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .card-single {
        width: 100%;
    }

    .search-form input[type="text"] {
        width: 120px;
    }

    .search-form button {
        width: 40px;
    }

    .input-group input,
    .input-group select {
        font-size: 14px;
    }

    .table tbody td {
        font-size: 10px;
    }

    .btn-view, .btn-edit {
        font-size: 12px;
        padding: 4px 8px;
    }

    header h2 {
        font-size: 18px;
    }

    .user-wrapper i {
        font-size: 24px;
    }

    .modal-content {
        width: 90%;
    }
}