/* General Styling */
body {
    font-family: 'Inter', sans-serif;
    background-color: #f3f4f6; /* gray-100 */
    color: #1f2937; /* gray-800 */
    margin: 0;
    line-height: 1.5;
}

.container {
    width: 100%;
    max-width: 1280px; /* Standard container width */
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

.hidden {
    display: none !important;
}

/* Header */
header {
    background-color: #ffffff;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    padding: 1rem 0;
}

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

.logo-area {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-img {
    height: 3rem;
    width: 3rem;
    border-radius: 9999px;
}

h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #111827;
    margin: 0;
}

header p {
    font-size: 0.875rem;
    color: #6b7280;
    margin: 0;
}

/* Main Content & Layout */
main {
    padding-top: 2rem;
    padding-bottom: 2rem;
}

.main-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

/* Card Styling */
.card {
    background-color: #ffffff;
    padding: 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.card-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-top: 0;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e5e7eb;
}

/* Form Styling */
form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.25rem;
}

.form-input {
    display: block;
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    box-sizing: border-box; /* Ensures padding doesn't affect width */
    font-family: inherit;
}


.form-input:focus {
    outline: 2px solid transparent;
    outline-offset: 2px;
    border-color: #4f46e5;
    box-shadow: 0 0 0 2px #a5b4fc;
}

/* Button Styling */
.btn {
    display: inline-flex;
    justify-content: center;
    padding: 0.5rem 1rem;
    border: 1px solid transparent;
    border-radius: 0.375rem;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    font-size: 0.875rem;
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-primary {
    background-color: #4f46e5; /* indigo-600 */
    color: #ffffff;
    width: 100%;
}
.btn-primary:hover {
    background-color: #4338ca; /* indigo-700 */
}

.btn-secondary {
    background-color: #ffffff;
    color: #374151;
    border-color: #d1d5db;
}
.btn-secondary:hover {
    background-color: #f9fafb; /* gray-50 */
}

.btn-blue {
    background-color: #3b82f6; /* blue-500 */
    color: #ffffff;
}
.btn-blue:hover {
    background-color: #2563eb; /* blue-600 */
}

.btn-red {
    background-color: #ef4444; /* red-500 */
    color: #ffffff;
}
.btn-red:hover {
    background-color: #dc2626; /* red-600 */
}

/* Complaint List */
#complaintList {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.complaint-card {
    background-color: #f9fafb; /* gray-50 */
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.complaint-card-content {
    flex-grow: 1;
    min-width: 0; /* Important for truncation */
}

.complaint-card-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.complaint-title {
    font-size: 1.125rem;
    font-weight: 700;
}

.complaint-title.truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.complaint-meta {
    font-size: 0.875rem;
    color: #6b7280;
}

.complaint-actions {
    flex-shrink: 0;
    display: flex;
    gap: 0.5rem;
}

/* Status Badge */
.status-badge {
    display: inline-flex;
    padding: 2px 8px;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.25;
    border-radius: 9999px;
}
.status-new {
    background-color: #fef3c7; /* yellow-100 */
    color: #92400e; /* yellow-800 */
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 2.5rem 0;
}
.empty-state-icon {
    margin: 0 auto;
    height: 3rem;
    width: 3rem;
    color: #9ca3af;
}
.empty-state h3 {
    margin-top: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #111827;
}
.empty-state p {
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: #6b7280;
}


/* Modal Styling */
.modal {
    position: fixed;
    inset: 0;
    z-index: 10;
    overflow-y: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.modal-backdrop {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.75);
}
.modal-panel {
    position: relative;
    background-color: #ffffff;
    border-radius: 0.5rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    overflow: hidden;
    width: 100%;
    max-width: 32rem; /* max-w-lg */
    text-align: left;
}
.modal-content {
    padding: 1.5rem;
}
.modal-header {
    display: flex;
    align-items: flex-start;
}
.modal-icon-wrapper {
    margin-right: 1rem;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 2.5rem;
    width: 2.5rem;
    border-radius: 9999px;
    background-color: #e0e7ff; /* indigo-100 */
}
.modal-icon {
    height: 1.5rem;
    width: 1.5rem;
    color: #4f46e5; /* indigo-600 */
}
.modal-text-content h3 {
    font-size: 1.125rem;
    line-height: 1.5;
    font-weight: 500;
    color: #111827;
    margin: 0;
}
.modal-details {
    margin-top: 1rem;
    font-size: 0.875rem;
    color: #4b5563;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.modal-details p {
    margin: 0;
}
.modal-complaint-body {
    border-top: 1px solid #e5e7eb;
    padding-top: 0.75rem;
    margin-top: 0.75rem;
}
.font-semibold { font-weight: 600; }
#modalContent { white-space: pre-wrap; }

.modal-footer {
    background-color: #f9fafb; /* gray-50 */
    padding: 0.75rem 1.5rem;
    text-align: right;
}

/* Toast Notification */
.toast {
    position: fixed;
    top: 1.25rem;
    right: 1.25rem;
    background-color: #22c55e; /* green-500 */
    color: #ffffff;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    opacity: 1;
    transition: opacity 0.3s ease-in-out;
}
.toast.opacity-0 {
    opacity: 0;
}

/* Responsive Layout */
@media (min-width: 1024px) {
    .main-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .form-column {
        grid-column: span 1 / span 1;
    }
    .list-column {
        grid-column: span 2 / span 2;
    }
    .complaint-card {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}