/* === PALETA PERSONALIZADA ===*/
:root {
  --dark: #260F01;
  --brown: #583619;
  --tan: #AC815B;
  --beige: #DBB593;
  --cream: #EADFD5;
  --light: #F2F2F2;
  --black: #000000;
  --white: #FFFFFF;
  --gray: #666666;
  --light-gray: #999999;
}

/* Estilos generales */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;

}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--dark);
    background-color: var(--cream);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Formularios de autenticación */
.auth-form {
    max-width: 400px;
    margin: 50px auto;
    background: var(--white);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.auth-form h2 {
    text-align: center;
    margin-bottom: 30px;
    color: var(--brown);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: var(--dark);
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--beige);
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.3s;
    background-color: var(--cream);
}

.form-group input:focus {
    outline: none;
    border-color: var(--tan);
    box-shadow: 0 0 0 2px rgba(172, 129, 91, 0.2);
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: var(--gray);
    font-size: 14px;
}

/* Botones */
.btn {
    display: inline-block;
    padding: 12px 24px;
    background-color: var(--tan);
    color: var(--white);
    text-decoration: none;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
}

.btn:hover {
    background-color: var(--brown);
}

.btn-primary {
    background-color: var(--tan);
    width: 100%;
}

.btn-secondary {
    background-color: var(--beige);
    color: var(--dark);
}

.btn-secondary:hover {
    background-color: var(--brown);
    color: var(--white);
}

.btn-disabled {
    background-color: var(--light-gray) !important;
    cursor: not-allowed !important;
}

.btn-disabled:hover {
    background-color: var(--light-gray) !important;
}

/* Alertas */
.alert {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert p {
    margin: 0;
}

/* Alertas mejoradas con iconos */
.alert::before {
    margin-right: 8px;
}

.alert-success::before {
    content: "✅";
}

.alert-error::before {
    content: "❌";
}

/* Enlaces de autenticación */
.auth-link {
    text-align: center;
    margin-top: 20px;
}

.auth-link a {
    color: var(--tan);
    text-decoration: none;
}

.auth-link a:hover {
    text-decoration: underline;
    color: var(--brown);
}

/* Dashboard */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--white);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.dashboard-header h1 {
    color: var(--brown);
    margin: 0;
}

.dashboard-content {
    display: grid;
    gap: 30px;
}

