:root {
    --pastel-blue: #a8d5e2;
    --pastel-green: #bcead5;
    --pastel-pink: #f4c2c2;
    --pastel-yellow: #f8e1a6;
    --urgent-red: #b8ff4d;
    --warning-yellow: #ffc107;
    --default-white: #ffffff;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    height: 100%;
    font-family: sans-serif;
    background-color: #f0f0f0;
}

body {
    display: flex;
    flex-direction: column;
}

.header {
    height: 40px;
    background-color: #333;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 15px;
    font-size: 0.8em;
}

.header-buttons {
    display: flex;
    gap: 10px;
    align-items: center;
}

.print-btn, .clear-btn, .save-btn, .load-btn {
    background-color: #555;
    color: #fff;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9em;
    transition: background-color 0.3s;
}

.print-btn:hover {
    background-color: #777;
}

.clear-btn {
    background-color: #d32f2f;
}

.clear-btn:hover {
    background-color: #b71c1c;
}

.save-btn {
    background-color: #2e7d32;
}

.save-btn:hover {
    background-color: #1b5e20;
}

.load-btn {
    background-color: #1565c0;
}

.load-btn:hover {
    background-color: #0d47a1;
}

.container {
    flex-grow: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 10px;
    padding: 10px;
}

.quadrant {
    border-radius: 8px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease-in-out;
}

.quadrant[data-quadrant="1"] { background-color: var(--pastel-blue); }
.quadrant[data-quadrant="2"] { background-color: var(--pastel-green); }
.quadrant[data-quadrant="3"] { background-color: var(--pastel-pink); }
.quadrant[data-quadrant="4"] { background-color: var(--pastel-yellow); }

.quadrant:hover {
    transform: translateY(-5px);
}

.quadrant-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.header-buttons {
    display: flex;
    gap: 8px;
    align-items: center;
}

.quadrant h2 {
    font-size: 1.2em;
}

.add-btn, .config-btn {
    background-color: #333;
    color: #fff;
    border: none;
    padding: 8px 12px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.add-btn {
    font-size: 16px;
    font-weight: bold;
    width: 32px;
    height: 32px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.config-btn {
    padding: 6px 10px;
    font-size: 14px;
}

.add-btn:hover, .config-btn:hover {
    background-color: #555;
}

.total-value {
    font-size: 1.1em;
    font-weight: bold;
    margin-bottom: 10px;
    display: none; /* Por padrão oculto, será mostrado via JS quando total > 0 */
}

.post-it-container {
    flex-grow: 1;
    overflow-y: auto;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-content: flex-start;
    padding: 5px;
}

.post-it {
    width: 140px;
    min-height: 120px;
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
    cursor: grab;
    user-select: none;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
}

.post-it:hover .post-it-actions {
    opacity: 1;
}

.post-it-actions {
    position: absolute;
    top: 5px;
    right: 5px;
    display: flex;
    gap: 4px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.post-it-action-btn {
    width: 20px;
    height: 20px;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.edit-btn {
    background-color: #4CAF50;
    color: white;
}

.edit-btn:hover {
    background-color: #45a049;
}

.remove-btn {
    background-color: #f44336;
    color: white;
}

.remove-btn:hover {
    background-color: #da190b;
}

.post-it:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
}

.post-it.dragging {
    opacity: 0.7;
    cursor: grabbing;
    transform: rotate(5deg) scale(1.05);
    z-index: 1000;
}

.post-it.priority-normal { background-color: var(--default-white); }
.post-it.priority-high { background-color: #ffcccc; border: 2px solid #ff4d4d; }
.post-it.default { background-color: var(--default-white); }
.post-it.past-due { background-color: var(--urgent-red); }
.post-it.due-today { background-color: var(--warning-yellow); }

.post-it h3 {
    font-size: 0.85em;
    margin-bottom: 4px;
    line-height: 1.2;
    font-weight: bold;
}

.post-it p {
    font-size: 0.75em;
    margin-bottom: 3px;
    line-height: 1.1;
}

.post-it p:last-child {
    margin-bottom: 0;
}

.post-it .post-it-value {
    font-weight: bold;
    color: #2c5530;
}

.post-it .post-it-date {
    color: #666;
}

.post-it .post-it-obs {
    font-style: italic;
    color: #555;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: #fff;
    padding: 25px;
    border-radius: 8px;
    width: 90%;
    max-width: 450px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    position: relative;
}

.modal-content h2 {
    margin-bottom: 20px;
}

.modal-content label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.modal-content input, .modal-content textarea {
    width: 100%;
    padding: 8px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.modal-content button {
    width: 100%;
    padding: 10px;
    background-color: #333;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.close-btn {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    position: absolute;
    top: 10px;
    right: 15px;
}

.close-btn:hover, .close-btn:focus,
.config-close-btn:hover, .config-close-btn:focus {
    color: #000;
    text-decoration: none;
    cursor: pointer;
}

.config-close-btn {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    position: absolute;
    top: 10px;
    right: 15px;
}

/* Color options styling */
.color-options {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 15px;
}

.color-option {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    border: 3px solid transparent;
    transition: all 0.3s ease;
    position: relative;
}

.color-option:hover {
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.color-option.selected {
    border-color: #333;
    transform: scale(1.15);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.color-option.selected::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #333;
    font-weight: bold;
    font-size: 16px;
}

/* Priority options styling */
.priority-options {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
}

.priority-option {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: normal;
}

.priority-option input[type="radio"] {
    margin: 0;
    width: auto;
}

.priority-indicator {
    width: 20px;
    height: 20px;
    border-radius: 3px;
    border: 2px solid #ccc;
}

.priority-indicator.normal {
    background-color: #fff;
}

.priority-indicator.high {
    background-color: #ffcccc;
    border-color: #ff4d4d;
}

/* Print styles */
@media print {
    .header {
        background-color: #fff !important;
        color: #000 !important;
        border-bottom: 1px solid #333;
    }
    
    .header-buttons {
        display: none;
    }
    
    .config-btn {
        display: none;
    }
    
    .add-btn {
        display: none;
    }
    
    .post-it {
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3) !important;
    }
    
    .quadrant {
        break-inside: avoid;
    }
}