/* Base Styles */
body {
    font-family: Verdana, Georgia, sans-serif;
    line-height: 1.25;
    margin: 0 auto;
    padding: 10px;
        max-width: 1100px;
    background-color: black;
    font-size:12pt;
    color:#ffffff;
}

/* Container and Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    padding: 20px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

/* Container and Layout */
.container2 {
    width:100%;
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    padding: 20px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

/* Form-specific container styling */
body.form-page {
    max-width: 800px;
    margin: 0 auto;
    background-color: white;
}

/* Typography */
h1 {
    text-align: center;
    margin-bottom: 30px;
    font-size:20pt; line-height:30pt;
}

h2 { font-size:17pt; font-weight:bold; }

p {
    text-indent: 20px;
}

/* Header Styles */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #ddd;
}

.header h1 {
    margin: 0;
    text-align: left; /* Override center alignment for header h1 */
}

.client-header {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.client-header.contact-issue {
    background: linear-gradient(135deg, #8e44ad, #6c3483);
}

.client-header h2 {
    margin: 0 0 10px 0;
    font-size: 1.8em;
}

.client-meta {
    display: flex;
    gap: 20px;
    font-size: 0.9em;
    opacity: 0.9;
}

/* Button Styles */
.button {
    display: inline-block;
    background: #4CAF50;
    color: white;
    padding: 4px 8px;
    text-decoration: none;
    font-size: 10pt;
    border-radius: 4px;
    border: none !important;
    outline: none !important;
    margin-right: 6px;
    white-space: nowrap;
}

.button:hover {
    background: #45a049;
}

button {
    background-color: #4CAF50;
    color: white;
    padding: 10px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
}

button:hover {
    background-color: #45a049;
}

.view-button {
    background: #2196F3;
    padding: 6px 12px;
    font-size: 14px;
}

.view-button:hover {
    background: #0b7dda;
}

.logout-button {
    background: #f44336;
    display: inline-block;
    margin-right: 6px;
    white-space: nowrap;
}

.logout-button:hover {
    background: #da190b;
}

.link-button {
    background: none;
    border: none;
    color: #007bff;
    text-decoration: underline;
    cursor: pointer;
    font-size: inherit;
    font-family: inherit;
}

.link-button:hover {
    color: #0056b3;
}

.back-button {
    margin-bottom: 20px;
}

/* Admin Controls */
.admin-controls {
    display: flex;
    gap: 10px;
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
textarea {
    width: 95%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

textarea {
    height: 150px;
}

.g-recaptcha {
    margin: 20px 0;
}

/* Message and Status Styles */
.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
}

.error {
    padding: 10px;
    margin-bottom: 20px;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    border-radius: 4px;
}

.error-message {
    text-align: center;
    padding: 40px;
    background: #f8d7da;
    color: #721c24;
    border-radius: 8px;
    margin-top: 20px;
}

.stats {
    background: #e7f3ff;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
}

/* Table Styles */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

th, td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

th {
    background-color: #f2f2f2;
    font-weight: bold;
}

tr:hover {
    background-color: #f5f5f5;
}

table .button {
    border: none !important;
    outline: none !important;
}

/* Client Details */
.client-details {
    display: grid;
    gap: 30px;
    margin-top: 20px;
}

.detail-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #007bff;
}

.detail-section h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #333;
    font-size: 1.2em;
    border-bottom: 1px solid #ddd;
    padding-bottom: 5px;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.detail-item {
    display: flex;
    flex-direction: column;
}

.detail-label {
    font-weight: bold;
    color: #555;
    font-size: 0.9em;
    margin-bottom: 5px;
}

.detail-value {
    color: #333;
    padding: 8px 12px;
    background: white;
    border-radius: 4px;
    border: 1px solid #e0e0e0;
    min-height: 20px;
}

.detail-value.empty {
    color: #999;
    font-style: italic;
}

.medical-history {
    grid-column: 1 / -1;
}

.medical-history .detail-value {
    min-height: 80px;
    white-space: pre-wrap;
    font-family: inherit;
}

/* Health Flags */
.health-flags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.health-flag {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: bold;
}

.health-flag.yes {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.health-flag.no {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

/* Action Styles */
.actions a {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 4px;
    text-decoration: none;
    color: white;
    margin-right: 5px;
}

.view {
    background-color: #007bff;
}

.delete {
    background-color: #dc3545;
}

/* Modal Styles */
#messageModal {
    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: 10% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 600px;
    border-radius: 5px;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: black;
}

.message-details p {
    margin: 10px 0;
}

.message-text {
    background-color: #f9f9f9;
    padding: 15px;
    border-radius: 5px;
    white-space: pre-wrap;
}

  body.inbox {
    background-color: #fff;
  }
  .message-block {
    position: relative;
    padding: 15px;
    margin-bottom: 20px;
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    overflow: hidden;
  }
  .tracking-canvas {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    background: transparent;
  }
  .message-content {
    position: relative;
    z-index: 1; /* above the canvas */
  }

/* Empty State Styles */
.no-clients {
    text-align: center;
    padding: 40px;
    color: #666;
}

.no-messages {
    text-align: center;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 5px;
}

/* Print Styles */
.print-warning {
    display: none;
}

.print-warning-row {
    display: none;
}

.no-print {
    white-space: nowrap;
}

@media print {
    .no-print {
        display: none !important;
    }
    
    .client-header {
        display: none;
    }
    
    body {
        font-size: 15px;
    }
    
    .admin-controls {
        display: none;
    }
    
    .print-warning-row {
        display: table-row;
    }
    
    .print-warning {
        display: block;
        color: red;
        font-weight: bold;
        font-size: 20px;
    }
    
    .message-block {
        display: none;
    }
}

small { font-size:8pt;}

.links {
  text-decoration: none;
  color: #9ad03e;
}

.links:hover {
  color: #17c5dd;
}

/* Responsive Design */
@media (max-width: 768px) {
    .detail-grid {
        grid-template-columns: 1fr;
    }
    
    .client-meta {
        flex-direction: column;
        gap: 5px;
    }
}