/* Global */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f4f6f8;
    color: #333;
    margin: 0;
    padding: 0;
}

#app {
    max-width: 960px;
    margin: 0 auto;
    padding: 15px;
}

/* Header */
header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 25px;
    border-bottom: 1px solid #ddd;
    padding-bottom: 10px;
}

header h1 {
    margin: 0;
    font-size: 26px;
    color: #2c3e50;
}

/* Menu Buttons */
.menu-buttons {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.menu-buttons button {
    background: #3498db;
    border: none;
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: 0.2s;
}

.menu-buttons button:hover {
    background: #2980b9;
}

.logout-form button {
    background: #e74c3c;
}

.logout-form button:hover {
    background: #c0392b;
}

/* Pages */
.page {
    display: block;
    margin-top: 20px;
}

.hidden {
    display: none;
}

/* Forms */
.form-group {
    margin-bottom: 12px;
}

input, textarea {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    box-sizing: border-box;
    font-size: 14px;
    transition: border 0.2s;
}

input:focus, textarea:focus {
    border-color: #3498db;
    outline: none;
}

textarea {
    resize: vertical;
}

/* Items */
#items div {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 10px;
}

#items input {
    flex: 1 1 150px;
}

#items button {
    background: #e67e22;
    border: none;
    color: white;
    padding: 5px 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: 0.2s;
}

#items button:hover {
    background: #d35400;
}

/* Buttons */
.add-btn, .save-btn {
    background: #2ecc71;
    border: none;
    color: white;
    padding: 10px 18px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 15px;
    margin-top: 10px;
    transition: 0.2s;
}

.add-btn:hover, .save-btn:hover {
    background: #27ae60;
}

/* Messages */
.msg {
    margin-top: 8px;
    color: #e74c3c;
    font-weight: 500;
}

/* Invoice / Address Cards */
.invoice-card, .address-card {
    background: white;
    padding: 12px 15px;
    margin: 8px 0;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.pdf-btn {
    text-decoration: none;
    color: #3498db;
    font-weight: 500;
}

.pdf-btn:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 600px) {
    header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .menu-buttons {
        width: 100%;
        justify-content: space-between;
    }
    #items div {
        flex-direction: column;
    }
    #items input {
        width: 100%;
    }
}
