/* Stile principale per Password Manager */

:root {
    --primary-color: #4e73df;
    --secondary-color: #858796;
    --success-color: #1cc88a;
    --info-color: #36b9cc;
    --warning-color: #f6c23e;
    --danger-color: #e74a3b;
    --light-color: #f8f9fa;
    --dark-color: #5a5c69;
}

body {
    font-family: 'Nunito', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #f8f9fa;
}

.wrapper {
    display: flex;
}

/* Sidebar */
.sidebar {
    min-height: 100vh;
    width: 225px;
    background-color: var(--primary-color);
    background-image: linear-gradient(180deg, #4e73df 10%, #224abe 100%);
    color: white;
    position: fixed;
    z-index: 1;
    transition: all 0.3s;
}

.sidebar-brand {
    height: 4.375rem;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 800;
    padding: 1.5rem 1rem;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.05rem;
    z-index: 1;
}

.sidebar-brand a {
    color: white;
    text-decoration: none;
}

.sidebar-divider {
    margin: 0 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.sidebar .nav-item {
    position: relative;
}

.sidebar .nav-link {
    display: block;
    width: 100%;
    text-align: left;
    padding: 0.75rem 1rem;
    color: rgba(255, 255, 255, 0.8);
}

.sidebar .nav-link:hover {
    color: white;
}

.sidebar .nav-link i {
    margin-right: 0.25rem;
}

.sidebar .nav-link.active {
    color: white;
    font-weight: 600;
}

/* Content Area */
.content {
    flex: 1;
    margin-left: 225px;
    padding: 1.5rem;
}

.topbar {
    height: 4.375rem;
    background-color: white;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1rem;
    margin-bottom: 1.5rem;
}

/* Cards */
.card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    word-wrap: break-word;
    background-color: #fff;
    background-clip: border-box;
    border: 1px solid #e3e6f0;
    border-radius: 0.35rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15);
}

.card-header {
    background-color: #f8f9fc;
    border-bottom: 1px solid #e3e6f0;
    padding: 0.75rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-body {
    flex: 1 1 auto;
    padding: 1.25rem;
}

/* Tables */
.table-responsive {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.dataTable {
    width: 100%;
    margin-bottom: 1rem;
    color: #858796;
}

.dataTable th,
.dataTable td {
    padding: 0.75rem;
    vertical-align: top;
    border-top: 1px solid #e3e6f0;
}

.dataTable thead th {
    vertical-align: bottom;
    border-bottom: 2px solid #e3e6f0;
    background-color: #f8f9fc;
}

.dataTable tbody + tbody {
    border-top: 2px solid #e3e6f0;
}

/* Buttons */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: #2e59d9;
    border-color: #2653d4;
}

.btn-success {
    background-color: var(--success-color);
    border-color: var(--success-color);
}

.btn-danger {
    background-color: var(--danger-color);
    border-color: var(--danger-color);
}

.btn-info {
    background-color: var(--info-color);
    border-color: var(--info-color);
}

/* Search Bar */
.search-bar {
    margin-bottom: 1.5rem;
}

/* Forms */
.form-control:focus {
    border-color: #bac8f3;
    box-shadow: 0 0 0 0.2rem rgba(78, 115, 223, 0.25);
}

/* Responsive Design */
@media (max-width: 768px) {
    .sidebar {
        width: 100px;
    }
    
    .sidebar .nav-link span {
        display: none;
    }
    
    .content {
        margin-left: 100px;
    }
    
    .sidebar-brand {
        font-size: 0.8rem;
        padding: 1.5rem 0.5rem;
    }
}

/* Password strength indicator */
.password-strength-meter {
    height: 0.3rem;
    background-color: #eee;
    border-radius: 3px;
    margin-top: 0.5rem;
}

.password-strength-meter div {
    height: 100%;
    border-radius: 3px;
    transition: width 0.5s ease;
}

.strength-weak {
    background-color: var(--danger-color);
    width: 25%;
}

.strength-medium {
    background-color: var(--warning-color);
    width: 50%;
}

.strength-good {
    background-color: var(--info-color);
    width: 75%;
}

.strength-strong {
    background-color: var(--success-color);
    width: 100%;
}

/* Tooltip for credentials */
.credential-item {
    position: relative;
}

.credential-item .credential-actions {
    display: none;
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
}

.credential-item:hover .credential-actions {
    display: flex;
}

/* Copy to clipboard animation */
.copied {
    position: relative;
}

.copied::after {
    content: 'Copiato!';
    position: absolute;
    top: -20px;
    right: 0;
    background-color: var(--dark-color);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 3px;
    font-size: 0.75rem;
    opacity: 0;
    animation: fadeInOut 1.5s ease;
}

@keyframes fadeInOut {
    0% { opacity: 0; }
    20% { opacity: 1; }
    80% { opacity: 1; }
    100% { opacity: 0; }
}
