/* General body styles */
body {
    margin: 0;
    font-family: Arial, sans-serif;
    background-color: #f4f4f4;
}

/* Login and dashboard container */
.login-container, .dashboard {
    max-width: 400px;
    margin: 50px auto;
    padding: 20px;
    background: #fff;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Headings */
h1, h2 {
    text-align: center;
    color: #2c3e50;
}

/* Form styles */
form input, form textarea, form select {
    width: 100%;
    padding: 10px;
    margin: 10px 0;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
}

form button {
    width: 100%;
    padding: 10px;
    background-color: #007bff;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
}

form button:hover {
    background-color: #0056b3;
}

/* Error message styles */
.error {
    color: red;
    text-align: center;
}

/* Table styles */
.table-view table, .customer-table, .orders-table, .claims-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 16px;
    text-align: left;
    table-layout: fixed; /* Ensures all columns fit properly */
}

.table-view th, .customer-table th, .orders-table th, .claims-table th,
.table-view td, .customer-table td, .orders-table td, .claims-table td {
    padding: 8px;
    border: 1px solid #ddd;
    vertical-align: middle; /* Ensure content aligns vertically */
    word-wrap: break-word; /* Prevent text overflow */
    white-space: normal; /* Allow text to wrap */
}

.table-view th, .customer-table th, .orders-table th, .claims-table th {
    background-color: #f4f4f4;
    text-align: left;
}

.table-view tr:nth-child(even),
.customer-table tr:nth-child(even),
.orders-table tr:nth-child(even),
.claims-table tr:nth-child(even) {
    background-color: #f9f9f9;
}

/* Claims-specific styling */
.claims-table td input[type="text"], 
.claims-table td textarea {
    width: 95%;
    padding: 8px;
    margin: 5px 0;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 14px;
    resize: none;
}

.claims-table td textarea {
    height: 50px;
}

/* Add spacing for table rows */
.claims-table td {
    padding: 10px;
}

/* Highlight rows on hover */
.claims-table tr:hover {
    background-color: #f1f1f1;
}

/* Dashboard container */
.dashboard-container {
    display: flex;
    height: 100vh;
}

/* Sidebar styles */
.sidebar {
    width: 250px;
    background-color: #2c3e50;
    color: #ecf0f1;
    display: flex;
    flex-direction: column;
    padding: 20px;
    height: 100vh;
    overflow-y: auto;
}

.sidebar h2 {
    text-align: center;
    margin-bottom: 20px;
}

.sidebar ul {
    list-style-type: none;
    padding: 0;
}

.sidebar ul li {
    margin: 10px 0;
}

.sidebar ul li a {
    text-decoration: none;
    color: #ecf0f1;
    font-size: 16px;
    display: block;
    padding: 10px;
    border-radius: 5px;
    transition: background 0.3s;
}

.sidebar ul li a:hover {
    background-color: #34495e;
    color: #1abc9c;
    transform: scale(1.05);
    transition: all 0.3s ease-in-out;
}

/* Active link in sidebar */
.sidebar ul li a.active {
    background-color: #1abc9c;
    color: white;
    font-weight: bold;
}

/* Main content styles */
.main-content {
    flex-grow: 1;
    padding: 20px;
    background-color: #ecf0f1;
    color: #2c3e50;
    overflow-y: auto;
}

.main-content h1 {
    font-size: 24px;
    margin-bottom: 20px;
}

.main-content p {
    font-size: 16px;
}

/* Widgets container */
.widgets-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

/* Widget Card */
.card {
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

/* Card Header */
.card-header {
    background-color: #007bff;
    color: #fff;
    padding: 15px;
    font-size: 18px;
    text-align: center;
    font-weight: bold;
}

/* Card Body */
.card-body {
    padding: 20px;
    font-size: 16px;
    color: #333;
}

.card-body ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.card-body ul li {
    padding: 5px 0;
    border-bottom: 1px solid #f1f1f1;
}

.card-body ul li:last-child {
    border-bottom: none;
}

.widget-value {
    font-size: 28px;
    font-weight: bold;
    color: #007bff;
    text-align: center;
}

/* Responsive layout for smaller screens */
@media (max-width: 768px) {
    .dashboard-container {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        height: auto;
        text-align: center;
    }

    .sidebar ul li {
        display: inline-block;
        margin: 5px;
    }

    .sidebar ul li a {
        padding: 5px 10px;
        font-size: 14px;
    }

    .main-content {
        padding: 10px;
        margin-top: 2px;
    }

    .claims-table td input[type="text"], 
    .claims-table td textarea {
        width: 100%;
        font-size: 12px;
    }

    .widgets-container {
        grid-template-columns: 1fr;
    }

    .widget {
        flex: 1 1 100%;
    }
}

/* Print-Friendly Table */
@media print {
    body {
        visibility: hidden;
    }
    .main-content, .main-content * {
        visibility: visible;
    }
    .main-content {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
    }
    table {
        width: 100%;
        border-collapse: collapse;
        font-size: 12px;
    }
    th, td {
        padding: 5px;
        border: 1px solid black;
        word-wrap: break-word;
        white-space: normal;
    }
    th {
        background-color: #f4f4f4 !important;
    }
    button, .btn, .navbar, .sidebar {
        display: none !important;
    }
}
/* iPad-Friendly Styling */
@media only screen and (min-width: 768px) and (max-width: 1024px) {
    
    /* Adjusting the layout for iPads */
    .dashboard-container {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        height: auto;
        text-align: center;
        padding: 10px 0;
    }

    .sidebar ul {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        padding: 0;
    }

    .sidebar ul li {
        display: inline-block;
        margin: 5px;
    }

    .sidebar ul li a {
        padding: 8px 15px;
        font-size: 16px;
    }

    .main-content {
        padding: 15px;
        margin-top: 5px;
    }

    /* Tables - Ensure they fit the screen */
    .table-view table, 
    .customer-table, 
    .orders-table, 
    .claims-table {
        font-size: 14px; 
        table-layout: auto; 
    }

    .table-view th, 
    .customer-table th, 
    .orders-table th, 
    .claims-table th,
    .table-view td, 
    .customer-table td, 
    .orders-table td, 
    .claims-table td {
        padding: 10px;
        white-space: normal; /* Ensure text wraps properly */
    }

    /* Improve forms and inputs */
    form input, form textarea, form select {
        font-size: 16px;
    }

    /* Improve button spacing */
    form button {
        font-size: 16px;
        padding: 12px;
    }

    /* Ensure claim tables fit properly */
    .claims-table td input[type="text"], 
    .claims-table td textarea {
        width: 100%;
        font-size: 14px;
    }

    /* Widgets on iPad */
    .widgets-container {
        grid-template-columns: 1fr 1fr;
    }

    .widget {
        flex: 1 1 45%;
    }
}
.navbar-search {
  display: inline-flex;
  align-items: center; /* vertically centers the input and button */
}

.navbar-search input[type="text"] {
  padding: 5px;
  font-size: 14px;
  border: 1px solid #ccc;
  border-radius: 3px;
}

.navbar-search button {
  padding: 5px 10px;
  font-size: 14px;
  border: none;
  background-color: #007BFF;
  color: white;
  border-radius: 3px;
  cursor: pointer;
  margin-left: 5px; /* adds space between the input and the button */
  width: auto; /* ensures the button is only as wide as its content */
}