.user-info {
    background: var(--white);
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.user-info h2 {
    color: var(--brown);
    margin-bottom: 20px;
}

.user-info p {
    margin-bottom: 10px;
    font-size: 16px;
    color: var(--dark);
}

.dashboard-actions {
    background: var(--white);
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.dashboard-actions h2 {
    color: var(--brown);
    margin-bottom: 20px;
}

.action-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.card {
    background: var(--cream);
    padding: 20px;
    border-radius: 6px;
    border: 1px solid var(--beige);
    text-align: center;
}

.card h3 {
    color: var(--brown);
    margin-bottom: 10px;
}

.card p {
    color: var(--gray);
    margin-bottom: 15px;
}

.card .btn {
    width: auto;
}

/* Perfil principal */
.profile-content {
    max-width: 800px;
    margin: 0 auto;
}

.profile-card {
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    margin-bottom: 30px;
}

.profile-header {
    background: linear-gradient(135deg, var(--tan), var(--brown));
    padding: 30px;
    display: flex;
    align-items: center;
    gap: 25px;
    color: var(--white);
}

.profile-avatar {
    flex-shrink: 0;
}

.avatar-placeholder {
    width: 80px;
    height: 80px;
    background: var(--white);
    color: var(--tan);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: bold;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.profile-info h2 {
    margin: 0 0 8px 0;
    font-size: 28px;
    font-weight: 600;
}

.profile-email {
    font-size: 16px;
    opacity: 0.9;
    margin: 0 0 5px 0;
}

.profile-joined {
    font-size: 14px;
    opacity: 0.8;
    margin: 0;
}

.profile-details {
    padding: 30px;
}

.profile-details h3 {
    color: var(--brown);
    margin-bottom: 20px;
    font-size: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--beige);
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.detail-item label {
    font-weight: 600;
    color: var(--dark);
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-item span {
    font-size: 16px;
    color: var(--brown);
    padding: 8px 0;
}

.status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status.active {
    background-color: #d4edda;
    color: #155724;
}

.status.inactive {
    background-color: #f8d7da;
    color: #721c24;
}

.profile-actions {
    padding: 30px;
    background: var(--cream);
    display: flex;
    gap: 15px;
    justify-content: center;
}

.profile-actions .btn {
    width: auto;
    min-width: 160px;
}

/* === EDITAR PERFIL === */

.edit-profile-content {
    max-width: 700px;
    margin: 0 auto;
    display: grid;
    gap: 30px;
}

.edit-form-card {
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    padding: 30px;
}

.form-section {
    margin-bottom: 30px;
}

.form-section h3 {
    color: var(--brown);
    margin-bottom: 20px;
    font-size: 18px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--beige);
}

.info-display {
    background: var(--cream);
    padding: 20px;
    border-radius: 8px;
    border: 1px solid var(--beige);
}

.info-display p {
    margin-bottom: 10px;
    font-size: 16px;
    color: var(--dark);
}

.info-display p:last-child {
    margin-bottom: 0;
}

.form-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--beige);
}

.form-actions .btn {
    width: auto;
    min-width: 140px;
}

.additional-actions {
    display: grid;
    gap: 20px;
}

.action-card {
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    padding: 25px;
    text-align: center;
}

.action-card h4 {
    color: var(--brown);
    margin-bottom: 10px;
    font-size: 18px;
}

.action-card p {
    color: var(--gray);
    margin-bottom: 20px;
    line-height: 1.6;
}

/* === CAMBIAR CONTRASEÑA === */

.password-change-content {
    max-width: 600px;
    margin: 0 auto;
    display: grid;
    gap: 30px;
}

.password-form-card {
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    padding: 30px;
}

.security-notice {
    background: linear-gradient(135deg, var(--tan), var(--brown));
    color: var(--white);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.notice-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.notice-text h3 {
    margin: 0 0 8px 0;
    font-size: 18px;
}

.notice-text p {
    margin: 0;
    opacity: 0.9;
    line-height: 1.5;
}

.password-requirements {
    background: var(--cream);
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
    border: 1px solid var(--beige);
}

.password-requirements h4 {
    color: var(--brown);
    margin-bottom: 15px;
    font-size: 16px;
}

.password-requirements ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.password-requirements li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    font-size: 14px;
}

.requirement {
    color: #e74c3c;
}

.requirement-met {
    color: #27ae60;
}

.req-icon {
    font-size: 16px;
    flex-shrink: 0;
}

.security-tips {
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    padding: 25px;
}

.security-tips h4 {
    color: var(--brown);
    margin-bottom: 15px;
    font-size: 18px;
}

.security-tips ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.security-tips li {
    padding: 8px 0;
    color: var(--dark);
    line-height: 1.5;
    position: relative;
    padding-left: 20px;
}

.security-tips li::before {
    content: "•";
    color: var(--tan);
    position: absolute;
    left: 0;
    font-size: 18px;
}

/* Modern Sidebar Styles */
.sidebar {
    width: 280px;
    height: 100vh;
    background: var(--dark);
    border-right: 1px solid rgba(172, 129, 91, 0.2);
    display: flex;
    flex-direction: column;
    position: fixed;
    left: 0;
    top: 0;
    z-index: 1000;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(20px);
    box-shadow: 0 20px 25px -5px rgba(50, 34, 18, 0.15), 0 10px 10px -5px rgba(50, 34, 18, 0.08);
}

/* Header */
.sidebar-header {
    padding: 24px 20px;
    border-bottom: 1px solid rgba(234, 223, 213, 0.15);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    width: 240px;
    height: 240px;
    background: var(--light);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--dark);
    font-size: 18px;
    box-shadow: 0 4px 12px rgba(172, 129, 91, 0.3);
}

.site-title {
    color: var(--cream);
    font-size: 20px;
    font-weight: 700;
    margin: 0;
    letter-spacing: -0.025em;
}

