/* Base Styles */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Header */
header {
    background-color: #2c3e50;
    color: white;
    padding: 15px 0;
}

header h1 {
    margin: 0;
    display: inline-block;
}

header nav {
    display: inline-block;
    float: right;
}

header nav a {
    color: white;
    text-decoration: none;
    margin-left: 15px;
    padding: 5px 10px;
}

header nav a:hover {
    background-color: #34495e;
    border-radius: 3px;
}

/* Main Content */
main {
    padding: 20px 0;
}

/* Sidebar */
.sidebar {
    width: 200px;
    float: left;
    background-color: #34495e;
    color: white;
    min-height: calc(100vh - 100px);
    padding: 20px 0;
}

.sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar li a {
    display: block;
    padding: 10px 20px;
    color: white;
    text-decoration: none;
}

.sidebar li a:hover {
    background-color: #2c3e50;
}

/* Content Area */
.content {
    margin-left: 220px;
    padding: 20px;
    background-color: white;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

/* Forms */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group input[type="email"],
.form-group input[type="date"],
.form-group input[type="password"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
}

.form-row {
    display: flex;
    gap: 15px;
}

.form-row .form-group {
    flex: 1;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 8px 15px;
    background-color: #3498db;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    border: none;
    cursor: pointer;
}

.btn:hover {
    background-color: #2980b9;
}

.btn.primary {
    background-color: #2ecc71;
}

.btn.primary:hover {
    background-color: #27ae60;
}

.btn.cancel {
    background-color: #95a5a6;
}

.btn.cancel:hover {
    background-color: #7f8c8d;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

table th {
    background-color: #34495e;
    color: white;
    padding: 10px;
    text-align: left;
}

table td {
    padding: 10px;
    border-bottom: 1px solid #ddd;
}

table tr:hover {
    background-color: #f5f5f5;
}

/* Status Labels */
.status-paid {
    color: #2ecc71;
}

.status-overdue {
    color: #e74c3c;
}

.status-pending, .status-draft {
    color: #f39c12;
}

.status-sent {
    color: #3498db;
}

/* Messages */
.error {
    padding: 10px;
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    margin-bottom: 15px;
}

.success {
    padding: 10px;
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    border-radius: 4px;
    margin-bottom: 15px;
}

/* Auth Forms */
.auth-form {
    max-width: 500px;
    margin: 0 auto;
    background-color: white;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

.auth-form h2 {
    margin-top: 0;
    text-align: center;
}

/* Dashboard Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.stat-card {
    background-color: white;
    padding: 15px;
    border-radius: 5px;
    box-shadow: 0 0 5px rgba(0,0,0,0.1);
    text-align: center;
}

.stat-card h3 {
    margin-top: 0;
    color: #34495e;
}

.stat-card p {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 0;
    color: #2c3e50;
}

/* Invoice Styles */
.invoice-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
}

.invoice-info p {
    margin: 5px 0;
}

.client-info {
    margin-bottom: 20px;
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: 5px;
}

.invoice-items {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.invoice-items th {
    background-color: #34495e;
    color: white;
    padding: 10px;
    text-align: left;
}

.invoice-items td {
    padding: 10px;
    border-bottom: 1px solid #ddd;
}

.invoice-items tfoot td {
    font-weight: bold;
    border-top: 2px solid #333;
}

.text-right {
    text-align: right;
}

.invoice-notes {
    margin-top: 20px;
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: 5px;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        float: none;
        min-height: auto;
    }
    
    .content {
        margin-left: 0;
    }
    
    .form-row {
        flex-direction: column;
        gap: 0;
    }
}