/* Avukat Paneli — frontend panel stilleri */
/* Tema-agnostik: kendi container'ı içinde scoped */

.ap-panel {
    max-width: 1100px;
    margin: 24px auto;
    padding: 24px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #1f2937;
    line-height: 1.55;
}

.ap-panel h2 {
    margin: 0 0 6px;
    font-size: 28px;
    font-weight: 600;
    color: #111827;
}

.ap-panel h3 {
    margin: 28px 0 12px;
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
    padding-bottom: 8px;
    border-bottom: 1px solid #e5e7eb;
}

.ap-panel p {
    margin: 0 0 12px;
}

.ap-muted { color: #6b7280; }
.ap-small { font-size: 13px; }

.ap-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e5e7eb;
    flex-wrap: wrap;
    gap: 12px;
}

.ap-user-bar {
    font-size: 14px;
    color: #6b7280;
    display: flex;
    align-items: center;
    gap: 12px;
}

.ap-user-bar a {
    color: #2563eb;
    text-decoration: none;
}

.ap-user-bar a:hover { text-decoration: underline; }

/* Login */
.ap-login {
    max-width: 420px;
}

.ap-login form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ap-login label {
    font-weight: 600;
    font-size: 14px;
    display: block;
    margin-bottom: 4px;
}

.ap-login input[type=text],
.ap-login input[type=password] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 15px;
    box-sizing: border-box;
}

.ap-login input[type=submit] {
    background: #2563eb;
    color: #fff;
    border: 0;
    padding: 10px 18px;
    border-radius: 6px;
    font-size: 15px;
    cursor: pointer;
    font-weight: 600;
}

.ap-login input[type=submit]:hover { background: #1d4ed8; }

/* Tablo */
.ap-table-wrap { overflow-x: auto; }

.ap-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 8px;
    background: #fff;
}

.ap-table th,
.ap-table td {
    text-align: left;
    padding: 12px 14px;
    border-bottom: 1px solid #e5e7eb;
    font-size: 14px;
    vertical-align: middle;
}

.ap-table th {
    background: #f9fafb;
    font-weight: 600;
    color: #4b5563;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.ap-table tr:hover td { background: #f9fafb; }

.ap-link {
    color: #2563eb;
    text-decoration: none;
    font-weight: 500;
}

.ap-link:hover { text-decoration: underline; }

.ap-table a strong { color: #1f2937; }

/* Durum badge'leri */
.ap-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    background: #e5e7eb;
    color: #374151;
}

.ap-badge-açık,
.ap-badge-acik { background: #dcfce7; color: #166534; }

.ap-badge-karar { background: #dbeafe; color: #1e40af; }

.ap-badge-temyiz,
.ap-badge-i̇stinaf,
.ap-badge-istinaf { background: #fef3c7; color: #92400e; }

.ap-badge-kapalı,
.ap-badge-kapali { background: #f3f4f6; color: #6b7280; }

.ap-warn-icon { color: #d97706; font-weight: bold; }

/* Detay */
.ap-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px 24px;
    background: #f9fafb;
    padding: 16px 20px;
    border-radius: 8px;
    margin: 16px 0;
}

.ap-detail-grid > div { font-size: 14px; }

.ap-content {
    background: #fff;
    padding: 16px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
}

/* Belge listesi */
.ap-belge-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.ap-belge-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    margin-bottom: 10px;
    background: #fff;
    transition: background 0.15s, border-color 0.15s;
    flex-wrap: wrap;
    gap: 8px;
}

.ap-belge-list li:hover {
    background: #f9fafb;
    border-color: #93c5fd;
}

.ap-belge-link {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: #1f2937;
    flex: 1;
    min-width: 0;
}

.ap-belge-title {
    font-weight: 600;
    font-size: 15px;
    color: #2563eb;
}

.ap-belge-link:hover .ap-belge-title { text-decoration: underline; }

.ap-belge-meta {
    font-size: 12px;
    color: #6b7280;
    margin-top: 2px;
}

.ap-belge-date {
    font-size: 12px;
    color: #9ca3af;
    white-space: nowrap;
}

/* Boş durum */
.ap-empty {
    text-align: center;
    padding: 40px 20px;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px dashed #d1d5db;
}

.ap-warning {
    background: #fef3c7;
    border-left: 4px solid #f59e0b;
    padding: 16px;
    border-radius: 4px;
}

/* Butonlar */
.ap-button {
    display: inline-block;
    padding: 10px 18px;
    background: #2563eb;
    color: #fff !important;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    margin-right: 8px;
}

.ap-button:hover { background: #1d4ed8; }

.ap-button-secondary {
    background: #fff;
    color: #2563eb !important;
    border: 1px solid #2563eb;
}

.ap-button-secondary:hover {
    background: #eff6ff;
}

/* Responsive — mobil için tabloyu kart düzenine çevir */
@media (max-width: 640px) {
    .ap-panel { padding: 16px; }
    .ap-panel h2 { font-size: 22px; }

    .ap-table thead { display: none; }

    .ap-table,
    .ap-table tbody,
    .ap-table tr,
    .ap-table td { display: block; width: 100%; box-sizing: border-box; }

    .ap-table tr {
        border: 1px solid #e5e7eb;
        border-radius: 8px;
        margin-bottom: 12px;
        padding: 8px;
        background: #fff;
    }

    .ap-table td {
        border: 0;
        border-bottom: 1px dashed #f3f4f6;
        padding: 8px 4px;
        display: flex;
        justify-content: space-between;
        align-items: center;
        text-align: right;
    }

    .ap-table td:last-child { border-bottom: 0; }

    .ap-table td:before {
        content: attr(data-label);
        font-weight: 600;
        font-size: 12px;
        color: #6b7280;
        text-transform: uppercase;
        letter-spacing: 0.04em;
        text-align: left;
        flex: 0 0 40%;
    }
}