/* User Card */
.user-card {
    padding: 20px;
    margin: 0 16px 24px;
    background: rgba(234, 223, 213, 0.1);
    border: 1px solid rgba(234, 223, 213, 0.15);
    border-radius: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    backdrop-filter: blur(10px);
}

.action-btn {
    width: 28px;
    height: 28px;
    border: none;
    background: rgba(234, 223, 213, 0.15);
    color: rgba(234, 223, 213, 0.8);
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.action-btn:hover {
    background: var(--tan);
    color: var(--dark);
}

/* Navigation */
.sidebar-nav {
    flex: 1;
    padding: 0 16px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(234, 223, 213, 0.3) transparent;
}

.sidebar-nav::-webkit-scrollbar {
    width: 4px;
}

.sidebar-nav::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(234, 223, 213, 0.3);
    border-radius: 2px;
}

.nav-section {
    margin-bottom: 32px;
}

.nav-title {
    color: rgba(234, 223, 213, 0.6);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0 0 12px 16px;
}

.nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-item {
    margin-bottom: 4px;
    position: relative;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    color: rgba(234, 223, 213, 0.8);
    text-decoration: none;
    border-radius: 12px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.nav-link:hover {
    background: rgba(234, 223, 213, 0.1);
    color: var(--tan);
    transform: translateX(4px);
}

.nav-item.active .nav-link {
    background: rgba(172, 129, 91, 0.15);
    color: var(--tan);
    border: 1px solid rgba(172, 129, 91, 0.3);
    box-shadow: 0 2px 8px rgba(172, 129, 91, 0.2);
}

.nav-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    font-size: 16px;
}

.nav-text {
    flex: 1;
    font-weight: 500;
    font-size: 14px;
}

.nav-arrow {
    margin-left: auto;
    transition: transform 0.2s ease;
    font-size: 12px;
    opacity: 0.7;
}

.nav-item.expanded .nav-arrow {
    transform: rotate(90deg);
}

.nav-indicator {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 0;
    background: linear-gradient(135deg, var(--tan), var(--brown));
    border-radius: 0 2px 2px 0;
    transition: height 0.2s ease;
}

.nav-item.active .nav-indicator {
    height: 20px;
}

/* Submenu */
.submenu {
    list-style: none;
    padding: 0;
    margin: 8px 0 0 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-item.expanded .submenu {
    max-height: 200px;
}

.submenu-item {
    margin-bottom: 2px;
}

.submenu-link {
    display: flex;
    align-items: center;
    padding: 8px 16px 8px 48px;
    color: rgba(234, 223, 213, 0.7);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s ease;
    font-size: 13px;
}

.submenu-link:hover {
    background: rgba(234, 223, 213, 0.08);
    color: var(--tan);
    transform: translateX(4px);
}

.submenu-item.active .submenu-link {
    background: rgba(172, 129, 91, 0.1);
    color: var(--tan);
}

.submenu-icon {
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 8px;
    font-size: 12px;
}

.submenu-text {
    font-weight: 500;
}

/* Footer */
.sidebar-footer {
    padding: 20px;
    border-top: 1px solid rgba(234, 223, 213, 0.15);
    margin-top: auto;
}

.logout-section {
    margin-bottom: 16px;
}

.logout-btn {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    color: rgba(234, 223, 213, 0.8);
    text-decoration: none;
    border-radius: 12px;
    transition: all 0.2s ease;
    border: 1px solid rgba(88, 54, 25, 0.3);
    background: rgba(88, 54, 25, 0.1);
}

.logout-btn:hover {
    background: var(--brown);
    color: var(--cream);
    border-color: var(--brown);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(88, 54, 25, 0.3);
}

.logout-icon {
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
    font-size: 14px;
}

.logout-text {
    font-weight: 500;
    font-size: 14px;
}

.footer-info {
    text-align: center;
}

.copyright {
    color: rgba(234, 223, 213, 0.5);
    font-size: 11px;
    margin: 0 0 4px 0;
}

.version {
    color: rgba(234, 223, 213, 0.4);
    font-size: 10px;
    margin: 0;
    font-weight: 500;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
    }
}

