body {
    font-family: 'Arial', sans-serif;
    margin: 0;
    padding: 20px;
    background-color: #f5f5f5;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

h1 {
    color: #333;
    text-align: center;
}

.section {
    background: white;
    padding: 15px;  /* reduced from 20px */
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 20px;
    max-width: 1100px;  /* increased from 900px */
    margin-left: auto;
    margin-right: auto;
}

.section h2 {
    text-align: center;
    margin-bottom: 15px;  /* reduced from 20px */
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;  /* reduced from 15px */
    margin-bottom: 10px;  /* reduced from 20px */
}

.form-group {
    margin-bottom: 10px;  /* reduced from 15px */
}

label {
    display: block;
    margin-bottom: 3px;  /* reduced from 5px */
    color: #555;
}

input, select, textarea {
    width: 100%;
    padding: 6px;  /* reduced from 8px */
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
}

.button-group {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

button {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
}

.btn-primary {
    background-color: #4CAF50;
    color: white;
}

.btn-secondary {
    background-color: #f44336;
    color: white;
}

td .btn-secondary {
    padding: 6px 12px;
    font-size: 0.9em;
    min-width: 60px;
}

.btn-clear {
    background-color: #607d8b;
    color: white;
}

table {
    width: 100%;
    table-layout: fixed; /* Added to control column widths */
    border-collapse: collapse;
    margin-top: 20px;
}

th, td {
    padding: 12px 8px; /* Reduced horizontal padding */
    text-align: left;
    border-bottom: 1px solid #ddd;
}

th {
    background-color: #f8f9fa;
    color: #333;
}

tr:hover {
    background-color: #f5f5f5;
}

.status-badge {
    padding: 5px 10px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: bold;
}

.status-badge[onclick] {
    cursor: pointer;
}

.status-badge[onclick]:hover {
    opacity: 0.8;
}

.served {
    background-color: #4CAF50;
    color: white;
}

.pending {
    background-color: #ff9800;
    color: white;
}

.comment-cell {
    font-size: 0.85em;  /* decreased from 0.9em */
    color: #666;
    max-width: 300px;  /* increased from 200px */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.comment-cell:hover {
    white-space: normal;
    word-wrap: break-word;
}

/* Add specific column widths */
th:nth-child(1) { width: 18%; }  /* Original Name - decreased */
th:nth-child(2) { width: 18%; }  /* Brazilian Name - decreased */
th:nth-child(3) { width: 7%; }   /* Year - decreased */
th:nth-child(4) { width: 8%; }   /* Type - decreased */
th:nth-child(5) { width: 10%; }  /* Status - unchanged */
th:nth-child(6) { width: 22%; }  /* Comments - decreased */
th:nth-child(7) { width: 17%; }  /* Actions - increased significantly */

.footer {
    background-color: #333;
    color: white;
    padding: 20px 0;
    margin-top: 40px;
    position: relative;
    bottom: 0;
    width: 100%;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.footer p {
    margin: 5px 0;
}

.footer a {
    color: white;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.footer a:hover {
    text-decoration: underline;
}

.social-icon {
    width: 20px;
    height: 20px;
    vertical-align: middle;
}

.login-container {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-box {
    background: white;
    padding: 30px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.google-login-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: #4285f4;
    color: white;
    padding: 12px 24px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.2s;
}

.google-login-btn:hover {
    background: #357abd;
}

.google-login-btn img {
    width: 18px;
    height: 18px;
}

.user-header {
    background: white;
    padding: 10px 20px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

.logout-btn {
    padding: 8px 16px;
    background: #f44336;
    color: white;
    text-decoration: none;
    border-radius: 4px;
}

.header-links {
    display: flex;
    gap: 15px;
    align-items: center;
}

.nav-link {
    color: #4CAF50;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 4px;
    background: white;
    border: 1px solid #4CAF50;
}

.nav-link:hover {
    background: #4CAF50;
    color: white;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    z-index: 1000;
}

.modal-content {
    position: relative;
    background-color: #fefefe;
    margin: 15% auto;
    padding: 20px;
    border-radius: 8px;
    width: 80%;
    max-width: 500px;
}

#userEmail {
    font-weight: bold;
    color: #666;
}

/* Update the button group in table cells */
td .button-group {
    display: flex;
    gap: 8px;  /* increased from 5px */
    justify-content: flex-start;
    margin-right: 5px;  /* added margin to prevent bleeding */
}

td .button-group button {
    padding: 5px 8px;
    font-size: 0.85em;  /* decreased from 0.9em */
    min-width: 55px;  /* slightly decreased to fit better */
    white-space: nowrap;  /* prevent button text from wrapping */
}

td .btn-primary {
    background-color: #4CAF50;
    color: white;
}

.button-container {
    margin-bottom: 20px;
    display: flex;
    justify-content: flex-end;
}

.button-container .btn-primary {
    min-width: 120px;
}
