* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: #f5f5f5;
}

body {
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 30px;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    border-bottom: 2px solid #2d2846;
    padding-bottom: 20px;
}

.header h1 {
    margin: 0;
    color: #2d2846;
    font-size: 32px;
}

.new-invoice-btn {
    background: #5cb85c;
    color: white;
    border: none;
    padding: 10px 18px;
    border-radius: 4px;
    text-decoration: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: background 0.3s;
}

.new-invoice-btn:hover {
    background: #4cae4c;
}

.controls {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.search-box {
    flex: 1;
    min-width: 250px;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.sort-select {
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    background: white;
    cursor: pointer;
}

.message {
    padding: 12px;
    margin-bottom: 20px;
    border-radius: 4px;
    display: none;
}

.message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    display: block;
}

.message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    display: block;
}

.invoice-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.invoice-table thead {
    background: #2d2846;
    color: white;
}

.invoice-table th {
    padding: 12px;
    text-align: left;
    font-weight: bold;
    border-bottom: 2px solid #2d2846;
}

.invoice-table td {
    padding: 12px;
    border-bottom: 1px solid #ddd;
}

.invoice-table tbody tr:hover {
    background: #f9f9f9;
}

.invoice-table tbody tr:nth-child(even) {
    background: #fafafa;
}

.action-buttons {
    display: flex;
    gap: 8px;
}

.view-btn {
    background: #0275d8;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: background 0.3s;
}

.view-btn:hover {
    background: #025aa5;
}

.delete-btn {
    background: #d9534f;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: background 0.3s;
}

.delete-btn:hover {
    background: #c9302c;
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    display: none;
}

.empty-state.show {
    display: block;
}

.empty-state a {
    color: #0275d8;
    text-decoration: none;
    font-weight: bold;
}

.empty-state a:hover {
    text-decoration: underline;
}

@media (max-width: 768px) {
    .container {
        padding: 15px;
    }

    .header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }

    .controls {
        flex-direction: column;
    }

    .search-box {
        min-width: 100%;
    }

    .sort-select {
        min-width: 100%;
    }

    .invoice-table {
        font-size: 12px;
    }

    .invoice-table th,
    .invoice-table td {
        padding: 8px;
    }

    .action-buttons {
        flex-direction: column;
    }

    .view-btn,
    .delete-btn {
        width: 100%;
    }
}
