/* Main stylesheet for Contacts App */

* {
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    line-height: 1.6;
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    background: #f5f5f5;
    color: #333;
}

nav {
    background: #2c3e50;
    padding: 15px 20px;
    margin: -20px -20px 30px -20px;
    border-radius: 0 0 8px 8px;
}

nav a {
    color: white;
    text-decoration: none;
    margin-right: 20px;
    font-weight: 500;
}

nav a:hover {
    text-decoration: underline;
}

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

h1 {
    color: #2c3e50;
    margin-top: 0;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

th, td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

th {
    background: #2c3e50;
    color: white;
}

tr:hover {
    background: #f8f9fa;
}

.stat-box {
    display: inline-block;
    background: #3498db;
    color: white;
    padding: 20px 30px;
    border-radius: 8px;
    margin: 20px 0;
    text-align: center;
}

.stat-box .number {
    font-size: 2.5em;
    font-weight: bold;
}

.stat-box .label {
    font-size: 0.9em;
    opacity: 0.9;
}

.btn {
    display: inline-block;
    background: #2c3e50;
    color: white;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 4px;
    margin-top: 10px;
}

.btn:hover {
    background: #34495e;
}

footer {
    text-align: center;
    margin-top: 30px;
    color: #666;
    font-size: 0.9em;
}

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

/* Page header with title and action button */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.page-header h1 {
    margin: 0;
}

/* Button variants */
.btn {
    cursor: pointer;
    border: none;
    font-size: 14px;
}

.btn-secondary {
    background: #95a5a6;
}

.btn-secondary:hover {
    background: #7f8c8d;
}

/* Modal styles */
[x-cloak] {
    display: none !important;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal {
    background: white;
    border-radius: 8px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #ddd;
}

.modal-header h2 {
    margin: 0;
    color: #2c3e50;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
}

.modal-close:hover {
    color: #333;
}

/* Form styles */
.modal form {
    padding: 20px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #333;
}

.form-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.form-group input:focus {
    outline: none;
    border-color: #3498db;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}
