/* Barcha elementlar uchun umumiy sozlamalar */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f0f2f5;
    overflow: hidden; /* Sahifa skrollini yo'qotish */
}

.container {
    display: flex;
    height: 100vh;
    width: 100vw;
}

/* ---------------- Asboblar paneli (Sidebar) ---------------- */
.toolbar {
    width: 260px;
    background-color: #ffffff;
    border-right: 1px solid #e0e0e0;
    display: flex;
    flex-direction: column;
    padding: 25px 15px;
    box-shadow: 2px 0 10px rgba(0,0,0,0.05);
    z-index: 10;
}

.logo h2 {
    font-size: 22px;
    color: #2c3e50;
    margin-bottom: 30px;
    text-align: center;
}

.tools, .actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.divider {
    border: 0;
    height: 1px;
    background-color: #eeeeee;
    margin: 10px 0;
}

.actions {
    margin-top: auto; /* Tugmalarni pastki qismga itarish */
    border-top: 1px solid #eeeeee;
    padding-top: 20px;
}

/* Tugmalar dizayni */
button {
    padding: 12px 15px;
    border-radius: 8px;
    background-color: #f8f9fa;
    color: #333333;
    font-size: 14px;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    display: flex;
    align-items: center;
    gap: 10px;
}

button:hover {
    background-color: #e9ecef;
}

/* Faol asbob dizayni */
.tool-btn.active {
    background-color: #e7f1ff;
    color: #0d6efd;
    border-color: #b6d4fe;
}

/* O'chirish tugmasi */
.tool-btn.danger {
    color: #dc3545;
}

.tool-btn.danger:hover {
    background-color: #ffe6e6;
    border-color: #ffcccc;
}

/* Saqlash tugmalari */
.action-btn {
    background-color: #0d6efd;
    color: white;
    justify-content: center;
}

.action-btn:hover {
    background-color: #0b5ed7;
}

#btn-export {
    background-color: #198754;
}

#btn-export:hover {
    background-color: #157347;
}

/* ---------------- Chizma maydoni (Canvas) ---------------- */
.canvas-wrapper {
    flex: 1;
    background-color: #fafafa;
    
    /* Millimetr qog'oz uslubidagi katakli fon (har bir katak 20px) */
    background-image: 
        linear-gradient(to right, #e8e8e8 1px, transparent 1px),
        linear-gradient(to bottom, #e8e8e8 1px, transparent 1px);
    background-size: 20px 20px;
    
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: auto;
}

/* Fabric.js tomonidan yaratiladigan wrapper uchun */
.canvas-container {
    margin: 40px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    background-color: transparent; /* Orqa fon kataklari ko'rinishi uchun */
}