/* Animation for submenu toggle */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.nav-item.expanded .submenu {
    animation: slideDown 0.3s ease;
}

/* === vista cabras === */
  .cabras-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
            gap: 20px;
            margin: 20px 0;
        }

        .cabra-card {
            background: white;
            border-radius: 10px;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
            overflow: hidden;
            transition: transform 0.2s;
        }

        .cabra-card:hover {
            transform: translateY(-5px);
        }

        .cabra-photo {
            height: 200px;
            background: #f5f5f5;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .cabra-image {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }

        .no-photo {
            font-size: 60px;
            color: #ccc;
        }

        .cabra-info {
            padding: 15px;
        }

        .cabra-info h3 {
            margin: 0 0 10px 0;
            color: #333;
        }

        .sex-badge {
            display: inline-block;
            padding: 4px 8px;
            border-radius: 20px;
            font-size: 0.8em;
            font-weight: bold;
        }

        .sex-badge.macho {
            background: #e3f2fd;
            color: #1976d2;
        }

        .sex-badge.hembra {
            background: #fce4ec;
            color: #c2185b;
        }

        .status-badge {
            display: inline-block;
            padding: 4px 8px;
            border-radius: 4px;
            font-size: 0.8em;
            font-weight: bold;
        }

        .status-badge.activa {
            background: #e8f5e8;
            color: #2e7d32;
        }

        .status-badge.inactiva {
            background: #ffebee;
            color: #d32f2f;
        }

        .cabra-actions {
            padding: 15px;
            background: #f9f9f9;
            display: flex;
            gap: 10px;
            justify-content: space-between;
        }

        .actions-bar {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin: 20px 0;
        }

        .search-form {
            display: flex;
            gap: 10px;
        }

        .search-form input {
            padding: 8px 12px;
            border: 1px solid #ddd;
            border-radius: 4px;
        }

        .stats-summary {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
            gap: 20px;
            margin: 20px 0;
        }

        .stat-card {
            background: white;
            padding: 20px;
            border-radius: 8px;
            text-align: center;
            box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
        }

        .stat-card h3 {
            margin: 0;
            font-size: 2em;
            color: #4CAF50;
        }

        .empty-state {
            text-align: center;
            padding: 60px 20px;
            background: white;
            border-radius: 10px;
            grid-column: 1 / -1;
        }

        .pagination {
            display: flex;
            justify-content: center;
            gap: 10px;
            margin: 30px 0;
        }

        .pagination .current {
            background: #4CAF50;
            color: white;
        }


/* === estilos editar vabras === */


.form-container {

 
   
  
    background: var(--white);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.cabra-form {
  padding: 30px;
}

.form-sections {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.form-section {
  border: 1px solid var(--light-gray);
  border-radius: 8px;
  padding: 20px;
  background: var(--light);
}

.form-section h3 {
  margin: 0 0 20px 0;
  color: var(--gray);
  font-size: 1.2em;
  border-bottom: 2px solid var(--tan);
  padding-bottom: 10px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
  color: var(--brown);
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--beige);
  border-radius: 4px;
  font-size: 14px;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--tan);
  box-shadow: 0 0 5px rgba(172, 129, 91, 0.3);
}

.form-help {
  display: block;
  margin-top: 5px;
  color: var(--gray);
  font-size: 0.9em;
}

.form-actions {
  display: flex;
  gap: 15px;
  justify-content: center;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid var(--light-gray);
}

@media (max-width: 768px) {
  .form-row {
    grid-template-columns: 1fr;
  }

  .form-container {
    margin: 10px;
  }

  .cabra-form {
    padding: 20px;
  }
}











/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }

    .auth-form {
        margin: 20px auto;
        padding: 20px;
    }

    .dashboard-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .action-cards {
        grid-template-columns: 1fr;
    }

    .profile-header {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }

    .detail-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .form-actions {
        flex-direction: column;
    }

    .form-actions .btn {
        width: 100%;
    }

    .profile-actions {
        flex-direction: column;
    }

    .profile-actions .btn {
        width: 100%;
    }

    .security-notice {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
}



