/* Frontend stilleri */
.ksa-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.ksa-pedigree-form,
.ksa-breeder-form,
.ksa-search-form {
    background: white;
    border: 1px solid #e2e4e7;
    border-radius: 5px;
    padding: 30px;
    margin: 30px auto;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.ksa-pedigree-form h2,
.ksa-breeder-form h2,
.ksa-search-form h2 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #333;
    font-size: 24px;
    font-weight: 600;
    text-align: center;
}

.ksa-message {
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
    font-size: 14px;
}

.ksa-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.ksa-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.ksa-message.warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.ksa-message.info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.form-group label.required::after {
    content: " *";
    color: #dc3232;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="date"],
.form-group input[type="tel"],
.form-group input[type="number"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.4;
    color: #333;
    background: white;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #0073aa;
    box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.2);
    outline: none;
}

.form-group textarea {
    min-height: 100px;
    resize: vertical;
}

.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
}

.form-row .form-group {
    flex: 1;
    margin-bottom: 0;
}

.ksa-submit-btn {
    display: block;
    width: 100%;
    padding: 14px 20px;
    background: #0073aa;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
    text-align: center;
}

.ksa-submit-btn:hover {
    background: #005a87;
}

.ksa-submit-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.ksa-submit-btn.loading {
    position: relative;
    color: transparent;
}

.ksa-submit-btn.loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: ksa-spin 1s linear infinite;
}

@keyframes ksa-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Dashboard stilleri */
.ksa-dashboard,
.ksa-breeder-dashboard,
.ksa-owner-dashboard {
    background: white;
    border: 1px solid #e2e4e7;
    border-radius: 5px;
    padding: 30px;
    margin: 30px auto;
}

.ksa-dashboard h2,
.ksa-breeder-dashboard h2,
.ksa-owner-dashboard h2 {
    margin-top: 0;
    color: #333;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 15px;
    margin-bottom: 25px;
}

.breeder-info,
.owner-info {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 4px;
    margin-bottom: 30px;
    border-left: 4px solid #0073aa;
}

.breeder-info h3,
.owner-info h3 {
    margin-top: 0;
    color: #0073aa;
}

.breeder-info p,
.owner-info p {
    margin: 8px 0;
}

/* Tablo stilleri */
.ksa-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    background: white;
    border: 1px solid #e2e4e7;
}

.ksa-table th {
    background: #f8f9fa;
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #e2e4e7;
    font-size: 14px;
}

.ksa-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #e2e4e7;
    font-size: 14px;
}

.ksa-table tr:last-child td {
    border-bottom: none;
}

.ksa-table tr:hover {
    background: #f8f9fa;
}

.ksa-table .actions {
    white-space: nowrap;
}

.ksa-table .button {
    display: inline-block;
    padding: 6px 12px;
    background: #0073aa;
    color: white;
    text-decoration: none;
    border-radius: 3px;
    font-size: 13px;
    margin: 2px;
    border: none;
    cursor: pointer;
}

.ksa-table .button:hover {
    background: #005a87;
    color: white;
}

.ksa-table .button-small {
    padding: 4px 8px;
    font-size: 12px;
}

/* Arama sonuçları */
.search-result {
    background: white;
    border: 1px solid #e2e4e7;
    border-radius: 5px;
    padding: 25px;
    margin-top: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.search-result h3 {
    margin-top: 0;
    color: #333;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.dog-info p {
    margin: 10px 0;
    line-height: 1.6;
}

.dog-info strong {
    color: #333;
    min-width: 120px;
    display: inline-block;
}

.qr-code {
    text-align: center;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 4px;
    margin: 20px 0;
}

.qr-code img {
    max-width: 200px;
    height: auto;
}

/* Responsive tasarım */
@media (max-width: 768px) {
    .ksa-pedigree-form,
    .ksa-breeder-form,
    .ksa-search-form,
    .ksa-dashboard,
    .ksa-breeder-dashboard,
    .ksa-owner-dashboard {
        padding: 20px;
        margin: 15px auto;
    }
    
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .ksa-table {
        display: block;
        overflow-x: auto;
    }
    
    .ksa-table th,
    .ksa-table td {
        padding: 8px 10px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .ksa-pedigree-form h2,
    .ksa-breeder-form h2,
    .ksa-search-form h2 {
        font-size: 20px;
    }
    
    .form-group input[type="text"],
    .form-group input[type="email"],
    .form-group input[type="date"],
    .form-group select,
    .form-group textarea {
        padding: 10px;
    }
    
    .ksa-submit-btn {
        padding: 12px;
        font-size: 14px;
    }
}

/* Grid sistem */
.ksa-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.ksa-grid-item {
    background: white;
    border: 1px solid #e2e4e7;
    border-radius: 5px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* Kart stilleri */
.ksa-card {
    background: white;
    border: 1px solid #e2e4e7;
    border-radius: 5px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.ksa-card-header {
    border-bottom: 1px solid #e2e4e7;
    padding-bottom: 15px;
    margin-bottom: 15px;
}

.ksa-card-title {
    margin: 0;
    color: #333;
    font-size: 18px;
    font-weight: 600;
}

/* Alert mesajları */
.ksa-alert {
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
    font-size: 14px;
    position: relative;
}

.ksa-alert-dismissible {
    padding-right: 40px;
}

.ksa-alert-close {
    position: absolute;
    top: 50%;
    right: 15px;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 20px;
    color: inherit;
    opacity: 0.7;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.ksa-alert-close:hover {
    opacity: 1;
}

/* Badge stilleri */
.ksa-badge {
    display: inline-block;
    padding: 4px 8px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 3px;
}

.ksa-badge-primary {
    background: #0073aa;
    color: white;
}

.ksa-badge-success {
    background: #46b450;
    color: white;
}

.ksa-badge-warning {
    background: #ffb900;
    color: white;
}

.ksa-badge-danger {
    background: #dc3232;
    color: white;
}

.ksa-badge-info {
    background: #00a0d2;
    color: white;
}

/* Progress bar */
.ksa-progress {
    height: 10px;
    background: #e2e4e7;
    border-radius: 5px;
    overflow: hidden;
    margin: 10px 0;
}

.ksa-progress-bar {
    height: 100%;
    background: #0073aa;
    border-radius: 5px;
    transition: width 0.3s ease;
}

/* Tooltip */
.ksa-tooltip {
    position: relative;
    display: inline-block;
    cursor: help;
}

.ksa-tooltip .ksa-tooltip-text {
    visibility: hidden;
    width: 200px;
    background: #333;
    color: white;
    text-align: center;
    padding: 8px;
    border-radius: 4px;
    position: absolute;
    z-index: 1000;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 12px;
    font-weight: normal;
}

.ksa-tooltip:hover .ksa-tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* Loading overlay */
.ksa-loading {
    position: relative;
    min-height: 100px;
}

.ksa-loading::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.8);
    z-index: 10;
}

.ksa-loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #0073aa;
    border-radius: 50%;
    animation: ksa-spin 1s linear infinite;
    z-index: 11;
}