@font-face {
    font-family: 'Speda';
    src: url('fonts/Speda.ttf');
}

* {
    box-sizing: border-box;
}

body {
    background-color: #f8f9fa;
    font-family: 'Speda', Tahoma, sans-serif;
    margin: 0;
    padding: 0;
    color: #333;
}

/* بەشی سەرەکی ناڤبار */
.dashboard-nav {
    display: flex;
    justify-content: center;
    background: #2c3e50;
    padding: 12px;
    gap: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.nav-btn {
    padding: 10px 25px;
    background: #34495e;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-family: 'Speda';
    font-size: 15px;
    transition: all 0.3s ease;
}

.nav-btn:hover {
    background: #1abc9c;
    color: white;
}

.nav-btn.active {
    background: #1abc9c;
    color: white;
    font-weight: bold;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* کۆنترۆڵەکان */
.controls {
    text-align: center;
    padding: 20px;
    background-color: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 20px;
}

.controls button {
    padding: 11px 35px;
    font-size: 15px;
    cursor: pointer;
    color: white;
    border: none;
    border-radius: 6px;
    margin: 5px;
    font-family: 'Speda';
    font-weight: bold;
    transition: opacity 0.2s;
}

.controls button:hover {
    opacity: 0.9;
}

/* کینتێنەری چاپ و لاپەڕە لەگەڵ چوارچێوەی کامل */
.print-container {
    background-color: white;
    width: 210mm;
    height: 297mm;
    margin: 20px auto;
    padding: 15mm 20mm;
    position: relative;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    /* دروستکردنی چوارچێوەی کامل بۆ دەوری پەرەکە */
    border: 3px double #000000;
    outline: 1px solid #000000;
    outline-offset: -6px;
}
/* ڕاستکردنەوەی لۆگۆی وۆتەرمارک بە ڕاستی و بێ خواربوون */
.watermark {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%); /* خولانەوەی لادرا بۆ ئەوەی ڕاست بێت */
    width: 420px;
    height: 420px;
    background: url('icon/nazcity.png') no-repeat center;
    background-size: contain;
    opacity: 0.06; /* ڕووناکی گونجاو بۆ ئەوەی نەبێتە ڕێگر لە خوێندنەوەی دەقەکە */
    z-index: 0;
    pointer-events: none;
}

/* هێدەر و ڕووکاری فۆرم */
.header-box {
    border: 2px solid #000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    margin-bottom: 15px;
    z-index: 1;
}

.header-right, .header-left {
    width: 42%;
    font-weight: bold;
    font-size: 12px;
    line-height: 1.6;
    text-align: center;
}

.header-left {
    direction: ltr;
}

.header-logo img {
    height: 80px;
}

.info-box {
    border: 1px solid #000;
    display: flex;
    justify-content: space-between;
    padding: 8px 20px;
    margin-bottom: 25px;
    font-weight: bold;
    z-index: 1;
}

.content-body {
    flex-grow: 1;
    z-index: 1;
}

/* ڕێکخستنی بەشی بابەت لە سەرەوە */
.subject {
    text-align: center;
    font-weight: bold;
    font-size: 22px;
    margin-bottom: 20px;
  
}

/* ڕێکخستنی بەشی بۆ لە خوارەوە */
.address-to {
    font-weight: bold;
    font-size: 18px;
    margin-bottom: 25px;
    text-align: center; /* هێنراوەتە ناوەڕاست */
}

select {
    font-family: 'Speda';
    padding: 4px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    font-weight: bold;
    font-size: 16px;
    background-color: #f8fafc;
}

.letter-text {
    line-height: 1.9;
    text-align: justify;
    font-size: 13px;
}

.regards {
    text-align: center;
    margin-top: 25px;
    margin-bottom: 25px;
    font-weight: bold;
    font-size: 17px;
}

.signature-section {
    margin-top: 30px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.sig-row {
    margin-bottom: 15px;
    font-weight: bold;
}

.dot-line {
    border-bottom: 1px dashed #333;
    padding: 0 5px;
    color: #0000ff;
    outline: none;
}

.admin-sig {
    text-align: center;
    font-weight: bold;
    min-width: 220px;
    line-height: 1.5;
}

.cc-section {
    margin-top: 40px;
	font-weight: bold;
    font-size: 11px;
    line-height: 1;
    border-top: 1px dashed #ccc;
    padding-top: 10px;
}

.footer-box {
    border-top: 2px solid #000;
    text-align: center;
    padding-top: 19px;
    font-size: 10px;
    margin-top: auto; 
    font-weight: bold;
    z-index: 1;
}

.highlight-red {
    color: red;
    font-weight: bold;
}

/* بەشی خشتەکان لە داشبۆرد */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    direction: rtl;
    background: white;
    border-radius: 6px;
    overflow: hidden;
}

table, th, td {
    border: 1px solid #e2e8f0;
    text-align: center;
    padding: 12px 10px;
    font-size: 14px;
}

th {
    background-color: #f1f5f9;
    color: #334155;
    font-weight: bold;
}

tr:hover {
    background-color: #f8fafc;
}

.badge-building {
    background: #3498db;
    color: white;
    padding: 3px 10px;
    border-radius: 4px;
    font-weight: bold;
}

.badge-count {
    background: #2ecc71;
    color: white;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 12px;
}

.delete-btn-single {
    background-color: #e74c3c;
    color: white;
    border: none;
    padding: 5px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-family: 'Speda';
    font-size: 12px;
    transition: background 0.2s;
}

.delete-btn-single:hover {
    background-color: #c0392b;
}

/* ڕێکخستنی تایبەت بە چاپکردن (Print Optimization) */
@media print {
    @page { 
        size: A4; 
        margin: 0; 
    }
    body { 
        background: none; 
        -webkit-print-color-adjust: exact;
    }
    .dashboard-nav, .controls, #data-section, .delete-btn-single { 
        display: none !important; 
    }
    .tab-content.active { 
        display: block !important; 
    }
    .print-container { 
        box-shadow: none; 
        margin: 0; 
        padding: 15mm 20mm;
        width: 210mm; 
        height: 297mm; 
        /* هێشتنەوەی چوارچێوەکە لە کاتی چاپدا */
        border: 3px double #000000 !important;
        outline: 1px solid #000000 !important;
        outline-offset: -6px !important;
    }
    .dot-line { 
        border-bottom: none; 
        color: black; 
    }
    #auto-doc-id { 
        color: black !important; 
    }
    .highlight-red { 
        color: red !important; 
    }
    select { 
        border: none; 
        -webkit-appearance: none; 
        -moz-appearance: none; 
        appearance: none; 
        background: transparent; 
        font-family: 'Speda'; 
        font-size: inherit; 
        font-weight: bold;
        color: black;
        padding: 0;
    }
}